Opened 11 years ago
Closed 8 years ago
#9668 closed enhancement (patchwelcome)
Editable grid with ValidationTextBox does not work
Reported by: | Ian Fouls | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | high | Milestone: | future |
Component: | DojoX Grid | Version: | 1.3.2 |
Keywords: | grid ValidationTextBox | Cc: | |
Blocked By: | Blocking: |
Description
There is no functionality built into the grid to allow text editing with simple requirements of say a required field or a basic regular expression. Attempting to use the constraint attribute within a grid cell does not work as this does not map with the use of constraints within the ValidationTextBox? widget.
It's a little odd that more complex editing requirements have been dealt with but the basics of required text or simple pattern matching have not been addressed.
Looking through the code I think the only way to do this is to write a validator function in a custom edit widget. This is getting silly for such a basic requirement.
Attached is a modified version of the test_edit_dijit.html using a ValidationTextBox? and attemptint to specify a constraint, clearly this isn't going to work but I feel it should do.
Would it not be more sensible to include a grid dijit widget based on ValidationTextBox? rather than expecting developers to create custom widgets for basic requirements?
Attachments (1)
Change History (5)
Changed 11 years ago by
Attachment: | test_edit_dijit.html added |
---|
comment:1 Changed 11 years ago by
Milestone: | tbd → future |
---|---|
Priority: | high → normal |
Type: | defect → enhancement |
comment:2 Changed 11 years ago by
comment:3 Changed 8 years ago by
comment:4 Changed 8 years ago by
Resolution: | → patchwelcome |
---|---|
Status: | new → closed |
This is just a TODOC, I'm not sure who special-cased constraints or why they did it. The correct strategy for setting arbitrary widget attributes is to specify the widgetProps on the cell:
This makes Message only match values which contain one or more ` mark.