Datalist selects Item after first click, but does apply the SelectedItemTemplate after the second cl

D

Dirk Meusel

Background:
On my webform a simple datalist shows one column. The databind is done
in the page_load event. In the ItemTemplate a linkbutton serves for
providing the Select Command.

Problem:
When I click a item to be selected, the datalist applies the
SelectedItemStyle on that Item, but not the SelectedItemTemplate. When
I click the same Item a second time asp.net applies both the
SelectedItemStyle and the SelectedItemTemplate, but does not fire the
OnSelectedItemChanged event.

What is to do to select the item with the first click properly???
 
D

Dirk Meusel

Thank you, Bülent Keskin! I forgot to databind the datalist after
postback again. with a databind() statement in the page_load event,
everything works fine.

Dirk
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top