Urgent - How to use FeatureDataForm for tables (not features)?

3405
1
Jump to solution
12-20-2014 08:14 AM
Labels (1)
BARISUZ1
New Contributor

Dear All,

I am trying to use FeatureDataForm to add new records or edit existing records in the personal geodatabase. I am using ArcGIS Runtime SDK for WPF and using MPK as local services.

I am able to create the FeatureData form but when I click "OK" button, it fires EditEnded, but does not create any records.

Thanks for your help in advance.

0 Kudos
1 Solution

Accepted Solutions
BARISUZ1
New Contributor

I found the solution implicitly here: EditorWidget FeatureDataForm events and when can save edits

It was actually as easy as:

...
void featureDataForm_EditEnded(object sender, EventArgs e)
{
    //
    // some code segment to check EventArgs ...
    //

    // some other code segment ...

    tblDataForm.FeatureLayer.SaveEditsFailed += FeatureLayer_SaveEditsFailed;
    tblDataForm.FeatureLayer.EndSaveEdits += FeatureLayer_EndSaveEdits;
    tblDataForm.FeatureLayer.SaveEdits(); // this does the trick!!!
}
...

I hope someone finds this useful!

View solution in original post

0 Kudos
1 Reply
BARISUZ1
New Contributor

I found the solution implicitly here: EditorWidget FeatureDataForm events and when can save edits

It was actually as easy as:

...
void featureDataForm_EditEnded(object sender, EventArgs e)
{
    //
    // some code segment to check EventArgs ...
    //

    // some other code segment ...

    tblDataForm.FeatureLayer.SaveEditsFailed += FeatureLayer_SaveEditsFailed;
    tblDataForm.FeatureLayer.EndSaveEdits += FeatureLayer_EndSaveEdits;
    tblDataForm.FeatureLayer.SaveEdits(); // this does the trick!!!
}
...

I hope someone finds this useful!

0 Kudos