I am using this example to implement the editing on my map.
Editing Without Widget ARCGIS Javascript
The code employs a templatepicker which uses the layers on the map to show the features which can be selected and hence editing can be done on those features.
templatePicker = new TemplatePicker({
featureLayers: layers,
rows: "auto",
columns: 2,
grouping: true,
style: "height: auto; overflow: auto;"
}, "templatePickerDiv");
However, you have to select a feature yourself before starting to edit it. After selection, the selected feature is fetched as
selectedTemplate = templatePicker.getSelected();
This selectedTemplate is then selected to put the points on the map.
selectedTemplate.featureLayer.applyEdits([newGraphic], null, null);
The problem is, I want to select the default or first feature in the templatePicker automatically as it loads. I tried finding if TemplatePicker has any method to select any feature but I couldnt. Is there any way that I could do that?