Aug 29, 2012, 8:28 PM
How do you display nested class data from a store in a GridPanel?
I have this Store:
<ext:Store ID="StoreStudentSpotlight" runat="server" OnReadData="StudentSpotlightReview_Refresh" PageSize="100" GroupDir="DESC" GroupField="statusCode" OnSubmitData="Store_Submit">
<Sorters>
<ext:DataSorter Property="StudentName" Direction="ASC" />
</Sorters>
<Model>
<ext:Model runat="server" IDProperty="StudentSpotlightID">
<Fields>
<ext:ModelField Name="StudentSpotlightID" />
<ext:ModelField Name="StudentEmplid" Mapping="spotlightedStudent.id" />
<ext:ModelField Name="StudentName" Mapping="spotlightedStudent.fullNameFormatted" />
<ext:ModelField Name="StudentMajor" Mapping="spotlightedStudent.major" />
<ext:ModelField Name="awardName" />
<ext:ModelField Name="statusCode" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
And I have these columns: <ext:Column runat="server" Text="StudentSpotlightID" ID="StudentSpotlightID" DataIndex="StudentSpotlightID" Width="60px" Hidden="true" />
<ext:Column runat="server" Text="Major" ID="StudentMajor" DataIndex="StudentMajor" Width="40px" />
<ext:Column runat="server" Text="Student" DataIndex="StudentName" Hideable="true" Width="70px" />
<ext:Column runat="server" Text="Award" ID="awardName" DataIndex="awardName" Width="65px" />
But when I load the page with the grid on it, it says there are no results and just keeps loading. If I take out the ModelField with the nested values it loads everything else fine. Is there something I'm missing for loading data from a nested class into a store and displaying it?