EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: can2pic on May 18, 2013, 08:51:58 AM



Title: Datagrid getValue of specific cell [solved]
Post by: can2pic on May 18, 2013, 08:51:58 AM
I've been trying to work out how to repeatedly get the value a specific datagrid cell for about 10 hours now,Please can someone help to correct my code? I haven't quite got to grips with this yet :'( , for example my column name is Part_Number and the the index is row 5 and I need to get the current value, I would have previously used document.getElementById

Code:
var v = $('#dg_spn').datagrid('getValue',{index: 5,row:{Part_Number:}});
alert(v);

Thanks


Title: Re: Datagrid getValue of specific cell
Post by: stworthy on May 18, 2013, 08:26:03 PM
Try this:
Code:
var v=$('#dg_spn').datagrid('getRows')[5].Part_Number;


Title: Re: Datagrid getValue of specific cell
Post by: can2pic on May 19, 2013, 01:44:51 AM
Thank you stworthy, that works fine!