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

Hiding columns in GGC and scroll using keyboard causing the application to freeze

Thread ID:

Created:

Updated:

Platform:

Replies:

72403 Mar 17,2008 10:12 PM UTC Mar 24,2008 10:57 PM UTC WinForms 5
loading
Tags: GridControl
Mike
Asked On March 17, 2008 10:12 PM UTC

Hi,
I tried to hide columns in Grid Grouping Contol using the following methods:
ggc.TableModel.Cols.Hidden(str) = True
or
ggc.TableModel.ColWidths(str) = 0

For some reason, if I try to scroll to the right using keyboard, the application will freeze. Sample attached

Do you know any properties or work around I should set to avoid this to happen. We've been using this method all over the place in our application and it would be great if the solution won't be changing the whole logic in the grid.

Cheers



GridHideColumns.zip

Mike
Replied On March 19, 2008 07:28 PM UTC

Hi,
Can anyone help me on this? We're nearing the final stage of the project and this issue is holding us up.

Cheers,

>Hi,
I tried to hide columns in Grid Grouping Contol using the following methods:
ggc.TableModel.Cols.Hidden(str) = True
or
ggc.TableModel.ColWidths(str) = 0

For some reason, if I try to scroll to the right using keyboard, the application will freeze. Sample attached

Do you know any properties or work around I should set to avoid this to happen. We've been using this method all over the place in our application and it would be great if the solution won't be changing the whole logic in the grid.

Cheers



GridHideColumns.zip


Administrator [Syncfusion]
Replied On March 19, 2008 09:58 PM UTC

Hi

Please use VisibleColumns.Remove method to hide the column in a groupinggrid:

this.gridGroupingControl1.TableDescriptor.VisibleColumns.Remove(“ColumnName”);

Please let me know if this helps.

Best regards,
Johnson



Mike
Replied On March 20, 2008 02:09 AM UTC

Hi Johnson, thanks for the reply.

The problem is we have been using TableModel.NameToColIndex("HiddenColumnName") to get the columnIndex and TableModel(rowIndex,colIndex).CellValue to get the value of a cell in the hidden column and it won't work if we use VisibleColumns property as you suggested.

Is this a known bug with GGC as it works fine with GDBG? Have you got any other work around on this as we're not keen to rewrite a big chunk our code at this stage.

Cheers,



>Hi

Please use VisibleColumns.Remove method to hide the column in a groupinggrid:

this.gridGroupingControl1.TableDescriptor.VisibleColumns.Remove(“ColumnName”);

Please let me know if this helps.

Best regards,
Johnson





Administrator [Syncfusion]
Replied On March 20, 2008 11:31 PM UTC

Hi Myke,

You can get the hidden column value by using the Record.GetValue() method in QueryCellStyleInfo event.

Syncfusion.Grouping.Record rec = e.Style.TableCellIdentity.DisplayElement.GetRecord() as Syncfusion.Grouping.Record;

if (rec != null)
{
object val;
val = rec.GetValue("HiddenColName");
if( val != null )
e.Style.CellTipText = val.ToString() ;
}

Please refer the sample to implement this.

http://websamples.syncfusion.com/samples/Grid.Windows/F72403_up/Get_Hide_Rec_.zip


Best regards,
Johnson



Mike
Replied On March 24, 2008 10:57 PM UTC

Hi Johnson,
thanks for your reply. The solution you provided requires heaps of code changes in our application at this stage.
I've found other work around by handling the TableControlMoveCurrentCellDirection event.

This thread shows how to do this.

http://www.syncfusion.com/support/forums/message.aspx?MessageID=67977

Cheers,

>Hi Myke,

You can get the hidden column value by using the Record.GetValue() method in QueryCellStyleInfo event.

Syncfusion.Grouping.Record rec = e.Style.TableCellIdentity.DisplayElement.GetRecord() as Syncfusion.Grouping.Record;

if (rec != null)
{
object val;
val = rec.GetValue("HiddenColName");
if( val != null )
e.Style.CellTipText = val.ToString() ;
}

Please refer the sample to implement this.

http://websamples.syncfusion.com/samples/Grid.Windows/F72403_up/Get_Hide_Rec_.zip


Best regards,
Johnson





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

;