Completed
Last Updated: 23 Mar 2015 16:47 by ADMIN
ADMIN
Dimitar
Created on: 13 Mar 2015 12:43
Category: GridView
Type: Bug Report
0
FIX. RadGridView - when the header checkbox is clicked in a child template - all child views are checked at once.
To reproduce:
public RadForm1()
{
    InitializeComponent();
    DataTable master = new DataTable();
    master.Columns.Add("ID", typeof(int));
    master.Columns.Add("F_ID", typeof(int));
    master.Columns.Add("test", typeof(string));

    DataTable child = new DataTable();
    child.Columns.Add("F_ID", typeof(int));
    child.Columns.Add("test", typeof(string));
    child.Columns.Add("CheckBox", typeof(bool));

    for (int i = 0; i < 10; i++)
    {
        master.Rows.Add(i, i , "Row " + i);
        child.Rows.Add(i , "Child " + i, true);
    }

    radGridView1.DataSource = master;
    GridViewTemplate template = new GridViewTemplate();
 
    template.DataSource = child;
    radGridView1.MasterTemplate.Templates.Add(template);

    GridViewRelation relation = new GridViewRelation(radGridView1.MasterTemplate);
    relation.ChildTemplate = template;
    relation.RelationName = "Test";
    relation.ParentColumnNames.Add("F_ID");
    relation.ChildColumnNames.Add("F_ID");
    radGridView1.Relations.Add(relation);
    this.Load += RadForm1_Load;

}

void RadForm1_Load(object sender, EventArgs e)
{
    GridViewCheckBoxColumn col = radGridView1.MasterTemplate.Templates[0].Columns[2] as GridViewCheckBoxColumn;
    col.EnableHeaderCheckBox = true;
   
}

- Expand some rows and click on header check box.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments