DataRepeater ItemTemplate click

0
0

Hi,

I’m using a DataRepeater and I’m trying to fire an event when one clicks on a row. I am using the ItemTemplate.Click. The event fires only some times. I believe that what is really happenning is that most of the times I really click on one of the controls in the ItemTemplate and not the ItemTemplate itself.
I beleive this imust be a common scenario for label controls that do not show as individual on the ItemTemplate’s background. Is there an easy way to propagate click from controls in the ItemTemplate to the template itself?
On the other hand, on a mobile device where we finger scroll, how can we avoid that scrolling is not interepreted as click/tap/select of a row?

Best,

Alex

  • You must to post comments
1
0

Hi Luca, thanks for your answer, I didn’t know the Annymous property, sounds very useful.
In fact, I firstly went for the DataRepeater.CurrentItemIndexChanged, but I found out that this fires also when I scroll, that’s why I abandoned it and looked for something like Click.

I understand that tappinga nd scrolling are different events. Is there a difference also between tapping and clicking?

I don’t see a SelectedItemChnaged. Do you mean ItemSelected? I’ll give it a go.

Alex

 

  • You must to post comments
0
0

Tapping and scrolling are different events. If you want to make a control “invisible” to pointer events set the Anonymous property to true.

For the click on a panel in the data repeater you can also simply handle the SelectedItemChanged event since anywhere you click will set the panel as the current one.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.