jQWidgets Forums
jQuery UI Widgets › Forums › Grid › String maximum length
This topic contains 11 replies, has 4 voices, and was last updated by Peter Stoev 12 years, 2 months ago.
-
AuthorString maximum length Posts
-
Hi,
We have a jqxgrid and we would like to fix the max length for our text cells. We have some text cells that we would like the user to not being able to write more than 9 chars in the cell, is this possible? how can we do it? is it something we can put in the column definition?
This is one of our columns:{ text: ‘Days’, datafield: ‘TimeToLeaseDays’, editoptions: {maxlength: 5}, width: 70, cellsformat: ‘n0’, align: ‘right’, cellsalign: ‘right’, initeditor: numbericEditor.initeditor, validation: timeToLeaseValidator.validate, cellbeginedit: gridHelper.beginCellEdit },
Thanks in advance and regards.
Hi germanbrea,
You can validate the user’s input in the “validation” function. An example of validation is demonstrated in the Editing sample of jqxGrid.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comYes, but in our understanding this will validate once the user exists the cell, we would like the user to not being able to write more than 9 chars, once he writes the 10th character it would only maintain the first 9.
Is this possible? thanks again!Hi germanbrea,
You may use the “initeditor” callback of the editable column and set the maxlength attribute of the editor, if it is a textbox:
http://www.w3schools.com/tags/att_input_maxlength.asp
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi germanbrea,
You may use the “initeditor” callback of the editable column and set the maxlength attribute of the editor, if it is a textbox:
http://www.w3schools.com/tags/att_input_maxlength.asp
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi germanbrea,
You may use the “initeditor” callback of the editable column and set the maxlength attribute of the editor, if it is a textbox:
http://www.w3schools.com/tags/att_input_maxlength.asp
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi germanbrea,
You may use the “initeditor” callback of the editable column and set the maxlength attribute of the editor, if it is a textbox:
http://www.w3schools.com/tags/att_input_maxlength.asp
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi germanbrea,
You may use the “initeditor” callback of the editable column and set the maxlength attribute of the editor, if it is a textbox: http://www.w3schools.com/tags/att_input_maxlength.asp
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi germanbrea,
You may use the “initeditor” callback of the editable column and set the maxlength attribute of the editor, if it is a textbox: http://www.w3schools.com/tags/att_input_maxlength.asp
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi germanbrea,
You may use the “initeditor” callback of the editable column and set the maxlength attribute of the editor, if it is a textbox:
http://www.w3schools.com/tags/att_input_maxlength.asp
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi,
You may use the \”initeditor\” callback of the editable column and set the maxlength attribute of the editor, if it is a textbox:
http://www.w3schools.com/tags/att_input_maxlength.aspBest Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi germanbrea,
You may use the “initeditor” callback of the editable column and set the maxlength attribute of the editor, if it is a textbox:
http://www.w3schools.com/tags/att_input_maxlength.asp
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.