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.

Problem with GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

31093 Jun 29,2005 07:30 PM Jun 30,2005 09:51 AM Windows Forms 3
loading
Tags: GridControl
Shuyang He
Asked On June 29, 2005 07:30 PM

Hi, This is very weird Problem. I wrote one simple program to test it Here are steps to test it: 1) Click on the First row of the DataGrid. 2) Tab through the field until “Trx Number” column disappear. (Tab should be Stop at “Broker” column) 3) Now Click Left arrow on the Scroll Bar, I could not found “Trx Number” anymore. I think this is because I hide “Symbol” Column in my form load. If I show all the columns, everything is fine. Thanks a lot. --Shuyang he grid_3831.zip

Administrator [Syncfusion]
Replied On June 29, 2005 08:05 PM

If you want to hide a column, do not add a GridBoundColumn for it instead of trying to set grid.Model.Cols.Hidden.
For count As Integer = 0 To Me.all_Columns.Length - 1
            If all_Columns(count) <> "Symbol" Then
                Dim aGridColumn As Syncfusion.Windows.Forms.Grid.GridBoundColumn
                aGridColumn = New Syncfusion.Windows.Forms.Grid.GridBoundColumn
                aGridColumn.MappingName = all_Columns(count)
                Me.GridDataBoundGrid1.GridBoundColumns.Add(aGridColumn)
            End If
        Next

Shuyang He
Replied On June 30, 2005 09:18 AM

Hi, Thanks for your help. But my project need show and hide columns frequently based on different selections. It is not very good approach to recreate GidColumns every time I simply want to hide or show columns. By the way, I do think this is bug in the GridDataBoundGrid. Is that possible it can be fixed next release? Thanks. --Shuyang he >If you want to hide a column, do not add a GridBoundColumn for it instead of trying to set grid.Model.Cols.Hidden. > >
>For count As Integer = 0 To Me.all_Columns.Length - 1
>            If all_Columns(count) <> "Symbol" Then
>                Dim aGridColumn As Syncfusion.Windows.Forms.Grid.GridBoundColumn
>                aGridColumn = New Syncfusion.Windows.Forms.Grid.GridBoundColumn
>                aGridColumn.MappingName = all_Columns(count)
>                Me.GridDataBoundGrid1.GridBoundColumns.Add(aGridColumn)
>            End If
>        Next
>
>

Administrator [Syncfusion]
Replied On June 30, 2005 09:51 AM

If you do not want to control the displayed columns using the GridBoundColumnCollection, then setting these two properties will hide the colde and avoid teh scrolling problem. Me.GridDataBoundGrid1.Model.Cols.Hidden("Symbol") = True Me.GridDataBoundGrid1.Model.ColWidths("Symbol") = 0

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.

;