EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: varonica on March 13, 2013, 09:27:19 PM



Title: How to use 'selectRecord' in datagrid ? :(
Post by: varonica on March 13, 2013, 09:27:19 PM
I'm struggling to find away of using selectRecord but it didn't work!! please help me!! :'( :'( :'(


Title: Re: How to use 'selectRecord' in datagrid ? :(
Post by: devnull on March 13, 2013, 10:06:02 PM
Hi;

How about this:

Code:
var row = $('#mydg').datagrid('getSelected');
console.log(row);


Title: Re: How to use 'selectRecord' in datagrid ? :(
Post by: varonica on March 14, 2013, 12:19:49 AM
Thanks for reply, but i want to use 'selectRecord'(method of datagrid) !!! Please help me :'(


Title: Re: How to use 'selectRecord' in datagrid ? :(
Post by: mazvv on March 14, 2013, 01:28:48 AM
Did you tried do simply as in documentation
Code:
$('#mydatagrid').datagrid('selectRecord', idValue);
Please, see http://jsfiddle.net/qhdcY/1/


Title: Re: How to use 'selectRecord' in datagrid ? :(
Post by: varonica on March 14, 2013, 01:47:54 AM
Hi mazvv, I did try but it isn't working as i expected!!
Here is my code:
     idValue = 5;
     $('#dg').datagrid('selectRecord',idValue);


Title: Re: How to use 'selectRecord' in datagrid ? :(
Post by: mazvv on March 14, 2013, 01:49:41 AM
Please, see http://jsfiddle.net/qhdcY/1/
I think your problem is idField


Title: Re: How to use 'selectRecord' in datagrid ? :(
Post by: varonica on March 14, 2013, 02:34:11 AM
Thanks for saving me, you're a genius!!!  :-* :-* :-* :-* ;) ;) :D :D :D :D :'(


Title: Re: How to use 'selectRecord' in datagrid ? :(
Post by: iceh on January 09, 2014, 05:09:31 AM
Thx, that helped me, too!