3.2.0

maxlength in cell

How do I apply a maxlength attribute to a grid cell?

gridobj.getCellTemplate(3,1).getContent("box/text").setAttribute("maxlength", "2");

Is this how?? This does not seem to work though!!

J Mansons
June 4,
The grid cell editor is not an input tag but a span with contentEditable=true. The new 2.0.1 release will allow implementing maxlength check programmatically.
Alex (ActiveWidgets)
June 5,
Many thanks Alex.. for now what would you suggest as a work around?
Jack Mansons
June 7,
Maybe attach keyboard event handler to the edited span element in onCellEditStarted event and removing it in onCellEditEnded.
Alex (ActiveWidgets)
June 7,

This topic is archived.

See also:


Back to support forum