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

Best method to execute an update when DropDownList value changes

1 Answer 70 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 24 Feb 2017, 05:20 PM

We have a page that will be passed in a User's Id to it, and it will have one DropDownList reflecting the User's role, while also allowing them to change their role.

We are looking at leveraging the "change" event for a kendoDropDownList. And inside that event, making a $.ajax call.

We know we can work our way to getting this approach to work, but we were wondering if there was a more straight-forward or recommended approach to take.

For example, should or could we define an "update" action inside the dataSource.transport definition for the dropdownlist, that would somehow be triggered?

 

Another perspective, is that we have lots of Grids that have dataSource.transport.update definitions, and they are processed with a clean controller method that is passed a DataSourceRequest and an instance of a data object that is being updated.  Can we do something similar with a DropDownList?

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 28 Feb 2017, 12:14 PM
Hi Joe,

As far as I can understand, in the described scenario there is a DropDownLists on the page, which allows the user to change its role. According to the selected role, the DataSource of the same DropDownList may vary. If this is the case, using the change event of the widget with an AJAX call is a viable approach.

The DropDownList HTML helper, unlike the Grid, does not allow an Update action to be configured for its DataSource.

Regards,
Veselin Tsvetanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
DropDownList
Asked by
Joe
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or