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

RadGrid - Batch Edit - Drop Down List

1 Answer 463 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cory
Top achievements
Rank 1
Cory asked on 29 Dec 2015, 09:39 PM

 Hi again - I have what I thought should be a simple item but based on my searching - it is not so simple.

 I have a datagrid on my page - that is populated on the server side by a query level class.  The method returns a DataTable which populates to the data grid just fine.  I've set the datagrid to EditMode="Batch" to allow the users to make changes in multiple records then save them all to the database.

 My problem is that I want one of the columns to be a drop down list (of any type).  It would be fed with a datatable from a database call as well - based off my same query level classes.  I've done this all 50 times before except never with EditMode = "Batch".  That seems to cause some issues.  I can't populate the drop down server side in the ItemDataBound event because the:  if (e.Item is GridEditableItem && e.Item.IsInEditMode) never evaluates to true when dealing with batch.

 Someone must have solved this before.  I can't just do the standard thing and tie the grid and the list to datasources right on the screen - it has to be called using a query level object. 

I even tried using XML to populate the list - which worked - but then I still can't get the list to connect to the data because whenever I try to "FIND" the control it never gets found.

 

HELP?!?

 

Thanks,
Cory Aston

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 01 Jan 2016, 09:58 AM
Hi Cory,

The Batch edit mode will render only one editor for the entire column, which is why the editor will not be available within the OnItemDataBound event, as with the other edit modes.

In the following help article (the last section) you will find information and example on how to get reference to the column editors on server-side when using Batch Editing:
Hope this helps.


Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Cory
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or