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

Hierarchy Child-Table-Columns display in Parent-Row ?

1 Answer 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bernd Wessels
Top achievements
Rank 1
Bernd Wessels asked on 10 Sep 2010, 12:26 AM
Hi
I have a hierarchy build of two tables:
- Customer    [CustomerID] [Name]
  - Order        [OrderID] [CustomerID] [Index] [Description]

I only want to show the Customer rows, but they should include a column showing the [Description] of the Order with [Index]==4.

This should be done by the Grid. I don't want to do it via specialized SQL which deforms my Customer entity. I still want to be able to use CRUD without any magic.

Cheers

Bernd

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 15 Sep 2010, 08:49 AM
Hello Bernd,

To implement the desired functionality, I suggest that you use the following column:
<telerik:GridTemplateColumn HeaderText="Description" UniqueName="Description" DataField="Description">
      <ItemTemplate>
          <asp:Label ID="lblDescription" runat="server" Text='<%# Eval("Description") %>' Visible='<%# (int)Eval("Index") == 4 %>' />
      </ItemTemplate>                       
  </telerik:GridTemplateColumn>

I hope this helps.

All the best,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Bernd Wessels
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or