This is a migrated thread and some comments may be shown as answers.

GridViewRowInfo.IsExpanded Error!!

2 Answers 85 Views
GridView
This is a migrated thread and some comments may be shown as answers.
0930
Top achievements
Rank 1
0930 asked on 28 Dec 2010, 09:05 AM
GridViewRelation selfRelaction = new GridViewRelation(this.radGridView1.MasterTemplate, this.radGridView1.MasterTemplate);
selfRelaction.ParentColumnNames.Add("column1");
selfRelaction.ChildColumnNames.Add("column2");
this.radGridView1.Relations.Add(selfRelaction);
this.radGridView1.Columns["column1"].IsVisible = false;
this.radGridView1.Columns["column2"].IsVisible = false;
this.radGridView1.Rows.Add(1, null, "1", "1", "1", "1");
this.radGridView1.Rows.Add(2, 1, "1", "1", "1", "1");
this.radGridView1.Rows.Add(3, null, "1", "1", "1", "1");
this.radGridView1.Rows.Add(4, 3, "1", "1", "1", "1");
this.radGridView1.Rows.Add(5, null, "1", "1", "1", "1");

//error : radGridView1.Rows.Count is "0"!
this.radGridView1.Rows[0].IsExpanded = true;
this.radGridView1.Rows[2].IsExpanded = true;

radGridView1.Rows.Count is "0"!
Help me! Both Q2 and Q3!

2 Answers, 1 is accepted

Sort by
0
Accepted
Alexander
Telerik team
answered on 29 Dec 2010, 06:11 PM
Hello,

Thank you for your question.

I have created a sample project using your code snippet and I have attached it to this ticket. Please note, that my solution uses the Q3 2010 SP1 version of RadGridView.

Please review the sample and let me know if it helps you. 

Best regards,
Alexander
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
0930
Top achievements
Rank 1
answered on 31 Dec 2010, 02:24 AM
thanks
Tags
GridView
Asked by
0930
Top achievements
Rank 1
Answers by
Alexander
Telerik team
0930
Top achievements
Rank 1
Share this question
or