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.
Unfortunately, activation email could not send to your email. Please try again.

I want to hand grid dropdown events.

Thread ID:

Created:

Updated:

Platform:

Replies:

120279 Sep 17,2015 01:02 AM Sep 18,2015 08:02 AM JavaScript 1
loading
Tags: ejGrid
Bharat Buddhadev
Asked On September 17, 2015 01:02 AM


Technology must be angular js and mvc

I want to use dropdown with gridview

I want to access all the event of dropdown which is used in gridview

So how to access the event of dropdown which is used in gridview.

Need Example dropdown in gridview and want to handle events of that dropdown in grid.

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On September 18, 2015 08:02 AM

Hi Bharath,

Thanks for contacting Syncfusion Support.

As per your requirements we have prepared a sample. Please refer to the following jsPlayground page,
http://jsplayground.syncfusion.com/c0nab5gb

We have rendered the ejDropDownList using the Column Template property of the Grid. The Change Event of the Grid used to access the values of dropDown, after a change in the dropdown list. “e-change” is the keyword used to place the change event in ejDropDownList. In similar way, other properties can also be prefixed by “e-”.

Please refer to the following code example and Help document for several other Events of ejDropDownList.

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

     e-columns="columns"

     e-databound="dataBound"

     e-allowPaging="true">

   <div e-columns>

        <div e-column e-field="OrderID" e-headertext="Order ID" e-textalign="left"></div>

. . .

       <div e-column e-headertext="Employee Temp" e-template="true" e-textalign="left">

            <input type="text" ej-dropdownlist e-datasource="$parent.list" class="drop" change="change" />

        </div>
    </div>
</div>

<script type="text/javascript">

    var dropList = [

                 { empid: "SelectedRowIndex", text: "SelectedRowIndex" }, { empid: "ViewRecord", text: "ViewRecord" }

];           

    var data = [

        {OrderID: 10248, EmployeeID: 1},

        {OrderID: 10249, EmployeeID: 2},

        {OrderID: 10250, EmployeeID: 3},

        {OrderID: 10251, EmployeeID: 4},

        {OrderID: 10252, EmployeeID: 5}

    ];

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

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

          $scope.data = data; //DataSource of Grid

          $scope.list = dropList //DataSource of DropDown

      });   

   function change(args) {

        var gridObj = $("#Grid").ejGrid("instance");

            //do something

    }
</script>


Help Document: http://help.syncfusion.com/js/api/ejdropdownlist#events

Regards,
Seeni Sakthi Kumar S.

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.

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.

;