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. Image for the cookie policy date
close icon

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

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

2 Replies

AD Administrator Syncfusion Team April 11, 2007 02:28 PM UTC

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


RP Roger Peters April 11, 2007 03:04 PM UTC

Hi,
Awesome that works thanks alot!

Loader.
Live Chat Icon For mobile
Up arrow icon