lunes, 22 de diciembre de 2014

Cuando en el gridview esta paginado y se quiere obtener la fila

The problem is in the following line::

CommandArgument ='<%# Container.DataItemIndex%>'

the command argument not reset itself every time when move from page to another page..
  • The answer is ::(in the case of ListView):
CommandArgument ='<%# ((ListViewDataItem)Container).DisplayIndex%>'

  • The answer is :: (in the case of GridView):
CommandArgument='<%#((GridViewRow)Container).RowIndex%>'

No hay comentarios:

Publicar un comentario