Selecting rows in inner tables of Hierarchical Data

4 posts, 0 answers
  1. Abins
    Abins avatar
    8 posts
    Member since:
    Dec 2018

    Posted 28 Feb 2019 Link to this post

    Hi,

     

    I have a Virtual Grid with Hierarchical Data. If i select inner table or child table rows, it returns 1st row. Can you please help me to sort this issue.

     

    --Thanks

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3891 posts

    Posted 01 Mar 2019 Link to this post

    Hello, Abins,         

    The provided brief description is not clear enough to understand what is the exact requirement that you are trying to achieve. However, I suppose that you want to select a row from the child level.

    In order to select a cell programmatically in the child view you can use the following approach:

    private void radVirtualGrid1_RowExpanded(object sender, Telerik.WinControls.UI.VirtualGridRowExpandedEventArgs e)
    {
        radVirtualGrid1.VirtualGridElement.Selection.BeginSelection(1, 1, e.ChildViewInfo , true);
        radVirtualGrid1.VirtualGridElement.Selection.ExtendCurrentRegion(6, 3);
    }

    The following help article specified the public API for selecting certain rows: https://docs.telerik.com/devtools/winforms/controls/virtualgrid/selection/selecting-progrmmatically 

    If it is not the exact requirement, please specify in details what is the exact goal that you are trying to accomplish. Thus, we would be able to think about a suitable solution and assist you further.

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Abins
    Abins avatar
    8 posts
    Member since:
    Dec 2018

    Posted 05 Mar 2019 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Actually my scenario is,

     

    When a user select a child row, I need to recognize which row he have selected.

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3891 posts

    Posted 05 Mar 2019 Link to this post

    Hello, Abins,    
     
    The RadVirtualGrid.Selection.SelectedRegions property stores a collection of SelectionRegion objects. Each SelectionRegion contains the top,left and bottom,right indices of the selection. Thus, you can extract which are the selected cells in RadVirtualGrid no matter to which hierarchy level they belong.  The SelectionRegion.ViewInfo property indicates if the region is from the master or child template.

    If you have any further question, I would kindly ask you to submit a support ticket and our support staff will gladly assist you. Thank you for your understanding.

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top