how to set a maxlength?

421 views
Skip to first unread message

yyeshua

unread,
Jul 28, 2010, 2:01:05 PM7/28/10
to SlickGrid
Hello.

I want set a maxlength to the columns, but I dont have idea for doit.
Some help??

Thanks.

Michael Leibman

unread,
Jul 28, 2010, 2:15:59 PM7/28/10
to slic...@googlegroups.com
column.maxWidth

yyeshua

unread,
Jul 28, 2010, 4:51:43 PM7/28/10
to SlickGrid
I try it, but don't work. I understand maxWidth is the max size colum,
but I want Allow a limit input. Foe expamle, I want limit a input for
get 3 characters and no more.

Thanks.

yyeshua

unread,
Jul 28, 2010, 5:20:43 PM7/28/10
to SlickGrid
I did edit the code like this:

First, the Column def:

var columns = [
{
id:"column_id", name:"column_name",
field:"column_field", width:30,
maxlength: X
},...
]

And the IntegerCellEditor:

var strMaxlength = "";
if(args.column.maxlength != undefined) { strMaxlength =
"maxlength='"+args.column.maxlength+"'"; }

$input = $("<INPUT type=text class='editor-text' "+strMaxlength+" /
>");

what do you think?

Ryan Fyffe

unread,
May 14, 2015, 2:55:38 PM5/14/15
to slic...@googlegroups.com
Any updates on this issue? Was a solution found?
Reply all
Reply to author
Forward
0 new messages