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.

GDBG - No Row Header - No Col Header = No Keyboard Nav

Thread ID:

Created:

Updated:

Platform:

Replies:

59310 Apr 10,2007 03:05 PM Apr 11,2007 11:04 AM Windows Forms 2
loading
Tags: GridControl
Roger Peters
Asked On April 10, 2007 03:05 PM

Hi,
When I set the GDBG to show no row headers or column headers, the keyboard navigating functionality is lost. No shift + keys, no keys no nothing. It is vital to my project I have this functionality and it doesn't really make sense to disable it. I do have AllowSelection = Any and also I am using ListBoxSelection = MultiExtended. Attached is an example of what I mean.
Thanks
Roger

SyncFusionGridTesting.zip

Administrator [Syncfusion]
Replied On April 11, 2007 10:28 AM

Changes were made in the version 4 code to optimize the way hidden rows and columns are being handled. This code change caused a problem when you hide the row/column headers using

Me.GridDataBoundGrid1.Properties.ColHeaders = False
Me.GridDataBoundGrid1.Properties.RowHeaders = False


A work around for a GridControl is to just set grid.ColWidths(0) = 0 and grid.RowHeights(0) = 0 to hide the row and column headers.

In a GridDataBoundGrid though, it requires handling an event on the model to get set the colwidth to zero to hide the row header. If your sample, if you remove the property setting above, but instead subscribe to these two events (using the same handler), the arrow keys work as expected.

'subscribe to the events in form load
AddHandler GridDataBoundGrid1.Model.QueryColWidth, AddressOf model_QueryColWidth
AddHandler GridDataBoundGrid1.Model.QueryRowHeight, AddressOf model_QueryColWidth

'the event handler
Private Sub model_QueryColWidth(ByVal sender As Object, ByVal e As GridRowColSizeEventArgs)
If e.Index = 0 Then
e.Size = 0
e.Handled = True
End If
End Sub

Roger Peters
Replied On April 11, 2007 11:04 AM

Hi,
Awesome that works thanks alot!

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.

;