RadGridView with Row Details

2 posts, 0 answers
  1. Den Duze
    Den Duze avatar
    18 posts
    Member since:
    Nov 2014

    Posted 10 Jan 2017 Link to this post

    In the "Demo Application - UI for WinForms Q1 2016 SP1" there is an example of the RadGridView with Row Details.
    I'm trying to reproduce this in the OpenEdge programming platform (so need to to make some minor changes) but I don't get it to work!
    The latest problem is that it looks like 'DetailsColumn' is not a valid property of the RadGridView (or there is an error in the docs).

    The adjusted code is:
    method private void RadGridViewDetails_Load( input sender as System.Object, input e as System.EventArgs ):
                // TODO: This line of code loads data into the 'nwindDataSet.Employees' table. You can move, or remove it, as needed.
    /*            this.employeesTableAdapter.Fill(this.northwindDataSet.Employees); */

                this-object:radGridView1:ReadOnly = true.
                this-object:radGridView1:AllowColumnReorder = false.
                this-object:radGridView1:AllowColumnResize = false.
                this-object:radGridView1:AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode:Fill.
                this-object:radGridView1:AutoExpandGroups = true.
                this-object:radGridView1:TableElement:RowHeight = 40.

                this-object:radGridView1:GroupDescriptors:Add(new Telerik.WinControls.UI.GridGroupByExpression("City GroupBy City")).
                /* this-object:radGridView1:Groups[1][0]:IsCurrent = true. */
               
                this-object:radGridView1:Columns["Photo"]:VisibleInColumnChooser = false.
                this-object:radGridView1:Columns["Photo"]:IsVisible = false.
                this-object:radGridView1:Columns["Notes"]:WrapText = true.
                this-object:radGridView1:Columns["LastName"]:SortOrder = Telerik.WinControls.UI.RadSortOrder:Descending.

                this-object:radGridView1:DetailsColumn = this-object:radGridView1:Columns["Notes"].
            return.

        end method.

     

    The error I get is: Could not locate element 'DetailsColumn' in class Telerik.WinControls.UI.RadGridView
    I'm I doeing something wrong here??

    Also you notice that I commented this-object:radGridView1:Groups[1][0]:IsCurrent = true.
    That's because this is not allowed in OpenEdge? What does this statement mean? Maybe I can transform that so it is allowed in OpenEdge.

    What is not clear to me in the example is what code is responsible for adding that DetailsRow?
    So what property creates that (default hidden) row that is displayed when I click on a row in the RadGridView

    Thanks
    Didier

  2. Hristo
    Admin
    Hristo avatar
    1520 posts

    Posted 10 Jan 2017 Link to this post

    Hello Didier,

    Thank you for writing.

    The solution in the Examples project of our demo application utilizes a custom RadGridView control exposing a DetailsColumn property. In order to achieve the desired behavior, you would need to inherit RadGridView and extend it as per the sample. The details row is accomplished by using special measurement and arrangement of the element. The newly created grid control is working with custom layout and view definition classes.

    Regarding the IsCurrent statement, it actually set a particular row of the first group to be the current row in the grid. More information is available here:  Selected Rows and Current Row.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top