Monday, March 26, 2012

Listview hyberlink problem

I used listview to bind a datasource by declaretive methods.In the listview , there is a Hyberlink control but i dont know how to set its navigateUrl to send another page..Which parameter i have to use in bindings tag?

<hyperLink id="masterDescription">

<bindings>

<binding dataPath="productId"

property="text"/>

</bindings>

</hyperLink>

isnt it just

<binding dataPath="url"property="navigateURL"/>

?

It doesn't work.When i write property NavigateUrl instead of Text,it disappears..

I want to do exactly like this <a href="navigateUrl"> productId </a>


I have this:

<hyperLink id="masterDescription">
<bindings>
<binding dataPath="Description" property="text"/>
<binding dataPath="Description" property="navigateURL" />
</bindings>
</hyperLink
and in my listView template I have:

<a href id="masterDescription"></a
and it works for me. Change Description for navigateURL to your desired data value ;)

so bind it twice


<bindings>

<binding dataPath="productId" property="text"/>
<binding dataPath="url" property="navigateURL"/>

</bindings>

No comments:

Post a Comment