How to get a gridview row previous and next cell value on rowdatabound event. I tried this
GridViewRow prevRow = GridView1.Rows[e.Row.RowIndex - 1];
Label previousValue = prevRow.FindControl("SLNO") as Label;
But it throws an error like this
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Thanks