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.

GridDataBoundGrid Hide Columns

Thread ID:

Created:

Updated:

Platform:

Replies:

23386 Jan 11,2005 12:08 PM Jan 11,2005 01:05 PM Windows Forms 2
loading
Tags: GridControl
Tito Toro
Asked On January 11, 2005 12:08 PM

I have a GridDataBoundGrid that I’m binding to a DataView with 4 columns and n rows. I don’t want to display the first column as it is simply a unique identifier column that the end user doesn’t need to see. How do exclude that column from binding?

Tito Toro
Replied On January 11, 2005 12:31 PM

I found that this works: int i = 1; Grid2.Model.Cols.Hidden[i] = true; >I have a GridDataBoundGrid that I’m binding to a DataView with 4 columns and n rows. I don’t want to display the first column as it is simply a unique identifier column that the end user doesn’t need to see. How do exclude that column from binding? >

Administrator [Syncfusion]
Replied On January 11, 2005 01:05 PM

As Tito suggested, you can hide the columns so they do not show in your grid. Another option is to add GridBoundColumn objects for each column that you want to see to the grid.GridBoundColumns collections. //add col1 GridBoundColumn gbc = new GridBoundColumn(); gbc.MappingName = "Col1"; grid.GridBoundColumns.Add(gbc); //add col2 gbc = new GridBoundColumn(); gbc.MappingName = "Col2"; grid.GridBoundColumns.Add(gbc); //etc

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.

;