Completed
Last Updated: 11 May 2015 13:18 by ADMIN
ADMIN
Dimitar
Created on: 20 Apr 2015 13:23
Category: GridView
Type: Bug Report
1
FIX. RadGridView - NullReference exception when the header checkbox is clicked and the grid has no current row.
To reproduce:
radGridView1.EnableSorting = true;
radGridView1.AutoSizeRows = true;

radGridView1.ShowGroupPanel = false;
radGridView1.EnableGrouping = false;

radGridView1.MasterTemplate.AllowColumnChooser = false;
radGridView1.MasterTemplate.AllowAddNewRow = false;
radGridView1.MasterTemplate.AllowDeleteRow = false;
radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
radGridView1.MasterTemplate.AllowCellContextMenu = false;
radGridView1.MasterTemplate.AllowColumnHeaderContextMenu = false;

radGridView1.Columns.Add(new GridViewTextBoxColumn("key"));
radGridView1.Columns.Add(new GridViewTextBoxColumn("value"));
radGridView1.Columns.Add(new GridViewCheckBoxColumn { EnableHeaderCheckBox = true, });

var list = new List<KeyValuePair<string, string>>();
list.Add(new KeyValuePair<string, string>("1", "One"));
list.Add(new KeyValuePair<string, string>("2", "Two"));

radGridView1.DataSource = list;
radGridView1.CurrentRow = null;


0 comments