We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Add dropdownlist dynamically at runtime to Grid

Hi. I am using:
*  filename: ej.web.all.min.js
*  version : 17.2.0.46

I have this datamanager:
var dataManagerEmployees = ej.DataManager({
                url: "/api/Employees",
                adaptor: new ej.WebApiAdaptor()
            });

How can I add at runtime a dropdownlist with the dataManagerEmployees above to ejGrid?

3 Replies

PK Padmavathy Kamalanathan Syncfusion Team September 3, 2019 12:26 AM UTC

Hi Jose, 

Thanks for contacting Syncfusion Forum. 

QUERY: Add Dropdown dynamically at run time to Grid 
 
From your query we understand that you need to render dropdown list above grid and change the dataSource of grid by changing dropdown value. 

This can be achieved by rendering dropdown in “dataBound” event of grid. And in the change event of dropdown, you can take instance of grid and assign dataSource to grid based on the value of dropdown. 

Please refer the below help documentations, 

If you have further queries, please get back to us. 

Regards, 
Padmavathy Kamalanathan 



JM Jose Monzon September 3, 2019 12:58 AM UTC

Hello. Seems I made an error.  In my question:
"How can I add at runtime a dropdownlist with the dataManagerEmployees above to ejGrid"
by "above to ejGrid" I meant "using the dataManager", and the dropdownlist control should be in a column inside the grid.

In other words, I need to add a dropdownlist (with corresponding dataManagerEmployees") at runtime, to a column inside ejGrid.


FS Farveen Sulthana Thameeztheen Basha Syncfusion Team September 3, 2019 12:34 PM UTC

Hi Jose, 

We have checked your query and you can dynamically bind the dataSource for dropdownlist inside the Grid column using dataSource property . Also you can bind remote Data while on Editing as like below KB:- 

Refer to the KB link:- 

From this KB, you can change dropdownList dataSource while at initialRendering as well as Editing.  If your requirement is different from above scenario, please get back to us with further details. 

Regards, 
Farveen sulthana T 


Loader.
Live Chat Icon For mobile
Up arrow icon