Jan 27, 2011, 2:49 PM
GridPanel showing only one column of data
Hi,
Stumbled across these .net components after searching for a gridview, with some more advanced features.
I seem to be having a problem with the GridPanel using an objectdatasource.
I've looked at the sample and tried to set it up on my page, but it is only showing one column of data.
Here is the code from my page:
I've double checked the field names are correct from the datasource.
The only difference between the field names are the _ between the words.
Does the GridPanel not like them, or am I missing something else?
Thanks,
Stumbled across these .net components after searching for a gridview, with some more advanced features.
I seem to be having a problem with the GridPanel using an objectdatasource.
I've looked at the sample and tried to set it up on my page, but it is only showing one column of data.
Here is the code from my page:
<ext:GridPanel ID="GridPanel1" runat="server" Height="300" Title="Candidate Details">
<Store>
<ext:Store DataSourceID="odsCandidates" runat="server">
<Reader>
<ext:JsonReader IDProperty="ID_NUMBER">
<Fields>
<ext:RecordField Name="CANDIDATE_NO" />
<ext:RecordField Name="UCI_NO" />
<ext:RecordField Name="LEARNER" />
<ext:RecordField Name="DATE_OF_BIRTH" Type="Date" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column ColumnID="candNo" Header="City & Guilds/Edexcel No" Locked="true" />
<ext:Column ColumnID="uciNo" Header="UCI No" />
<ext:Column ColumnID="fullName" Header="Candidate Name" />
<ext:Column ColumnID="dob" Header="Date Of Birth">
<Renderer Format="Date" />
</ext:Column>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel SingleSelect="true" runat="server" />
</SelectionModel>
<View>
<ext:LockingGridView runat="server" />
</View>
</ext:GridPanel>
<asp:ObjectDataSource ID="odsCandidates" runat="server" SelectMethod="GetStudents"
TypeName="StudentBLL" onselecting="odsCandidates_Selecting">
<SelectParameters>
<asp:Parameter Name="course" Type="String" />
<asp:Parameter Name="module" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
The only data that is showing in the GridPanel is the LEARNER column, all the other columns come back with no data.I've double checked the field names are correct from the datasource.
The only difference between the field names are the _ between the words.
Does the GridPanel not like them, or am I missing something else?
Thanks,