I got pretty good at repeating my preferred pattern w/ WebDataGrid:
1) Crud Stored Procs + 2) .Net DataSets and TableAdapters + 3) ObjectDataSource + 4) WebDataGrid w/ AutoCrud = false.
Now I'm using the WebHierarchicalDataGrid w/ one child band, but I don't yet understand the similarities and differences between those two controls.
a) Can the WebHierarchicalDataGrid work w/ AutoCrud = false?
b) Can the WebHierarchicalDataGrid tolerate EnableAjax = false? Does it need EnableAjax = true for row expanders, etc>
c) I noticed that some of the WebHierarchicalDataGrid samples use a delete button in a column template, or a Delete ContextMenu Item, instead of the EditingCore.RowDeleting behavior. Is that because the EditingCore.RowDeleting behavior can't be expected to work on a WebHierarchicalDataGrid?
If I prefer AutoCrud = false on my WebDataGrids, what's the best way for me to implement Adding, Updating and Deleting in a WebHierarchicalDataGrid?
Also, it seems that I've had WebDataGrids that could successfully update SQL Server tables with AutoCrud = true, but as I enhanced the *.aspx file, at some point the WebDataGrid stopped sending traffic to SQL Server even though AutoCrud = True had Not changed. Is there a list of other properties and their values that could cause AutoCrud to stop working? Perhaps EnableViewState, EnableDataViewState, EnableAjaxViewState, etc?
Just checking if the latest reply helped you out and if you require any further assistance on the matter.
Sincerely,DimiDeveloper Support Engineer, MCPD Infragistics, Inc.www.infragistics.com/support
Thanks. The article you cited was very helpful to me.
I'd suggest enhancing that example, perhaps by adding an update panel with a submit button.
In the example's current state, if you edit the actor's name cell, then press the Enter key once to exit edit mode, then press the Enter key again (because there's no other apparent way to trigger the RowUpdating event), that causes the Delete button's click event instead of the expected Update.
I was able to cause RowUpdating by sorting on a column, but that may not be apparent to some users.
Thanks for the suggestion. It really make sense. If you would like to get the grid to trigger postback after a given row has been updated you can add Activation Behavior to the grid
In the example you referenced above, the band has no behaviors, and EnableInheritance = true for the WebHierarchicalDataGrid's behaviors.
I have a WebHierarchicalDataGrid that needs to have behaviors on the band, because I need to set the EditorID and/or ReadOnly properties on columns in the child band. When I have behavior code in both the WebHierarchicalDataGrid and the child band, then the code in the C# procedure WebHierarchicalDataGrid1_RowUpdating does not execute after I click the save button to trigger it.
What do I need to fix after adding cell editing and row adding behaviors in the child band? Can you think of anything else I need to change so that the code in WebHierarchicalDataGrid1_RowUpdating executes for Both Parent And child band updates?
Also... Is it a bad idea for me to post this question in this thread after I've verified one of the answers above? Does the thread's behavior change after one of the answers is verified?