Completed
Last Updated: 16 Dec 2011 04:43 by ADMIN
ADMIN
Jack
Created on: 16 Dec 2011 04:43
Category: GridView
Type: Bug Report
0
FIX some rows are not visible when adding them manually and using self reference hierarchy
1. Create a new project with RadGridView
2. Create an empty self-referencing data table
3. Set a self reference hierarchy by calling the AddSelfReference method
4. Add two rows in the table
5. Run the application and you will see that only one of the rows is visible.
DataTable table = new DataTable();
table.Columns.Add("Id", typeof(long));
table.Columns.Add("ParentId", typeof(long));
table.Columns.Add("Name", typeof(String));
gridView.DataSource = table;
gridView.Relations.AddSelfReference(this.gridView.MasterTemplate, "Id", "ParentId");
DataRow row = table.NewRow();
row["Id"] = 1;
row["ParentId"] = DBNull.Value;
row["Name"] = "Name1";
table.Rows.Add(row);
row = table.NewRow();
row["Id"] = 2;
row["ParentId"] = DBNull.Value;
row["Name"] = "Name2";
table.Rows.Add(row);
row = table.NewRow();
row["Id"] = 3;
row["ParentId"] = 2;
row["Name"] = "Name2";
table.Rows.Add(row);
0 comments