Updating data row in master grid of a master-detail formation

Hi There,


I have a master-detail grid setup, where most the edits are being done on the master grid, which contains an order. The detail grid is a holding grid of items that are part of the order. There is a separate grid next to the detail grid that contains the full list of available items, with controls that allow the user to move an item from the full list of available items to the holding grid of items and vice versa.


On the master grid, there is a count of item types. This count also drives dropdown values at the master level that classifies the order. I have been successful in updating the underlying object using the OnActionBegin event handler, however, the counts do not appear on the master grid while in in-line edit mode. Should I be modifying the data at the object level, or manipulating it through the grid?


Below is the class structure

public class Order

{

 public ICollection<Item> Items

 public int CountOfBigItems => Item.Where(p => p.Size == Size.Big).Count; // Referenced in the grid

 public int CountOfSmallItems => Item.Where(p => p.Size == Size.Small).Count;  // Referenced in the grid

public Guid OrderSize => goes to a lookup based on the counts above, and assigns appropriate guid

}


Thanks in advance for your help!



3 Replies

NP Naveen Palanivel Syncfusion Team August 25, 2022 05:22 PM UTC

Hi Gerald,


Greetings from Syncfusion support


We have analyzed your query and still we are quite unclear about your exact requirement. So kindly share the following details to validate the reported query further at our end.

  1. Please ensure if you want Total count in master grid after inline editing
  2. Share us the screenshot of the reported issue
  3. Share us the video demonstration for your requirement.
  4. Share more details about your requirement elaborately


Above requested details will be helpful for us to validate the reported query at our end and provide solution as early as possible. 


Regards,

Naveen Palanivel



GP Gerald Peng August 26, 2022 04:25 AM UTC

Hi Naveen,


I'll find a way to get you a screenshot/video. In the meantime - I want the CountOfBigItems and  CountOfSmallItems updated in the master grid during​ editing in the master grid (as the row in the master grid must be in edit mode in order for the details to be editable), and not have said edit mode closed when the count is changed. I have tried ObservableCollection and INotifyChange for the master grid objects, and ObservableCollection for the child objects, and the issue is the when a change is made to the counts, edit mode is automatically closed off and the record is saved before the user can select save/cancel.


Gerald.



NP Naveen Palanivel Syncfusion Team August 28, 2022 02:34 PM UTC

Hi Gerald,


We checked your query and prepared Editing sample in mastergrid. We need some details to validate the reported query further at our end.


  1. Please ensure if you want to prevent save action before user click the save button
  2. Can you please explain about property of CountOfBigItems and  CountOfSmallItems
  3. Please ensure if you want change the value correspondingly to change value in countOfBigItema and CountOfSmallItems
  4. Please share video demonstration or screenshot of your requirement.


Above requested details will be very helpful for us to validate the reported query at our end and provide solution as early as possible.


Regards,

Naveen Palanivel


Attachment: MasterGrid_d10eeac3.zip

Loader.
Up arrow icon