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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Master Details Generic CRUD

Thread ID:

Created:

Updated:

Platform:

Replies:

132227 Aug 21,2017 09:16 PM UTC Aug 28,2017 01:42 PM UTC ASP.NET MVC 3
loading
Tags: Grid
Megatron
Asked On August 21, 2017 09:16 PM UTC

Hi, I have many Master Detail Table

Projects - Tasks
Customer - Order etc.

  • How can I let user edit/CRUD both Master and Details (show user success message when done)
  • Since I have many Master-Detail tables, I don't repeat the code everytime, is there a way to create a generic Master-Details Edit/CRUD?

Thanks


Prasanna Kumar Viswanathan [Syncfusion]
Replied On August 22, 2017 01:57 PM UTC

Hi Megatron, 

Thanks for contacting Syncfusion support. 

According to your requirement you have many Master-Detail Grid and you need to display success message when we successfully completed CRUD operation in Master-Detail Grids.  

In this you have mentioned that you do not repeat the code every time. So, here we have some clarifications. 

1. If you are using remoteSave adaptor in Grid, then do you need to apply the same URL for all Master-Detail Grid?. 

2.  Please provide more information regarding the repeat code.  

Regards, 
Prasanna Kumar N.S.V 


Megatron
Replied On August 22, 2017 04:45 PM UTC

1. If you are using remoteSave adaptor in Grid, then do you need to apply the same URL for all Master-Detail Grid?. 
yes - URL will change by location of controller action

2.  Please provide more information regarding the repeat code. 
I was hoping to load Generic Master Object/Model, and Generic Detail Object/Model in the Grid View code & controller.
So, I am trying to reuse code. I would like some suggestion/input from you on how to make the Master Grid CRUD in a reusable pattern.
  • Option 1: Either copy and paste the same code
  • OR 2: Ceate a new object to pass configuration values in the my view/partial view & controllers to setup the Views for each master Details grid..

3. I want to let user Edit Both Master Grid & Details Grid, Add new records, edit, delete. (In the delete/Edit Row Master Grid, if there are records under details Grid, I want to show message to User
  • Message to user when deleting Master Records to prevent orphaned records -" Do you want to move the child records to another Master Record?"
  • Yes - then show Dropdown or something on which record - select a different Master Record to make as the parent record for that Child/Details record.
  • No - then prevent deletion

Thanks



Prasanna Kumar Viswanathan [Syncfusion]
Replied On August 28, 2017 01:42 PM UTC

Hi Megatron, 

Sorry for the late reply. 

We have some clarifications with your requirement.  

1. Query : “URL will change by location of controller action” 

In above query if we bind the different table for the Master-Detail Grid, then you need to use same CRUD controller action for both Master and Detail Grid. If we misunderstood your query, please provide the graphical representation of your requirement.  

2. Query : “Ceate a new object to pass configuration values in the my view/partial view & controllers to setup the Views for each master Details grid.. 
 
We cannot understand the above requirement clearly. So, please provide graphical representation for this.  
 
3. Query : “Delete operation” 
 
In this if we delete the record in Master Grid you need to open the dialog box with Yes or No option. If we select yes you need to show the dropdown with the values of an primary key values(Master Grid). If we select the value from the dropdown then you need to move all the records of detail Grid to the selected Master record.     

Regards, 
Prasanna Kumar N.S.V 


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.

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

;