Friday, 4 July 2014

How to specify WhereCondition in Transformation - Nested Control - kentico 8, 7, 6

Leave a Comment
Before this i wonder how to pass some where condition in transformation repeater. So i ask the kentico guys and he give me a solution which i think i can share to the others.

So in your transformation you can specify the <script runat="server"></script> element. This is where you can pass the where condition.

Let see the example :

Transformation Code


<cms:queryrepeater id="repItems" ... DelayedLoading="true" ... />

<script runat="server">
protected void Page_PreRender(object sender, EventArgs e)
{
queryrepeater.WhereCondition= "NodeAliasPath LIKE '"+(string)Eval("NodeAliasPath")+"'";
queryrepeater.ReloadData(true);
}
</script>

Note : queryrepeater dont have DelayedLoading properties, use DataBindByDefault="false" instead.



By
NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)

0 comments:

Post a Comment

Subscribe to our newsletter to get the latest updates to your inbox.

Your email address is safe with us!




Founder of developersnote.com, love programming and help others people. Work as Software Developer. Graduated from UiTM and continue study in Software Engineering at UTMSpace. Follow him on Twitter , or Facebook or .



Powered by Blogger.