Unplanned
Last Updated: 21 Nov 2016 12:29 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 10 Nov 2016 07:52
Category: GridView
Type: Bug Report
1
FIX. RadGridView - newly added rows are not selected if the grid is sorted
To reproduce: please refer to the attached gif file and sample project. The multiple newly added rows are selected only when the grid is not sorted.

Workaround: use Begin/EndUpdate when adding multiple rows
 private void radButton1_Click(object sender, EventArgs e)
 {
     this.radGridView1.ClearSelection();
     this.radGridView1.BeginUpdate();
     for (int i = 0; i < 3; i++)
     {
         GridViewDataRowInfo row = new GridViewDataRowInfo(this.radGridView1.MasterView);
         row.IsSelected = true;
         row.IsCurrent = true;
         row.Cells["Id"].Value = this.radGridView1.Rows.Count;
         row.Cells["Name"].Value = "Row" + row.Cells["Id"].Value;
         this.radGridView1.Rows.Add(row);
     }

     this.radGridView1.EndUpdate();
 }

0 comments