We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Access second-level nested items

Thread ID:

Created:

Updated:

Platform:

Replies:

142879 Feb 24,2019 10:09 PM UTC Mar 1,2019 08:53 AM UTC WinForms 4
loading
Tags: SfDataGrid
Christopher Scholl
Asked On February 24, 2019 10:09 PM UTC

I am developing a sfdatagrid with a master, a child to the master, and a child to that, so three levels ... essentially, there is a company, a branch in that company, and events that branch has completed.

I can access the "company" by selecting the row and accessing it using vb.net as follows: 
Dim v = gridCompany.CurrentItem
Dim r As System.Data.DataRow = v.row

I can access the "branch" by selecting the row in the expanded detail view and access it as follows:
Dim v = gridCompany.SelectedDetailsViewGrid.CurrentItem
Dim r As System.Data.DataRow = v.Row

So if i want to access the "events" by selecting one of those rows (a child detail view to the "branch") how do i get that selected row?

Thanks!

Jagadeesan Pichaimuthu [Syncfusion]
Replied On February 25, 2019 12:37 PM UTC

Hi Christopher, 
 
Thanks for contacting Syncfusion support. 
 
We have forwarded this to our development team for analysis. we will update you with details on February 26, 2019. 
 
We appreciate your patience until then. 
 
 
Regards, 
Jagadeesan 


Jagadeesan Pichaimuthu [Syncfusion]
Replied On February 26, 2019 09:42 AM UTC

Hi Christopher, 
  
Thanks for your patience. 
  
Please make use of the following code snippet to get the row selected in the details view grid. 
  
Code snippet :   
if (sfDataGrid1.SelectedDetailsViewGrid != null) 
{ 
    var dataGrid = sfDataGrid1.SelectedDetailsViewGrid; 
    while (dataGrid.NotifyListener != null) 
    { 
        if (dataGrid.SelectedDetailsViewGrid != null) 
            dataGrid = dataGrid.SelectedDetailsViewGrid; 
        else 
            break; 
    } 
  
    var currentItem = dataGrid.CurrentItem; 
} 
  
Let us know whether this helps also if you need any further assistance on this. 
  
Regards, 
Jagadeesan

Christopher Scholl
Replied On March 1, 2019 02:14 AM UTC

this gets the 1st nested grid (the child) but it doesn't get the child of the child, the second nested grid.

Jagadeesan Pichaimuthu [Syncfusion]
Replied On March 1, 2019 08:53 AM UTC

Hi Christopher, 
 
Thanks for your update. 
 
We have created a simple sample using the code snippet which we have provided in the last update and it is available in the following link for your reference. 
 
 
We are able to get the selected record from the second level nested grid in this sample. Please have a look at the given sample and if still the issue exists please let us know if we missed any customization you have done in your application. It will be helpful for us to provide an exact solution at earlier. 
 
Regards, 
Jagadeesan

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon