Formview on updating
I first presumed that auto post back would update the grid view, but as it is not the data view that is updated, the system does not automatically update it.
One way I have found to get around this pain, is to create a custom method which rebinds the data source to the grid view after the form view has been updated.
I'm still new to and i'm losing the will to live with this!
Thanks Private Sub Form View2_Item Command(sender As Object, e As System.
Data Item property in the On Data Binding event so that I can fill a dropdownlist with the correct value by casting the enum type to an int.
However,when trying to get the data OUT of the control into the business object I can't seem to get access to the Data Item (i.e.
I tried all kinds of things to get hold of the business object but nothing seems to work. I'm using Object Datasource in combination with a Formview. I have a business object property which I can't update through the normal binding since it's a custom enum type.
What I have done to narrow down the problem: (1) Replace Object Data Source with an equivalent Access Data Source : same problem.
(2) Check that sequence, parameter names and number of Bind("xxx") in Edit Item Template is identical to Object Data Source's parameter collection (3a) Create a new Test.aspx, using Access Data Source, update command works.
(3b) Then I copy and paste the exact coding from the problem aspx to ....this modified works, to my amazement !!! This aspx works......until not knowing when.....update command problem happen again.
Work around I am going to do: Programmatically fill in datasource's parameters and promatically invoke datasource's updating event. But I am so reluctant because with so many aspx I have written, I know ASP.
headline should be Taming the Form View and Grid View because otherwise it's misleading article.