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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridListControl Hiding Columns

Thread ID:

Created:

Updated:

Platform:

Replies:

2147 Dec 18,2002 02:05 PM UTC Dec 18,2002 02:19 PM UTC WinForms 1
loading
Tags: GridControl
Jeff Walstrom
Asked On December 18, 2002 02:05 PM UTC

I am using a CellType of GridListControl with the following code: gcSection(intLoop, partColumn.PartNumber).CellType = "GridListControl" gcSection(intLoop, partColumn.PartNumber).DataSource = dvChildParts gcSection(intLoop, partColumn.PartNumber).DisplayMember = "PartNumber" gcSection(intLoop, partColumn.PartNumber).ValueMember = "ChildPartNumberID" gcSection(intLoop, partColumn.PartNumber).ExclusiveChoiceList = True gcSection(intLoop, partColumn.PartNumber).CellValue = strPartNumberID I need to hide certain colums of the datasource from showing to the users when the GridListControl is displayed. How do I hide the columns in the display GridListControl? I don't want to remove the columns from the datasource since I retrieve values later. Any information would be appreciated. Jeff

Administrator [Syncfusion]
Replied On December 18, 2002 02:19 PM UTC

Jeff, Since the GridListControl that is displayed in the dropdown is generated every time the cell becomes active, you would need to handle this task dynamically. One way to do this is to use teh CurrentCellShowingDropDown event, and hide the column immediately before it is dropped. Here is code that would do this. You might want check explicitly row or column index values (cc.RowIndex or cc.ColIndex) to make sure you are on the proper cell.
Private Sub gridControl1_CurrentCellShowingDropDown(sender As Object, e As Syncfusion.Windows.Forms.Grid.GridCurrentCellShowingDropDownEventArgs)
    Dim cc As GridCurrentCell = Me.gridControl1.CurrentCell
    If TypeOf cc.Renderer Is GridDropDownGridListControlCellRenderer Then
        Dim grid As GridControl = CType(cc.Renderer, GridDropDownGridListControlCellRenderer).ListControlPart.Grid
        grid.Model.Cols.Hidden(1) = True
    End If
End Sub 'gridControl1_CurrentCellShowingDropDown 

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

;