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. Image for the cookie policy date
close icon

Hiding Multiple Columns in a GridGroupingControl

Is there a way to hide a range of columns (or all columns associated with a single table in the datasource) in a GridGroupingControl? I want to display the Details part of a Master/Details relation in the GGC. However, since the datasource includes the master as well as the details columns, all columns show up in the grid and the Master columns have to be marked as hidden, like: this.gridGroupingControl1.TableModel.HideCols["Master_ColumnName"] = true; This can lead to a lot of coding overhead for master tables with a lot of columns. TIA. --Van Baker

2 Replies

AD Administrator Syncfusion Team November 14, 2004 02:27 PM UTC

I am not sure I understand how you will navigate the details grid if the master grid has no columns in it. You can remove the columns using this.parentTableGrid.TableDescriptor.Columns.Remove. This actually removes the columns as opposed to hiding them as the code you listed does.

VB vbaker November 14, 2004 05:37 PM UTC

The Master is selected from a combobox. Based on that selection, a single master row fills a datatable which is bound to controls on a form, and the details for that master appear in the grid. I used this approach to attempt to reduce network traffic between the app and the database server, and to simplify master/detail inserts, deletes and updates to the database. Interestingly, I just installed the 3.0 Beta and the master columns no longer are mixed with the details columns when the GGC datasource is the details side of the relationship. So, my issue will be resolved by 3.0, it would appear. Thanks, Van Baker

Live Chat Icon For mobile
Up arrow icon