Opened 10 years ago

Closed 9 years ago

#13974 closed defect (patchwelcome)

ValidationTextBox inside DataGrid

Reported by: lzboron Owned by: Evan
Priority: high Milestone: tbd
Component: DojoX Grid Version: 1.6.1
Keywords: datagrid, validation Cc:
Blocked By: Blocking:


When I use dijit.form.DateTextBox? for editing value inside a cell of dojox.grid.DataGrid?, it checks user input and prevents user from leaving this cell if incorrect value is entered. This prevents user from inserting incorrect values to the store and I therefore assume it is correct behavior. I think it should work the same way for ValidationTextBox?, but it does not. ValidationTextBox? with incorrect value allows user to leave cell and start editing another one. This results in inserting incorrect value into model. Also when user leaves edited cell, ValidationTextBox? is hidden and user can not see any difference between input with valid and invalid value.

Here is short sample of code: <div data-dojo-id="store" data-dojo-type="" data-dojo-props="data:{identifier:'id', items:[{id:'1', a:'a1', b:'b1', c:null}, {id:'2', a:'a2', b:'b2', c:null}]}"></div> <table data-dojo-type="dojox.grid.DataGrid?" data-dojo-props="store:store">


<th field="a" editable="true" cellType="dojox.grid.cells._Widget" widgetClass="dijit.form.ValidationTextBox?" widgetProps="{regExp:'.{3}'}">a</th> <th field="b" editable="true" cellType="dojox.grid.cells._Widget" widgetClass="dijit.form.ValidationTextBox?" widgetProps="{regExp:'.{3}'}">b</th> <th field="c" editable="true" cellType="dojox.grid.cells._Widget" widgetClass="dijit.form.DateTextBox?">c</th>



First two inputs are required to be exactly 3 characters long, third is date. Their behavior after inserting invalid value is as described above.

Change History (2)

comment:1 Changed 9 years ago by bill

DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.

You should upgrade your code to use one of those two grids.

We will consider patches to the old DojoX Grid code though.

comment:2 Changed 9 years ago by bill

Resolution: patchwelcome
Status: newclosed
Note: See TracTickets for help on using tickets.