I’m using dataUrl, buildSelect and cacheUrlData properties to fill a combo with some simple values. The first time edit form is displayed the combo shows the values exactly as retrieved from DB.
|
1 2 3 4 5 |
<option value="">- Select Age -</option> <option value="1">Minor</option> <option value="2">18-21</option> <option value="3">22-31</option> <option value="4">More than 32</option> |
The second time the form is opened the combo is filled with values saved by cacheUrlData, but empty strings values are replaced by option text so I get: <option value=”- Select Age -“>- Select Age -</option>
<option value=”1″>Minor</option>
<option value=”2″>18-21</option>
<option value=”3″>22-31</option>
<option value=”4”>More than 32</option>
This is caused by line 437 in grid.common.js where the emtpy string is replaced:
vl = $(this).val() || txt;
I’m using jQuery.validationEngine plugin which use empty string to know if the user selected a correct value.
I think this behaviour is inconsistent since cacheUrlData should respect original data. It’s by design or should be fixed?
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top