DataGridControl with DataTable source

I am using  DataTable as source for DataGridControl with AllowEdit=true, AllowDelete=True;
The DataTable is filled using OracleDataAdapter.
 
If I edit a row in the table and do a save/update using my OracleDataAdapter, no rows are saved.
I looked at a row I know I changed, and it does have the new item values, however, the RowState shows Unchanged and the row.Original is the same as the row.
 
It is as if the AcceptChanges() is done.
 
I would like the rowstate to show:  Added,Deleted,Modified.
Is there a better way to populate the data grid?
 
I attached a part of what I am doing in my WPF application.
Thanks,
Mary


DataGridControlExample_5f1eb23.zip

1 Reply

RS Ravi Shankar B Syncfusion Team November 28, 2012 07:18 AM UTC

Hi Mary,

 

We have analyzed your query and you can achieve your requirement by setting the property NotifyPropertyChanges  as “True” and UpdateMode as “PropertyChanged”. This will  automatically commit the value in DataTable source.

 

XAML code snippet:

<syncfusion:GridDataControl x:Name="dataGrid"

                                        AllowDelete="True"

                                        AllowEdit="True"

                                        AllowMultipleRecordDeletion="True"

                                        AutoPopulateColumns="True"

                                        AutoPopulateRelations="False"

                                        ListBoxSelectionMode="MultiExtended"

                                        NotifyPropertyChanges="True"

                                        ShowAddNewRow="False"

                                        UpdateMode="PropertyChanged"

                                        WrapCell="False" />

 

 

Regards,

Ravi Shankar B.


Loader.
Up arrow icon