Feature attribute validation

06-18-2015 06:50 AM
New Contributor III


I need to be able to check the formats of some string fields while collecting or editing a feature in the ArcGIS Mobile for Windows app. If the format is incorrect then I need to alert the user that it needs to be fixed. Are there any examples of how this is done?


Scott Dickison

Kentucky Transportation Cabinet

0 Kudos
1 Reply
New Contributor III

Don't know if you are still looking for an answer.  But one option would be to create an editing task or extension. If you work with a task you could connect to the closing event handler on the EditAttributesDialog

                m_ead = new EditAttributesDialog(m_feature);

                m_ead.Text = "Collect Feature";

                m_ead.Closing += new System.ComponentModel.CancelEventHandler(m_ead_Closing);

The in the closing event you could loop through the various fields in the feature and implement your checks.  If a check fails then you could show a message dialog with the error and then specify

e,Cancel = true;

Which will return the user to the editattributesdialog.

0 Kudos