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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Add dropdownlist dynamically at runtime to Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

147102 Sep 1,2019 08:40 PM UTC Sep 3,2019 12:34 PM UTC jQuery 3
loading
Tags: ejGrid
Jose Monzon
Asked On September 1, 2019 08:40 PM UTC

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?

Padmavathy Kamalanathan [Syncfusion]
Replied On 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 


Jose Monzon
Replied On 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.

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon