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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

I want to set selectedindex or selectedvalue of dropdown in gridview

Thread ID:





120280 Sep 17,2015 05:13 AM UTC Sep 18,2015 11:35 AM UTC JavaScript 2
Tags: ejGrid
Rakesh Advani
Asked On September 17, 2015 05:13 AM UTC

Technology must be angular js and mvc

I want to set dropdown selected index or selected value while data bind.

Rakesh Advani
Replied On September 17, 2015 05:15 AM UTC

doing  updation of previous thread

Technolgy must be angular js and mvc

I want to use dropdown in gridview and I want to set the dropdown selected index or selected value while data bind of grid.

Saravanan Arunachalam [Syncfusion]
Replied On September 18, 2015 11:35 AM UTC

Hi Rakesh,
Thank you for contacting Syncfusion Support.
We analyzed your requirement and we achieved using “DataBound” event of Grid in which we set the value for the dropdown using “setSelectedValue” method of Dropdownlist.
Please refer to the following code example.

<div id="targetsGrid" ej-grid e-datasource="data"

                   e-databound = "databoundtest"



angular.module('listCtrl', ['ejangular'])

          .controller('PhoneListCtrl', function ($scope, $compile) {

                            . . .

                                $scope.databoundtest = "templateCompile";

                            . . .


function templateCompile(args){

                                . . .



We created the sample in jsplayground and please refer to the following link.
And also find the following documentation link for further reference of setSelectedValue method of Dropdown list.



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

or the page will be automatically redirected to 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