Master Detail grid

I am using Essential JS 2 for ASP.NET Core and I am trying to generate a page with a master grid and a details grid where the rowselected event of the master adds a parameter to the details request and calls the server side method.

I came across multiple posts about this subject but I suspect that the syntax for doing this has changed between version. I am not able to get this to work.

I have included a project which contains this concept using a Blog / Post model.

I have stripped down the grids to the bare minimum. They are both displaying data using the UrlAdaptor but I am unable to write the required code for the rowselected event.

The requirements are:

1) Use separate grids no hierarchy
2) When the page loads the child grid is filtered based on the first row of the master (which is selected)
3) both grids are paged (Currently not the case in the example because I wanted to reduce the components which could have an issue)
4) both grids support CRUD operation. An insert on the child grid is automatically linked with the selected parent (I believe I could do this via default value). BlogId column (in grid) and field (when inserting / editing) should not be visible to the user.


Attachment: TestMasterDetailGrid_c7f05d9f.zip

3 Replies

IR Isuriya Rajan Syncfusion Team April 11, 2018 02:44 PM UTC

Hi Jens 
  
Thanks for contacting Syncfusion support, 
  
We will implement your requirement as a custom Sample by considering the following criteria  
  
  
1.Detail grid dataSource will change based on the selected parent grid row 
  
2.Apply the CRUD operation for your detail grid. 
  
Note: We could see that you have not enabled the columns for grids. CRUD will be applied based on the primary key columns. So to enable the CRUD operation, include the columns. 
  
If this does not suit the implementation, share the precise details. 
  
Regards, 
Isuriya R 



JE Jens April 11, 2018 04:17 PM UTC

Hi Isuriya

Just as I received your update I was giving it another try and I believe I have mostly figured it out.
I have updated my sample in attachment.

I believe a custom sample is not needed anymore.

Believe me when I say I was struggling with this but I found the API documentation on the javascript documentation page which helped me a lot. I believe it would be a good idea to add the API part of the documentation at the ASP core section.

Could you review my sample and confirm this as a valid implementation?

Thx

Kind Regards
Jens

Attachment: TestMasterDetailGrid_f11745e5.zip


IR Isuriya Rajan Syncfusion Team April 12, 2018 01:03 PM UTC

Hi Jens, 
 
We have checked your sample and it looks fine.  Thanks for your suggestion on documentation, we will consider this. 
 
Please get back to us if you need any other assistance.  
 
Regards, 
Isuriya R 


Loader.
Up arrow icon