Title: onClickRow in datagrid Post by: varonica on August 18, 2013, 08:08:59 PM onClickRow in datagrid is perfect but I want to add a 'keyup' event after 'onClickRow' event is fired up to some numberbox to get updated without clicking to other rows or accept it.
(http://www.jeasyui.com/forum/index.php?action=dlattach;topic=2063.0;attach=403) The problem i'm facing right now is the value i'm getting is not a current value but a previous value. I want a current value not a previous one. Example: after i type '23' in numberbox it gives me '2' instead of '23'. Please help me :( :( :( Title: Re: onClickRow in datagrid Post by: stworthy on August 19, 2013, 12:17:28 AM After calling 'beginEdit' method to edit a row, the 'numberbox' editor can be obtained by calling 'getEditor' method. Thus you will be able to bind any events on this editor. The code below shows how to achieve this functionality.
Code: var dg = $('#dg'); Title: Re: onClickRow in datagrid Post by: varonica on August 19, 2013, 12:57:10 AM I have tried it but it isn't working :( Can you show me a complete example ?
Title: Re: onClickRow in datagrid Post by: stworthy on August 19, 2013, 01:11:38 AM Please refer to this example http://jsfiddle.net/CsyY2/.
Title: Re: onClickRow in datagrid Post by: varonica on August 19, 2013, 01:22:14 AM Thanksssssssssssssssssssssssssssssssssssssssssssssssssss!!!! :) ;D ;D ;D ;D ;D ;D :P :P :P :P :P :P
Title: Re: onClickRow in datagrid Post by: varonica on August 19, 2013, 02:41:05 AM Can i update row without endEdit ? :(
Title: Re: onClickRow in datagrid Post by: stworthy on August 19, 2013, 04:30:04 AM Calling endEdit method will stop the row editing and update that row.
Title: Re: onClickRow in datagrid Post by: varonica on August 20, 2013, 01:52:10 AM Let say after i enter '23' into Wattage of Device, 'Cost Per Hour' need to update its value without calling endEdit method. Can i do that ?
Title: Re: onClickRow in datagrid Post by: stworthy on August 20, 2013, 07:00:04 AM This tutorial shows how to calculate two columns.
http://www.jeasyui.com/tutorial/datagrid/datagrid15.php As an alternate solution, extend a new editor 'label' that only display field value and apply it to your 'Cost Per Hour'. This topic shows how to achieve this label editor. http://www.jeasyui.com/forum/index.php?topic=1803.0 Title: Re: onClickRow in datagrid Post by: varonica on August 20, 2013, 08:55:37 PM Thanks sir, You save me again !!!! :-[ :-[ :-[ :-[ :-[ :-[ :-* :-* :-* :-* :-* :-* ;) ;) ;) ;) :P :P :P :P :P :P :P
|