Last post Mar 02, 2012 03:41 AM by Qin Dian Tang - MSFT
Feb 28, 2012 09:29 PM|peterthegreat|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 08:03 AM|Qin Dian Tang - MSFT|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 07:24 PM|peterthegreat|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 03:41 AM|Qin Dian Tang - MSFT|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.