Search code examples
.netdatabound-controls

What is the equivalent to EditItemIndex of DataList in a ListView control?


Acutallly I want to fire item editing events. But how do I find the control? I mean to say as we find the control in edititem event of DataList using EditItemIndex. What is the equivalent to EditItemIndex in a ListView?


Solution

  • Maybe you mean this:

        protected void lvDocs_ItemEditing(object sender, ListViewEditEventArgs e)
        {
            lvDocs.EditIndex = e.NewEditIndex;
            //do whatever
        }//lvDocs_ItemEditing