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

RadGridView

2 Answers 220 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Adrian Loughman
Top achievements
Rank 1
Adrian Loughman asked on 02 Oct 2007, 11:16 AM
Hi All

I am trying to fill the grid using a set of objects i have created using csla.net (www.lhotka.net).
At the moment i am trying to create a new instance of the GridViewRowInfo object in order to fill and add it to a parent row.
It is asking me for a constructor of type GridViewInfo??

How would i create a new instance of this type.

I was hoping to do all of this in code.

Any help is appreciated.

2 Answers, 1 is accepted

Sort by
0
Adrian Loughman
Top achievements
Rank 1
answered on 02 Oct 2007, 11:58 AM
Update to my last post.

So far i cannot find where the tableviewinfo for the ChildGridViewTemplate???
0
Jack
Telerik team
answered on 03 Oct 2007, 01:27 PM
Hi Adrian,

Thanks for writing. You don't need to create a GridViewRowInfo object to add new rows. To do that, use the Add method of the GridViewRowCollection, which takes an object array as an input parameter.

Please consult the following code, illustrating adding two rows to the RadGridView:

this.radGridView1.Rows.Add(new object[] { 1, "John Smith", 15.4});  
this.radGridView1.Rows.Add(2, "Peter Johnson", 12.9); 

The GridViewTemplate does not have a single GridViewInfo. Instead, there are separate GridViewInfo objects for every parent row. This is exposed through the ViewInfos property of GridViewTemplate. However, this property is currently marked as internal. We will fix this in our upcoming service pack.

Best wishes,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Adrian Loughman
Top achievements
Rank 1
Answers by
Adrian Loughman
Top achievements
Rank 1
Jack
Telerik team
Share this question
or