.esriAttributeInspector .atiButtons .atiDeleteButton { display: none; }
var saveButton = new dijit.form.Button({ label: 'Save', 'class': 'atiSaveButton' }); dojo.dom-construct.place(saveButton.domNode, attributeInspector.deleteBtn.domNode, "after");
var saveButton = new dijit.form.Button({ label: 'Save' }); dojo.place(saveButton.domNode, dojo.query(".atiDeleteButton"), "after");
You can hide the delete button easily with CSS:.esriAttributeInspector .atiButtons .atiDeleteButton { display: none; }
As for creating a button, you will need to do that in javascript:var saveButton = new dijit.form.Button({ label: 'Save', 'class': 'atiSaveButton' }); dojo.dom-construct.place(saveButton.domNode, attributeInspector.deleteBtn.domNode, "after");
I also am having trouble adding buttons to the editor widget infowindow. The best I could do was add a button by following this sample:
http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/ed_attribute_inspector.html
However this sample uses the attribute inspector without the editor widget. If you figure out how to add the button while using the editor widget, please post your code.
Thanks!
if (dojo.byId("MyLink") == undefined) { dojo.create("a", { "id": "MyLink", "class": "action", "innerHTML": "MyLink", "onclick": "MyLinkAction();return false;" }, dojo.query(".actionList", map.infoWindow.domNode)[0]); }
Hi,
You can hide delete button of Attribute Inspector and also you can have control on the fields of Attribute Inspector.
You just need to add the below following code in your editing function:
var layerInfos = [];
layerInfos = [
{
'featureLayer': xyz, //your featureserver layer
'isEditable': false,
'showDeleteButton':true, // in your case, it will be false
'fieldInfos': [
{'fieldName':'OBJECTID', 'isEditable':true ,'label':'Object ID'},
{'fieldName':'', 'isEditable':true ,'label':''}
]
},
{
'featureLayer': ,
'isEditable': false,
'showDeleteButton':true,
'fieldInfos': [
{'fieldName':'OBJECTID', 'isEditable':true ,'label':'Object ID'},
{'fieldName':'', 'isEditable':true ,'label':''}
]
}
];
var settings = {
layerInfos : layerInfos
};
Thanks,
Mayur Patel
And you can also create a new Button in your Attribute Inspector
var myEditor = new Editor(srcNode);
var attInspector = myEditor.attributeInspector;
var saveButton = new Button({label:"Save","class":"atiSaveButton"},domConstruct.create("div"));
domConstruct.place(saveButton.domNode, attInspector.deleteBtn.domNode, "before");
The reason why I have created attInspector variable using myEditor.attributeInspector is we want "Save" button in our attributeInspector of Editor Widget.
Thanks.
Mayur Patel