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.
ADAdministrator Syncfusion Team November 14, 2004 09:27 AM
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.
VBvbakerNovember 14, 2004 12:37 PM
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.