This is a migrated thread and some comments may be shown as answers.

Telerik RadGrid - One

1 Answer 19 Views
Grid
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 29 Oct 2008, 10:17 AM

Hello,
I have a telerik radgrid with two item templates. Categories are appeared at the left item template and related categories at the right. I would like every time i choose one item at the left side , only one item (one row) to be appeared and not all. Thank you very much.

This is the aspx code:

 

<

telerik:RadGrid ID="cr" runat="server" AutoGenerateColumns="false" Skin="Vista" EnableViewState="false">

 

 

 

 

<MasterTableView>

 

 

 

 

<Columns>

 

 

 

 

<telerik:GridTemplateColumn HeaderText="">

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:HyperLink runat="server" Text='<%# Eval("sDescr") %>' NavigateUrl='<%# String.Format("CategoryRelations2.aspx?fromCategoryID={0}", Eval("lRow_Id")) %>'></asp:HyperLink>

 

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

<telerik:GridTemplateColumn HeaderText="">

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Repeater ID="RelatedCategories" runat="server" DataSource="<%# GetRelatedCategories(Container.DataItem as Category) %>">

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:HyperLink runat="server" Text='<%# Eval("sDescr") %>' NavigateUrl='<%# String.Format("CategoryRelations2.aspx?fromCategoryID={0}&toCategoryID={1}", DataBinder.Eval(Container, "Parent.Parent.Parent.DataItem.lRow_Id"), Eval("lRow_Id")) %>'></asp:HyperLink>

 

 

 

 

</ItemTemplate>

 

 

 

 

<SeparatorTemplate>

 

 

 

,

 

</SeparatorTemplate>

 

 

 

 

</asp:Repeater>

 

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

</Columns>

 

 

 

 

</MasterTableView>

 

 

 

 

</telerik:RadGrid>

 

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 31 Oct 2008, 11:11 AM
Hi George,

You can relate the two sections, or even relate two grids, or a grid and another control. In this way, once you select a row, the relevant information will be displayed.

All the best,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
George
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or