C
Christian Petersen
Hi,
I've got a WebForm with a GridView, I want to databind this to an
ObjectDataSource (ODS1).
The input parameters for the ODS1 is placed on a Web UserControl, in the
form of public properties that accesses databound DropDownLists. Like this:
<asp:ControlParameter ControlID="WUC1" DefaultValue="0" Name="Id"
PropertyName="SelectedId" Type="Int32" />
The DropDownLists are databound with ObjectDataSources also.
But the GridView on the WebForm is databound before the UserControl, so I'm
getting a FormatException, because the DropDownLists are empty.
Is there a best practice pattern for this if you want to use
ObjectDataSources?
In the olden days (ASP.NET 1.1) I usually databound the DataGrid in the
prerender event, after the UserControls were loaded.
Mvh,
Christian
I've got a WebForm with a GridView, I want to databind this to an
ObjectDataSource (ODS1).
The input parameters for the ODS1 is placed on a Web UserControl, in the
form of public properties that accesses databound DropDownLists. Like this:
<asp:ControlParameter ControlID="WUC1" DefaultValue="0" Name="Id"
PropertyName="SelectedId" Type="Int32" />
The DropDownLists are databound with ObjectDataSources also.
But the GridView on the WebForm is databound before the UserControl, so I'm
getting a FormatException, because the DropDownLists are empty.
Is there a best practice pattern for this if you want to use
ObjectDataSources?
In the olden days (ASP.NET 1.1) I usually databound the DataGrid in the
prerender event, after the UserControls were loaded.
Mvh,
Christian