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

problem with databind with dropdown on Grid Edit

1 Answer 108 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dhaval
Top achievements
Rank 2
Dhaval asked on 20 Dec 2010, 07:14 AM
Hi There,
                I am getting problem with Grid Edit while using Edit, In Edit mode in dropdown and combobox the selected value is not getting bind.. Here is the code that i am using for binding selected value to the dropdown with ClientEvent of Grid.
if (e.mode == 'edit') {
var bondDrpDwn = $('#bondid').data('tDropDownList');
if (bondDrpDwn != undefined)
{
                var id = e.dataItem['bondid'].id;
                var name = e.dataItem['bondid'].name;
                bondDrpDwn.fill(function () {
bondDrpDwn.select(function (item) {
return item.Text == name; }); });
}
}
Here the problem is some thing like in edit mode the value that binds to the drop down is fake viz correct value is not getting bind.. Any help would be appreciated.

     Thanking you in Anticipation.

    Regards,
   Dhaval Shukla

1 Answer, 1 is accepted

Sort by
0
Accepted
shanker bangari
Top achievements
Rank 1
answered on 23 Dec 2010, 11:52 AM
Hi,


Try this 

$(e.form).find('#bondid').data('tDropDownList').select(function (dataItem) {
            return dataItem.Value == e.dataItem['id'];
        });
Tags
Grid
Asked by
Dhaval
Top achievements
Rank 2
Answers by
shanker bangari
Top achievements
Rank 1
Share this question
or