EasyUI Forum

General Category => General Discussion => Topic started by: cucux on July 30, 2014, 12:06:29 AM



Title: Update a particular cell in datagrid
Post by: cucux on July 30, 2014, 12:06:29 AM
Hello all,

I want to update a particular cell in datagrid based on a selection from an outside combobox.

I want something like this:

rows['i']['j']('setValue', val);

val is the combobox text

Can this be done?
I did not found an example.

Best regards,
Catalin


Title: Re: Update a particular cell in datagrid
Post by: stworthy on July 30, 2014, 02:13:07 AM
Please call 'updateRow' method to update a specified cell.
Code:
$('#dg').datagrid('updateRow',{
  index: index,
  row:{
    field: val
  }
});


Title: Re: Update a particular cell in datagrid
Post by: cucux on July 30, 2014, 02:23:18 AM
Thank you!

Work like charm.

Best regards,
Catalin