RadGridView

3 posts, 0 answers
  1. Adrian Loughman
    Adrian Loughman avatar
    18 posts
    Member since:
    Nov 2002

    Posted 02 Oct 2007 Link to this post

    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. Adrian Loughman
    Adrian Loughman avatar
    18 posts
    Member since:
    Nov 2002

    Posted 02 Oct 2007 Link to this post

    Update to my last post.

    So far i cannot find where the tableviewinfo for the ChildGridViewTemplate???
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 03 Oct 2007 Link to this post

    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
Back to Top