I have a doubt here,
I have a gridview and in that gridview I wanna get the indexes of selected rows, for example
foreach(gridviewrow row in gridview1.rows)
{
checkbox chkSelectedItem=(checkbox).row.findcontrol("chkSelectedItem");
if(chkSelectedItem.checked)
{
int[] count=new int[row.RowIndex];
}
}
when I execute this it stores only 0s as values. how can I get the selected indexes only….can anyone help me…thanks in advance
Try
iwill have collection of all selected indexes