I have a Access database bound to the WebHierarchicalDataGrid via a WebHierarcicalDataSource, there are two related tables showing up as two bands and I can correctly see the data. Now I want to edit my data. We are using VS2010 with Infragistics ASP 11.2
I've turned on the EditingCore behavior and enabled the EnabledInheritance = true for each band.
I can edit the data in the second band of the grid, but the data never gets saved to the Access database. I'm under the impression that a Access database can be automatically updated by a WebHierarchicalDataGrid and that I don't need to do anything special to put the data into the data base; It should just happen, right?
Now I have the impression that I need to do something in the RowUpdating event since the data is not being saved. So, I wire up the event via the properties window. However, this event never fires when a cell / row is changed.
Why does this event never fire?
Do I really need to handle the RowUpdating event for a Access database?
I've created a test project to demo the issue I'm having.
The SlimGSETest.zip can be downloaded from here....
ftp://10.246.219.31/Public
Only the [Disabled] and [MachineCode] columns in the second band are enabled for editing.
Thanks,
Brian.
Hello Brian,
I have created a sample and attached it to your support case. It shows that updating and all other operation with the Database can be done automatically when Access Data Source is used.
Test it and inform me if you have further questions.
Thank you for your feedback.
I will create a sample with “AccessDataSource” based on Northwind Database in order to see if this behavior can be reproduced. If it is reproducible I will log this as a development issue in order to be resolved.
Please ignore what was previously suggested.
The fix I found was to replace the AccessDataSource with a SqlDataSource. Now the RowUpdating event fires as expected and I can edit the data in the second band without adding any extra code.
I think this fix points to serious bug. I've asked for it to be investigated.
So, the relationship needs to be as defined below...
<DataRelations>
<ig:DataRelation ChildColumns="FK" ChildDataViewID="SqlDataSource2_DefaultView"
ParentColumns="PK" ParentDataViewID="SqlDataSource1_DefaultView" />
</DataRelations>
I can see that in the sample relations are made between columns from the two tables that are not Primary Key ones.
In order to functions correctly the grid needs its relations to be set properly. Can you set the “PK” column data (194 and 192) to match the “PK” data in “SoftwareRegistrations” column and setup the relations like shown below?
<ig:DataRelation ChildColumns="PK"
ChildDataViewID="AccessDataSource2_DefaultView" ParentColumns="PK"
ParentDataViewID="AccessDataSource1_DefaultView" />
You can also follow this guide on how to configure the “WebHierarchicalDataSource” - http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/WebHierarchicalDataSource_Getting_Started_with_WebHierarchicalDataSource.html
Then test if the data are saved correctly to the Database and inform me with the result.