This is a migrated thread and some comments may be shown as answers.

Access grid's bond dropdown list dataSource

1 Answer 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 27 Apr 2020, 03:19 PM
I have 2 grids. Grid A and grid B. Grid B has a column with a dropdown list. Some of the items in the grid B dropdown list are from a column in grid A. Is there a way to update the dataSource, client side, of the dropdown list in grid B when a column in grid A is updated? All without posting back to the server. The dataSource for the dropdown list in grid B only seems to be available on an edit event of the grid B column containing the dropdown list. Is there a way to access the dataSource of the grid B dropdown list on an edit event of a grid A column? I'm using MVC and have my grids defined with Razor and my bond dropdown lists are in partial view editor templates.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 29 Apr 2020, 01:33 PM

Hello Richard,

This use-case is quite unusual and I trying to fully understand it first. Can you share an example flow of the user's interaction with the Grids? For instance when they click on grid A Edit and save what happens? Then going to Grid B and clicking on Edit what would be the action triggered?

As far as I understand all of the actions are required only the client-side. If the DataSource of the DropDownList in Grid A is local I assume on Edit of the grid the DropDownList data can be stored in an array for instance and later on Edit of Grid B this array can be applied to the DropDownList of Grid B. Here setDataSource method can be useful to set the dataSource of the DropDownList and rebinds it.

Let me know if this helps.

Regards,
Nikolay
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or