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

Change data in Dropdownlist in RadGrid in Radpanel

1 Answer 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeffrey
Top achievements
Rank 1
Jeffrey asked on 13 Mar 2014, 08:25 AM
For my internship I have to work with Telerik which is going great since the forums is up to date and I can find many tutorials.
I started to combine tricks etc for the better effect.

For the project I have to do, I have to change the values in a dropdownlist whenever the values of the other dropdownlist is changed.
Not that difficult normally.

However I am trying to do this when both dropdownlists are in the editmode(batch) of a radgrid, which is in a radpanel. I can't figure out how to acces the changeselectedvalue event

Now my question is, is it possible to trigger this event while the dropdownlists is in a Radgrid in editmode batch?
In the first attachment is a part of my code with both the columns selected.
In the second is how my page looks right now (all data from 'Eenheid'). I wanna change the databound of 'Eenheid' whenever I change the value of 'Vector'


Jeffrey

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 18 Mar 2014, 07:52 AM
Hi Jeffrey,

I am not sure which selected index changed event you want to use for populating the related drop down but you should bare in mind that when batch editing is used things should be handled on the client. Since the requirement is to implement a related drop downs scenario I suggest using two RadComboBoxes and populating them via callbacks. A sample demonstration of this can be observed in the attached page.

Regarding the implementation of such a scenario in a batch editing grid. Unlike the other modes the Batch EditMode allows editing of cells/rows solely on the client before sending the changes to the server in a single request. The changes which the user had made are stored on the client and if a postback occurs when the data is being edited they will be lost since the client object used for storage is cleared. That said the correct approach in such case is to populate the related drop down using a callback or to manually add items to its items collection using JavaScript.

Regards,
Angel Petrov
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
Tags
Grid
Asked by
Jeffrey
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or