Nov 29, 2010, 7:37 PM
Help Bind Field
Tell please, as bind a field with store?
p.s. sorry for my curve engish
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAll"
TypeName="classDB.News_DB" />
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetAllForNews"
TypeName="classDB.Persons_DB" />
<ext:Store ID="StorePerson" runat="server" DataSourceID="ObjectDataSource2">
<Reader>
<ext:JsonReader IDProperty="PersonsID">
<Fields>
<ext:RecordField Name="PersonsID" Type="Int" />
<ext:RecordField Name="PersonsFirsname" />
<ext:RecordField Name="PersonsName" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:GridPanel ID="GridPanel1" runat="server" Title="Новости" Frame="true" AutoWidth="true">
<Store>
<ext:Store ID="Store1" runat="server" DataSourceID="ObjectDataSource1">
<Reader>
<ext:JsonReader IDProperty="NewsID">
<Fields>
<ext:RecordField Name="NewsID" />
<ext:RecordField Name="NewsDescription" />
<ext:RecordField Name="NewsText" />
<ext:RecordField Name="NewsDateTime" Type="Date" />
<ext:RecordField Name="NewsTitle" />
<ext:RecordField Name="NewsAuthorPersonsID" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel2" runat="server">
<Columns>
<ext:DateColumn DataIndex="NewsDateTime" Width="20" Header="Дата/время публикации"
Format="dd.MM.yyyy HH:mm" />
<ext:Column Header="Тема" Width="50" DataIndex="NewsTitle" />
<ext:Column Header="Описание" DataIndex="NewsDescription" />
<ext:Column Header="Автор" Width="30" DataIndex="NewsAuthorPersonsID" />
</Columns>
</ColumnModel>
<View>
<ext:GridView ID="GridView2" runat="server" ForceFit="true" />
</View>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel2" runat="server" />
</SelectionModel>
<Plugins>
<ext:RowExpander ID="RowExpander1" runat="server">
<Template ID="Template1" runat="server">
<Html>
<p><b>Текст новости:</b> {NewsText}</p>
<br />
</Html>
</Template>
</ext:RowExpander>
</Plugins>
<BottomBar>
<ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="10" DisplayInfo="true"
DisplayMsg="Показаны записи {0} - {1} из {2}" EmptyMsg="Записи отсутствуют" />
</BottomBar>
</ext:GridPanel>
need that instead of NewsAuthorPersonsID it was substituted PersonsFirsname+PersonsNamep.s. sorry for my curve engish