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

Get changed / Updated value of drop down in the grid

1 Answer 396 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 04 Mar 2014, 07:19 AM
I want to get the updated / changed value of the drop down, when user change it while editing in console.log.

 
<script>
    $(document).ready(function () {
             
        $("#grid").kendoGrid({
            dataSource: {
                data: itemData(50),
                pageSize: 12,
                change: function(e) {
                    var item = e.items[0];
                    console.log(item.get("gridActionPlan.gridActionPlanID"));
                    
                }
            },
            height: 475,
            groupable: true,
            navigatable: true,
            sortable: true,
            filterable: true,
            resizable: true,
            columnMenu: true,
            pageable: true,
            toolbar: ["save", "cancel"],
            columns: [
                { field: "gridActionPlanID", values: actionPlanValues, title: "Action Plan", width: 200 },
                { field: "gridNewRetailSP", title: "New Retail SP", width: 120 },
                { field: "gridPercentEffectedStock", title: "% of Effected Stock", width: 150 },
                { field: "gridSales", title: "Sales", width: 150 },
                { field: "gridNetImpact", title: "Net Impact", width: 150 }],
            editable: true
        });
    });
 
 
 
 
    function itemData(count) {
        var data = [];
         
        for (var i = 0; i < count; i++) {
            data.push({
                gridActionPlanID : 0,
                gridActionPlan : {
                    gridActionPlanID : 0,
                    gridActionPlanName : "[Select Action Plan]"
                },
                gridNewRetailSP : 0,
                gridPercentEffectedStock : 0,
                gridSales : 0,
                gridNetImpact : 0
            });
        }
             
        return data;
    }
     
     
                
    var actionPlanValues = [{
        "value": 0,
        "text": "[Select Action Plan]"
    },{
        "value": 1,
        "text": "SP Adjustment / Display"
    },{
        "value": 2,
        "text": "Clearances"
    },{
        "value": 3,
        "text": "Return to Supplier"
    },{
        "value": 4,
        "text": "Inter-Store Transfer"
    },{
        "value": 5,
        "text": "Seasonal Import or Local"
    },{
        "value": 6,
        "text": "Bar Code Problem"
    },{
        "value": 7,
        "text": "Waste"
    },{
        "value": 8,
        "text": "Stock Problem"
    },{
        "value": 9,
        "text": "Display Piece"
    },{
        "value": 10,
        "text": "Color / Size / Range"
    }];
</script>

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 05 Mar 2014, 06:58 AM
Hello Komail,

You can handle Grid edit event, check whether there is a DropDownList widget and bind to its change event. Here is an example for this: http://jsbin.com/kuxaq/1/edit

Regards,
Nikolay Rusev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or