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

Search

6 Answers 127 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Leo
Top achievements
Rank 2
Leo asked on 05 Nov 2010, 03:08 PM
Hello,

How do I make a search on my hierarchical data grid view that is on the bottom level?

Let's say I have a PurchaseOrder , PurchaseOrderDetails, and PurchaseOrderReceipts. 

Purchase Order - Parent

Purchase OrderDetails - Second

PurchaseOrderReceipts - Third

Is there a way I could search and filter fields that are on the level 3 hierarchy and find the corresponding items that are referenced in table 3. 

Let's say I have a ProductID on table 1 as PK, ProductOrderID on table 2 and LotID on table 3, when I want to search using LotID how do I display the rest of the details from level 3 to parent?

6 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 11 Nov 2010, 08:23 AM
Hello,

 Can you post more info about your scenario? By default every child table header filtering options are enabled.

All the best,
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
Leo
Top achievements
Rank 2
answered on 11 Nov 2010, 02:41 PM
Here's the scenario. Let's say I have three separate tables that are connected with each other.

1st Table : Products
2nd Table : ProductsDetails
3rd Table : ProductsReceipts

I'll try to use the hierarchical data grid in telerik that's not a problem with me. Now my scenario is this, I have no problem searching fields from Products Table because it is the parent grid. What if I would like to search using the third table or second table? Let's say I have a field in my ProductsReceipt called ProductsReceiptOrderID, I would like to search using that kind of field and it will load the fields that are connected in the second and first table? Is this possible?
0
Vlad
Telerik team
answered on 11 Nov 2010, 02:46 PM
Hi,

 In my opinion you should use the grid SelectedItem (or CurrentItem) to get access to the child data. Just cast some of them to your object type and access desired property. In this case however you search will depend of the grid selection - other approach can be to use separate search box for every child table defined using HierarchyChildTemplate. 

Best wishes,
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
Leo
Top achievements
Rank 2
answered on 11 Nov 2010, 02:48 PM
If im going to use that isn't that im still using the parent grid? What if I just statically load the three data grid and when I click filtered that's the time it will bind the datacontext to the datagrid?
0
Leo
Top achievements
Rank 2
answered on 29 Nov 2010, 01:53 PM
Hi could you provide a sample code on how do I implement it in the RadData Grid View on selectedItem then it will get the child ?
0
Maya
Telerik team
answered on 02 Dec 2010, 12:44 PM
Hi Leo,

I am sending you a sample project demonstrating how to reach the items in the child grid base on the selected item in the parent.
I hope that helps.
 

Kind regards,
Maya
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
GridView
Asked by
Leo
Top achievements
Rank 2
Answers by
Vlad
Telerik team
Leo
Top achievements
Rank 2
Maya
Telerik team
Share this question
or