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

Selecting rows in inner tables of Hierarchical Data

3 Answers 22 Views
VirtualGrid
This is a migrated thread and some comments may be shown as answers.
Abins
Top achievements
Rank 1
Abins asked on 28 Feb 2019, 11:41 AM

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

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 01 Mar 2019, 11:55 AM
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.
0
Abins
Top achievements
Rank 1
answered on 05 Mar 2019, 07:28 AM

Actually my scenario is,

 

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

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 05 Mar 2019, 01:52 PM
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.
Tags
VirtualGrid
Asked by
Abins
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Abins
Top achievements
Rank 1
Share this question
or