Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 02, 2012 02:41 AM by Qin Dian Tang - MSFT
Feb 28, 2012 08:29 PM|LINK
I want to open the selecteditemtemplate of the current item created in listview control.
hopefully from the listview inserted event when a condition is met ?
Mar 01, 2012 07:03 AM|LINK
If the newly inserted item is at the bottom of the table, you can set the selectedindex of ListView to the last one. If you have paging, you can turn to the last page. If the newly inserted item is random, you can loop the datakey of each item to find the
index of the selected one in the ListView. And set its SelectedIndex for ListView.
Mar 01, 2012 06:24 PM|LINK
That would be fine. but......
Have you got a sample that shows how to select the last paged record selecteditemtemplate after the new record has been inserted.
Mar 02, 2012 02:41 AM|LINK
It is easy. You can get the info from the datapager control:
DataPager1.TotalRowCount/DataPager1.PageSize will be the last page index, then turn to that page and set the last one as selected.