This is strange. I have a radgrid with GridButtonColumn. The gridbuttoncolumn has a commandname of DeleteItem.
I pick this up on the server side in the Radgrid_Itemcommand sub.
At this point I want to reference items in the grid to perform other functions.
The code I have been using for an ID databound column (unique name mnu_3_id)
id = radgrid1.Items.Item(e.Item.RowIndex)("mnu_3_id").Text
However, the rowindex that is returned is incorrect. It returns a number twice as big + 1.
i.e. clicking row 0 results in a 2 being returned, row 1 a 4, row 2 a 6 etc.
I can obviously work around this, but why does it return the incorrect index?
Cheers
Tox
I pick this up on the server side in the Radgrid_Itemcommand sub.
At this point I want to reference items in the grid to perform other functions.
The code I have been using for an ID databound column (unique name mnu_3_id)
id = radgrid1.Items.Item(e.Item.RowIndex)("mnu_3_id").Text
However, the rowindex that is returned is incorrect. It returns a number twice as big + 1.
i.e. clicking row 0 results in a 2 being returned, row 1 a 4, row 2 a 6 etc.
I can obviously work around this, but why does it return the incorrect index?
Cheers
Tox