I have data grid component and i am using it with 'inline editing' mode. Value of one column is being selected from dropdown control. Value that is provided is string (more precise: Guid) and dropdown options are in form of Text (human friendly text) / Value (string ~ guid).
When i have small amount of options to provide to dropdown control, it works OK. That means when grid is created, that column has right text displayed (it matches value and text/value from dropdown options), and editing works fine.
However, this dropdown has many options, 10K+ records so i used remote (ajax) source for that. Now the problem that i have is that grid doesn't show value because it's a remote call and it doesn't fetch proper Text/Value to connect it to value. So it doesn't show any value (more precise: text) to user.
How to achieve this?
Greetings from Syncfusion support
Before we start providing solution to your query, please share the below details that will be helpful for us to provide better solution.
1) Share your complete Grid rendering code, we would like to check how you are binding the remote date to the inline edit dropdown
2) Share your Syncfusion package version.
3) Share the issue scenario in video demonstration format.
hello, i've made sample and attached it...
I've included comments in code, but have in mind the follwing:
index.cshtml contains three examples:
Thanks for your update
Based on your shared information we have checked your sample and we could see that the dropdown was displays the respective datasource as text based on id. Please refer the below video demo.
Please share the details about your problem scenario with detailed description about Grid. Share the issue replication procedure step by step and also share the issue scenario in video demonstration.
actually i need the value to be shown in the grid BEFORE doing inline edit that shows dialog.
I've attached modified example with slightly different solution to the problem - so that grid receives text that should be shown. That works ok, but now i have another issue, when i update value with another option, it just doesn't work as expected.
We have checked your query and we could see that you are having only two datasource and bind the template value as DropdownItemText to the DropdownItemId column. So, when you edit the 1st record and for example you are selecting the “Wilkerson Hanson” value from the dropdown and saving the record, now it will display the “Wilkerson Hanson” in the Grid it will always displays “Guerra Johnson”, because you are using template property and bind the DropdownItemText value, so it will display the “Guerra Johnson” for the 1st record and “Nicholson Gill” for second record whenever you are updating the record. It was the default behavior.
From checking your requirement, we could see that you can achieve your requirement by using our Foreignkey column feature. The Foreign key column can be enabled by using dataSource, foreignKeyField and foreignKeyValue properties of e-grid-column tag helper. Please refer the below documentation for more information.