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. Image for the cookie policy date

Inserting new record to grid using model lists


Is it possible to insert a record to a grid by editing only one column and it populating multiple columns across the record. To try and put it into context I am trying to achieve the following:

I have a model which has three list objects inside it;

1. A list of 'field' objects with specific properties
2. A list of file headers
3. A list of 'mappings' (a field object matched to a file header object) [grid model]

I am trying to find the best way to create a list of records [mappings] in which a 'field' item can be mapped against a 'file header' item

I had tried populating the grid with all of the available fields and then allowed for the file column to be edited for each but I didn't like the user interaction for this.

I have now decided that I would like an empty grid and have access to the two lists I need in my model. When inserting a new record into the 'mappings' table I want to select a 'field' object and a 'file header' object; the predicament I am now facing is that I only want to select one 'field' object by its 'name' property and then I would like this to populate the further 'field' detail columns such as its 'type' and 'length' as I wish for the user to see this in order to make their decision of which file header to choose. I have used the foreign key and value properties and applied the datasource of my lists and that works fine but I am unable to populate the correct properties for the selected 'field' object in the other columns (which I don't want the user to be able to change).

Is the above even possible? Or is there an easier way I can use the Grid feature to achieve this?

I have previously tried drag and drop but couldn't find an elegant way of doing that either so have settled on using drop down lists at least until my ability improves!

Any help you can offer would be greatly appreciated!


1 Reply

VA Venkatesh Ayothi Raman Syncfusion Team July 10, 2017 03:04 AM UTC

Hi Holly, 
Thanks for contacting Syncfusion support. 
We have unclear about your requirement and we need some more details to achieved your requirement. You are asked “Is it possible to insert a record to a grid by editing only one column and it populating multiple columns across the record.”, Do you want to edit single cell value and based on that value other columns values are changed.  
Please share the following details, 
1)      Are you using any adaptor to bound the Grid data? if so provide details. 
2)      Share the Data structure details. 
3)      Graphical representation of the requirement. 
4)      Provide full Grid code example and server side code example. 
5)      Are you change the data source dynamically while select value in Dropdown list? 
6)      How you want to insert a new record in Grid? provide more details. 
it would be helpful for us to find the requirement and provide the better solution as earliest. 
Venkatesh Ayothiraman. 

Live Chat Icon For mobile
Up arrow icon