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.
Syncfusion Feedback

Hiding Columns

Thread ID:

Created:

Updated:

Platform:

Replies:

20352 Oct 14,2004 05:20 PM UTC Oct 21,2004 06:38 PM UTC Windows Forms 8
loading
Tags: GridControl
Anthony Avella
Asked On October 14, 2004 05:20 PM UTC

I''m currently using grid version 2.1.0.61. Is there a faster way to hide multiple columns in the grid besides hiding them one at a time in a loop? Thanks.

Administrator [Syncfusion]
Replied On October 14, 2004 06:12 PM UTC

You can use this.gridDataBoundGrid1.Model.Cols.Hidden.SetRange.

Anthony Avella
Replied On October 19, 2004 05:40 PM UTC

The problem for me with your solution is that the columns I''d like to hide are not sequential. Is there any way I can directly link individual columns from the grid''s datatable to the grid and let them be visible and force the rest not to be visible? If possible would changes to those columns in the grid still update the underlying datatable? Thanks, Anthony

Anthony Avella
Replied On October 19, 2004 05:40 PM UTC

The problem for me with your solution is that the columns I''d like to hide are not sequential. Is there any way I can directly link individual columns from the grid''s datatable to the grid and let them be visible and force the rest not to be visible? If possible would changes to those columns in the grid still update the underlying datatable? Thanks, Anthony

Administrator [Syncfusion]
Replied On October 19, 2004 06:00 PM UTC

Another way to hide miscellaneous columns is to handle grid.Model.QueryColWidth. In the handler, set e.Size = 0 when e.Index points to a column you want hidden. You would also need to set e.Handled = true.

Anthony Avella
Replied On October 21, 2004 02:14 PM UTC

Instead of hooking up a datatable to the grid as a datasource, is there any way to hook up indiviual columns from the datatable to the grid as the datasource?

Administrator [Syncfusion]
Replied On October 21, 2004 02:51 PM UTC

If you use a virtual GridControl, you can do this. Handle QueryCellInfo and provide the data on demand by setting e.Style.CellValue based on the values of e.ColIndex and e.RowIndex. You would be free to get the data from any place, including certain columns in a datatable, or columns from other datatables, or whereever.

Anthony Avella
Replied On October 21, 2004 05:44 PM UTC

Can we make a grouping grid a virtual grid? It''s my impression that one must choose a grid type, virtual, grouping, datagrid, etc... If this is possible, please provide a sample of how to do this. Secondly, if I can have a virtual grouping grid, what is the performance difference for loading the grid vs. hooking up a datatable to the grid as it''s datasource? How is my grouping functionality affected? Thirdly, will the grid still be connected to the source of the data to allow updates in the grid to be reflected in the datatable we store the data in? Thanks

Administrator [Syncfusion]
Replied On October 21, 2004 06:38 PM UTC

You cannot have a true virtual groupinggrid. You can handle QueryCellStyleInfo in a grouping grid to dynamically provide data, but you cannot dynamically provide row counts and column counts as the grouping engine must have access to all the data to be able to group/filter things.

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.

Warning Icon 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.Close Icon

;