Oct 08, 2012, 6:15 PM
[CLOSED] ControlParameter PropertyName for selected value of Combobox
I have two questions on how to use an object data source together with a combo box:
1. I am trying to use the selected value of a combobox as the control parameter for the select method of a object data source. Which property of the EXT combobox do I use? ('SelectedItem' generates the error "Type 'Ext.Net.ListItem' in Assembly 'Ext.Net, Version=2.1.0.21329, Culture=neutral, PublicKeyToken=2e12ce3d0176cd87' is not marked as serializable. " , 'SelectedValue' as with a standard ASP drop down list does not work.
2. Do I need to specify DirectEvents to pick up any selection changes and then pass it on to the object data source?
Here is the store:
Manni
1. I am trying to use the selected value of a combobox as the control parameter for the select method of a object data source. Which property of the EXT combobox do I use? ('SelectedItem' generates the error "Type 'Ext.Net.ListItem' in Assembly 'Ext.Net, Version=2.1.0.21329, Culture=neutral, PublicKeyToken=2e12ce3d0176cd87' is not marked as serializable. " , 'SelectedValue' as with a standard ASP drop down list does not work.
<asp:ObjectDataSource ID="odsStatus" runat="server" SelectMethod="GetStatus" TypeName="Test.Models.Application" >
<SelectParameters>
<asp:ControlParameter ControlID="cbApplicationStatus" Name="ParentNode" PropertyName="SelectedValue" Type="Int32"
DefaultValue="101"/>
</SelectParameters>
</asp:ObjectDataSource>
2. Do I need to specify DirectEvents to pick up any selection changes and then pass it on to the object data source?
<ext:ComboBox ID="cbApplicationStatus" runat="server" Width="130" Editable="false"
DisplayField="Status" ValueField="Node"
StoreID="storeApplicationStatusChildren" QueryMode="Local">
<DirectEvents>
<Change OnEvent="cbApplicationStatus_Change"></Change>
</DirectEvents>
</ext:ComboBox>
Here is the store:
<ext:Store ID="storeApplicationStatusChildren" runat="server" DataSourceID="odsStatus">
<Model>
<ext:Model ID="modelApplicationStatusChildren" runat="server" IDProperty="Node">
<Fields>
<ext:ModelField Name="Status" Type="String" />
<ext:ModelField Name="ParentNode" Type="Int" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
Any help is greately appricated.Manni
Last edited by Daniil; Nov 05, 2012 at 3:37 PM.
Reason: [CLOSED]