ListView Change Position Position

I have a Listview in my aspx page with an Insert and Edit template. and Add New LinkButton.

When the user clicks the Add New LinkButton, I can specify the position of the Insertitem to insert the TEmplate at the bottom of the list. But how to make the edititem template appear at the bottom like Inserttemplate

+2


source to share


2 answers


Its not available for EditItemTemplate.



0


source


You would have to actually keep the original position, move the item in the data source itself (possibly IList

compatible), reinstall the view, fire the trigger at the new position, and then change the item to the original position.



I would not recommend it. This is unintuitive behavior for users anyway; when I decide to edit something, I have to either edit or edit in a completely separate form. It is very rare for a good UI design to shuffle elements around while users work on them, especially if you have some kind of scrolling / paging.

0


source







All Articles