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

[Solved] Silverlight hierarchical gridview (Search)

3 Answers 143 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
V
Top achievements
Rank 1
V asked on 03 Aug 2010, 03:43 PM
Hello,

I'm new to Silverlight, and am trying to figure it all out. I've read the documentation but am not clear on the best way to approach the issue i'm having.

Issue:
I'm trying to create a search page using the Silverlight RadGridView.  This way, it's fast..and there's no need for a huge form with textboxes and dropdowns, etc. This is fine for one level of searching.

However, I need child grids. The filtering and grouping is perfect when "searching" on the parent level, but presents a problem when searching on the child level.

The child grids obviously have different column headings than the parent grids, and when performing a search on a childs grid data...the overall grid needs to be grouped in a logical way to present the search results.

For example: Suppose all of the child grids have a column called "Specialty". When the user searches for "Developer" (perhaps in an external textbox...or from the parent grid somehow?), how can I show all the Items (including parents) who's children fall under the "Developer" specialty? Is there a way to filter and sort all child grids from the parent grid? I guess right now i'm just looking for ideas and trying to figure out what capabilities the Silverlight RadGridView has in connection with this specific scenario.

Right now, the only logical way I can think of is to separate the two on two different pages--one page/grid for parent items and one page/grid for child items.

Can anyone point me in the right direction?

Thanks in advance!

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 03 Aug 2010, 03:59 PM
Hi,

 Why not use classic master/detail with two separate grids instead hierarchy? In this case you can have two separate textboxes for search master and detail data and the second grid (detail) will show only data for selected row in the first grid. You can of course ignore the master/detail relation for the second grid and search all data if needed instead only currently selected child data. 

Greetings,
Vlad
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
0
V
Top achievements
Rank 1
answered on 03 Aug 2010, 04:21 PM
Thanks for the reply!

Can you do a master/detail with the silverlight grid? The only thing I could find is documentation on "hierarchical" grids...

Thanks!
0
Vlad
Telerik team
answered on 03 Aug 2010, 04:41 PM
Hi,

You can do this very easily. Let's say you have a class Customer with some IList property Orders. If you bind the master grid to IList of Customers you can bind the child grid to SelectedItem.Orders:

<telerik:RadGridView x:Name="telerik:RadGridView1" ItemsSource="{Binding Customers}" />
<telerik:RadGridView ItemsSource="{Binding SelectedItem.Orders, ElementName=RadGridView1}" />

Sincerely yours,
Vlad
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
GridView
Asked by
V
Top achievements
Rank 1
Answers by
Vlad
Telerik team
V
Top achievements
Rank 1
Share this question
or