Microsoft KB Archive/254794

= FIX: Row in Grid Remains Highlighted After You Select Another Row =

Article ID: 254794

Article Last Modified on 8/19/2005

-

APPLIES TO


 * Microsoft Windows CE Toolkit for Visual Basic 6.0

-



This article was previously published under Q254794



SYMPTOMS
When the SelectionMode property of the GridCtrl control is set to flexSelectionByRow, the row in the grid that is highlighted when the form that contains the grid is first displayed remains highlighted when you select other rows in the control.



STATUS
This problem was corrected in MSCEGrid.dll version 6.0.0.9313 for the Windows CE Toolkit for Visual Basic 6.0.

To obtain MSCEGrid.dll version 6.0.0.9313, see the following article in the Microsoft Knowledge Base:

254796 FILE: Updated Grid Control for Handheld PC Platform



Steps to Reproduce Behavior
 Create a new Windows CE HPC Project in Visual Basic. Form1 is created by default. On the Project menu, click Components, and add the Microsoft CE Grid Control 6.0 library to the project. Add a GridCtrl control to Form1.  Paste the following code into the code module of Form1: Option Explicit

Private Sub Form_Load ' Assign the dimensions of the grid control. GridCtrl1.Cols = 3 GridCtrl1.Rows = 4 ' Highlight the third row in the grid. GridCtrl1.Row = 2 GridCtrl1.SelectionMode = flexSelectionByRow End Sub  Run the project in emulation or on a remote device. Notice that the third row in the grid is highlighted. Select the first row in the grid. Notice that the third row stays highlighted even after you select another row.</li></ol>

<div class="references_section">