var fieldInfos = []; var props = { class: "atiField", constraints: { 'pattern': "#", 'places':0, 'max':999999999999999, 'min':0 } }; fieldInfos.push({ 'fieldName': 'GAZ_ID', 'isEditable': true, 'label': 'GAZ ID', 'customField': new dijit.form.NumberTextBox(props)} ); fieldInfos.push({ 'fieldName': 'NAME', 'isEditable': true, 'label': 'Name' }); var layerInfos = { 'featureLayer': flayer, 'fieldInfos': fieldInfos, 'isEditable': true, 'showDeleteButton': true } //set up the attribute inspector var attInspector = new esri.dijit.AttributeInspector({ layerInfos: layerInfos }, "attributeDiv");
Solved! Go to Solution.
Hi,
Has anyone solved this yet? Diana?
I am having the same problem using api v3.5 ValidationTextBox (plus am unable to control whether the box is editable or not)...
Thanks,
Arth.
No, it looks like it is still an ESRI bug and does not appear to be fixed in JS api 3.5 either. I had to resort to a different work around since it seems to me like the CSS is getting all messed up when using the customField option. From what I can see, the CSS for ReadOnly properties is not honored with any fields in the AttibuteInspector FieldInfos that implement the customField poperty. I hope ESRI can post a fix soon. I had to change my UI and add a "label" to accomodate for that bug.
myDijit.set('value', somevalue);
myDijit.value = somevalue;
myDijit.attr('value', somevalue);
Hi all,
The problem is in AttributeInpector.js, in _destroyAttributeTable() function, in line "this._attributes && h.destroy(this._attributes)". The _attributes contains custom widgets you created. Just comment this line and it will work.
Alex Merkulov
if (this._attributes) { _9.destroy(this._attributes); }