jQuery UI Widgets › Forums › Grid › jqxGrid editmode selectedrow validation
Tagged: angular grid, bootstrap grid, editmode, javascript grid, jquery grid, jqwidgets grid, jqxgrid, selectedrow, validation
This topic contains 4 replies, has 2 voices, and was last updated by Hristo 9 years, 1 month ago.
-
Author
-
Hi,
I was trying to use the grid’s selectedrow edit mode, i noticed 2 things.
1) You cannot tab to the different inputs, you have to manually click into each and every input and type which makes it very difficult to use. Normal forms tend to support tab. Is there a way to at least manually implement a similar behaviour? It makes it very inconvenient otherwise.
2) In this edit mode, During column validations, is there a way to get the value of the other column’s input? Like if i want to simply try to compare 2 date columns to make sure the End Date is after the Start Date, how do i get value entered in Start Date column to validate the End Date? In cell edit mode, you can just get the cell value as you edit 1 cell at a time, doing the same here gives you old values. Is there any way to get the other input values during validation?Looking forward for your reply.
Regards,
Mohamed AzherHi,
I have one more question.
Is there a rowendedit event similar to the cellendedit event? If no, is there a way to know that a row editing has completed? Like when enter is pressed to confirm the changes, any event to know that changes have been comitted?
Regards,
Mohamed AzherHello Mohamed Azher,
1)We have demo and there you could change selected cell with tab (and with arrows) and when start to input something that begin to edit this cell.
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/cellediting.htm?arctic2) To get a value of another column’s input could use method – ‘getcellvalue’.
var value = $('#jqxGrid').jqxGrid('getcellvalue', row, "columndatafield");
3) You could use ‘cellendedit’ event and ‘cellvaluechanged’ event with your own logic.
Something similar like to use bool variable with check all columns in the particular row and if are set changes on all of them – done, set it to true.This demo could be helpful:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/rowediting.htm?arctic
(edit whole row)Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo,
Thanks for the update, however, i was speaking strictly about row edit mode (not cell editing).
1) Tabbing does not work with the rowedit mode. What you mentioned is for cell editing, but does not work here
2) getcellvalue gives old values in row edit mode, not the value currently entered in the inputs. You can try the same in above demo
3) cellendedit gets called after validations, so i don’t think we can stop the user to enter the correct value using the method you mentioned, at most we can only override or set a new value.
Regards,
Mohamed AzherHello Mohamed Azher,
Sorry for this misunderstanding. Tabbing in “selectedrow” mode is not supported.
I would like to recommend a work around with:
– http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/popupediting.htm?arctic
An another options is to use – DataTable.Unfortunately, there is no way to invoke another cell’s validation callback function directly.
And for that reason may be used those memberscreateeditor
,initeditor
andgeteditorvalue
from columns property.
This will give you more options. Could get values from different cells and could make comparison with them.
And You can display the appropriate message.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.