We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataGridControl with DataTable source

Thread ID:

Created:

Updated:

Platform:

Replies:

105378 Oct 7,2012 12:34 AM UTC Nov 28,2012 07:18 AM UTC WPF 1
loading
Tags: GridControl
Mary Fontana
Asked On October 7, 2012 12:34 AM UTC

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

Ravi Shankar B [Syncfusion]
Replied On 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.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;