Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Inline dropdown: data is not updated when change from empty value

$
0
0

Hello,

 

I have a grid like the following:

$("#grid").kendoGrid({
        dataSource: {
            batch: true,
            data: [
                {id: 1, statusId: 1, label: 'item1'},
                {id: 2, statusId: 1, label: 'item2'},
                {id: 3, statusId: 2, label: 'item3'},
                {id: 4, statusId: null, label: 'item4'}
            ],
            model: {
                id: 'id',
                fields: {
                    id: {type:'number', editable: false},
                    statusId: {type:'number', editable: true},
                    label: {type:'string', editable: true}
                }
            }
        },
        columns : [
                   { field: 'statusId', values: [ {value:1, text:'Status1'}, {value:2, text:'Status2'} ] },
                   { field: 'label'}
        ],
        editable: true
    }).data("kendoGrid");​

 

statusId column contains an identifier according to the linked values dictionary. When I double click a statusId cell I get a dropDownList with Status1 and Status2 options.

 

Then if I click a statusId cell having non empty value (e.g. row 1), change statusId to another value, click on another row - statusId text is properly updated.

But if I click a statusId cell having an empty value ( row 4), change statusId to​ any non empty value, click on another row - statusId text is not updated in the row 4 statusId cell.

Could you help to solve this issue?

The ideas is to have nullable statusId , linked to a dictionary, where null value is missing. Everything works fine if I try to ​change not empty value. But doesn't work what I try change empty value to not empty.

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>