Dec 01, 2011, 9:09 PM
[CLOSED] How to bind dictionary object to RecordField?
Hello,
I have a Product object which has an attribute of type dictionary with it.
I can bind the product object fine but when it comes to display the data from the dictionary I am only seeing object object in the column.
Can somebody please provide me some information on how to do it?
I have two screen shots attached with this post for reference. 1 is the Products object and the second in the GridPanel showing the problem.
Here is my aspx part. The grid binding is done in the code behind.
I have a Product object which has an attribute of type dictionary with it.
I can bind the product object fine but when it comes to display the data from the dictionary I am only seeing object object in the column.
Can somebody please provide me some information on how to do it?
I have two screen shots attached with this post for reference. 1 is the Products object and the second in the GridPanel showing the problem.
Here is my aspx part. The grid binding is done in the code behind.
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMain" Runat="server">
<ext:GridPanel ID="clGridPanelProducts" Title="Available Products" AutoHeight="false" Width="870" Height="600" runat="server" Draggable="false">
<Store>
<ext:Store Id="Products" runat="server" SerializationMode="Complex">
<Reader>
<ext:JsonReader IDProperty="SKUID">
<Fields>
<ext:RecordField Name="SKUID" Type="Int"></ext:RecordField>
<ext:RecordField Name="SKUNumber" Type="String"></ext:RecordField>
<ext:RecordField Name="SKUName" Type="String"></ext:RecordField>
<ext:RecordField Name="Content" Type="String"></ext:RecordField>
<ext:RecordField Name="ProductMessages" IsComplex="true"></ext:RecordField>
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel ID="clColumnModelSearchResults" runat="server">
<Columns>
<ext:Column Header="Number" Width="50" DataIndex="SKUNumber"></ext:Column>
<ext:Column Header="Name" Width="125" DataIndex="SKUName"></ext:Column>
<ext:Column Header="Content" Width="75" DataIndex="Content"></ext:Column>
<ext:ImageCommandColumn Width="75" Hideable="false" ColumnID="SKUID" DataIndex="SKUID">
<Commands>
<ext:ImageCommand CommandName="Add" Style="text-decoration: 'underline'; font-weight: bold;" Text="Add" IconCls="AddProductsIcon"></ext:ImageCommand>
</Commands>
</ext:ImageCommandColumn>
<ext:Column Width="75" Header="Can Order" Hideable="true" DataIndex="bitHideBackProductVersion" Tooltip="If the product is not available to order it might mean it is temporarily unavailable.">
</ext:Column>
<ext:Column Header="Msg" Width="125" DataIndex="ProductMessages">
</ext:Column>
</Columns>
</ColumnModel>
</ext:GridPanel>
</asp:Content>
Last edited by Daniil; Dec 09, 2011 at 12:09 PM.
Reason: Marked as [CLOSED]. No requested info was provided.