Disable multi-row select in MSHFlexGrid 
Author Message
 Disable multi-row select in MSHFlexGrid

 I am using MSHFlexGrid (VB 6.0) and want to allow user selection by
row, but only allow a single row to be selected at a time. The
MSHFlexGrid properties are:
   - AllowBigSelection is unchecked
   - Highlight = Always
   - FocusRect = None
   - SelectionMode = By Row

This gives me full-row selection, but I can still select multiple
contiguous rows.
--
   ---tnx, mike

Sent via Deja.com
http://www.*-*-*.com/



Fri, 04 Jul 2003 21:50:38 GMT  
 Disable multi-row select in MSHFlexGrid

Quote:

>  I am using MSHFlexGrid (VB 6.0) and want to allow user selection by
> row, but only allow a single row to be selected at a time. The
> MSHFlexGrid properties are:
>    - AllowBigSelection is unchecked
>    - Highlight = Always
>    - FocusRect = None
>    - SelectionMode = By Row

> This gives me full-row selection, but I can still select multiple
> contiguous rows.
> --
>    ---tnx, mike

> Sent via Deja.com
> http://www.deja.com/

PS: Is there a way to 'unselect' everything in the grid?
--
   ---tnx, mike

Sent via Deja.com
http://www.deja.com/



Fri, 04 Jul 2003 23:12:43 GMT  
 Disable multi-row select in MSHFlexGrid



Quote:
> I am using MSHFlexGrid (VB 6.0) and want to allow user selection by
> row, but only allow a single row to be selected at a time. The
> MSHFlexGrid properties are:
>    - AllowBigSelection is unchecked
>    - Highlight = Always
>    - FocusRect = None
>    - SelectionMode = By Row

> This gives me full-row selection, but I can still select multiple
> contiguous rows.
> --
>    ---tnx, mike

Hello Mike,

Thank you very much, for pointing me to an bug in my App. I read your post
and
thought "hey thats the way I do it, but it works in my app". Then I tried it
and
it really selected more than one row.

But now to your reward:

you should add this event handler to your App and it will work.

   Private Sub Grid_SelChange()
       If Grid.RowSel <> Grid.Row Then
          Grid.Row = Grid.RowSel
          Grid.col = 0
          Grid.ColSel = Grid.Cols - 1
       End If
   End Sub

"Grid" is the Name of my FlexGrid.

The if Statement is important, since setting the Properties will also raise
the SelChange Event.

the Col and Colsel Properties must be set, because if they are missing your
row will get marked,
but the selection is not shown (with blue bachground).

Greetings Rainer



Fri, 04 Jul 2003 23:37:17 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. disable multi-select on MSHFlexGrid

2. Preventing multi-row selection in MSHFlexGrid?

3. Triggering Select Row with MSHFlexGrid?

4. Selecting a row in MSHFlexGrid

5. MSHFlexGrid, select row by mouse over

6. MSHFlexgrid: Making A Selected Row Visible

7. Mshflexgrid bug - Can't select Row

8. MSHFlexGrid - Cannot select row

9. MSHFlexGrid - How to highlight *entire* row selected

10. MSHFlexGrid - Cannot select row

11. Full row selection in MSHflexgrid does not select first column

12. multi-select DataGrid rows?

 

 
Powered by phpBB® Forum Software