We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Parent Collapse Children when filtered

Thread ID:

Created:

Updated:

Platform:

Replies:

42711 Apr 4,2006 04:57 PM Apr 10,2006 01:06 AM Windows Forms 3
loading
Tags: GridControl
Chris Wescott
Asked On April 4, 2006 04:57 PM

Hi, I am using a GGC with a dataview as a datasource for it. When I filter the parent values with a child row expanded, the parent row collapses. I need to be able to filter parents while keeping the child rows visible. IS this possible? I have included a code snippet of how I am trying to achive the filter. Form1.GridGroupingControl1.BeginUpdate() Dim MyGridDV As DataView Dim DV As New DataView Dim MyDS As New DataSet MyGridDV = Form1.GridGroupingControl1.DataSource MyDS = MyGridDV.DataViewManager.DataSet DV = MyDS.Tables(0).DefaultView DV.RowFilter = ("Digital_data_exist =''1''") ''Form1.GridGroupingControl1.DataSource = MyGridDV Form1.GridGroupingControl1.EndUpdate(True) Regards, Chris Wescott

Administrator [Syncfusion]
Replied On April 5, 2006 01:49 AM

Hi Chris, The records in a parent table can be filtered with the help of the TableDescriptor.RecordFilters with out the child table getting collapsed. Below is a code snippet. Let us know if this serves your need. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.GridGroupingControl1.TableDescriptor.RecordFilters.Add("[Digital_data_exist] = ''1''") End Sub Regards, Calvin.

Chris Wescott
Replied On April 7, 2006 03:36 PM

This is Great, If I wanted to implement this type of a record filter on my nested table. I tried something like this but it didn''t work. Dim TbDsc As New GridTableDescriptor TbDsc = GridGroupingControl1.TableDescriptor.Relations(0).ChildTableDescriptor tbdsc.TableDescriptor.RecordFilters.Add("[My_Row_Type] = ''MP''") Is there a different way I should be implementing this. Regards, Chris

Administrator [Syncfusion]
Replied On April 10, 2006 01:06 AM

Hi Chris, Below is a code snippet that filters record from both parent and child table. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim parentTableDescriptor As GridTableDescriptor = Me.GridGroupingControl1.GetTable(parentTableName).TableDescriptor parentTableDescriptor.RecordFilters.Add("[SomethingEXIST] = ''1''") Dim childTableDescriptor As GridTableDescriptor = Me.GridGroupingControl1.GetTable(childTableName).TableDescriptor childTableDescriptor.RecordFilters.Add("[SomethingEXIST] = ''1''") Me.GridGroupingControl1.Table.InvalidateCounterTopDown(True) End Sub Regards, Calvin.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;