How to find control inside of <ItemTemplate> ?

S

slava_th

Hi,

I have this List control on my mobile form.

<mobile:List id="lstContacts" runat="server">
<DeviceSpecific Runat="server">
<Choice>
<ItemTemplate>
<mobile:Link ID="lContactName" ..
<mobile:Command...
</ItemTemplate>
</Choice>
</DeviceSpecific>
</mobile:List>

I'd like to customize NavigateUrl,Text of lContactName inside of the
code of ItemDataBind handler for each data item. (I would not like
doing it via data binding expression, better in code)
How to find lContactName for each instance of this template ?

Also another small question, maybe someone had an experience with it.

I paginate this list using LoadItems event. I assign
lstContacts.ItemCount property for the first time - LoadItems handler
is called and List displays items from the page 1.
Then at some point I need to display another set of items, I set
ItemCount to some another number ... but LoadItems event is not called.

With ObjectList I could overcome this problem by setting ItemCount to 0
prior to assigning new number of items, but with List class it doesn't
work. What magic there ?

Thanks,

Vlad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top