Completed
Last Updated: 05 Jun 2015 08:51 by ADMIN
ADMIN
Stefan
Created on: 12 Jan 2015 08:48
Category: GridView
Type: Bug Report
0
FIX. RadGridView - CurrentRow.Index is incorrect (always -1) when the row is added in BeginUpdate/EndUpdate block
To reproduce, use the following code and afterwards check the CurrentRow.Index property:
            this.grid.BeginUpdate();
            GridViewDataRowInfo newRow = new GridViewDataRowInfo(grid.MasterView);
            this.grid.Rows.Add(newRow);
            this.grid.EndUpdate();

Workaround:
radGridView1.Rows.IndexOf(radGridView1.CurrentRow);
2 comments
ADMIN
Stefan
Posted on: 26 Jan 2015 09:56
Hi Joao,

you can use the suggested workaround for this case and get the correct index by using the IndexOf method of the Rows collection:
radGridView1.Rows.IndexOf(radGridView1.CurrentRow);
DreamTeam
Posted on: 23 Jan 2015 17:30
Hi, 

is there any prevision for this correction ? It is a core functionality of gridview and a "stop show" for me.