?
Solved

restricting user to select multiple row on Flex Grid

Posted on 2003-03-31
5
Medium Priority
?
352 Views
Last Modified: 2012-05-04
Is there a way to restrict user to select multiple rows on Flexgrid.
My requirement is that at a time user can selct only one row on FlexGrid.
I tried disbling Shift key down, but i failed.
Can you anyone help me in this.

0
Comment
Question by:VijayK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Author Comment

by:VijayK
ID: 8238285
This Q is really importamnt, i didn't have enough point to post as important.
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 150 total points
ID: 8238309
Which FlexGrid?
If it's M$ simple felxgrid, you have a property SelectionMode, which is 0 (Free) by default. Change it to 1 (By Row), and your problem should be solved.

CHeers
0
 
LVL 3

Expert Comment

by:Jonyv
ID: 8238367
Try setting the FlexGrids SelectionMode to "flexSelectionByRow".
Then, in the grids SelChange event, put <your flexgrid name>.RowSel = <your flexgrid name>.Row

This might achieve what you want.
0
 
LVL 2

Expert Comment

by:IeuanJ
ID: 8238833
As mentioned already set selectionmode to flexSelectionByRow.  Then use mouseup or keypress if you want to be sure of cursor movements too.  RowColChange does nothing and selchange gave me a buffer overflow if i tried selecting from a higher row downwards.

Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
  MSFlexGrid1.Row = MSFlexGrid1.RowSel
End Sub
0
 
LVL 2

Expert Comment

by:IeuanJ
ID: 8243796
I dont want to cause trouble but angellll's answer will not give you what you want so why has it been accepted ?

All altering the selection mode does is force selection of he entire row rather than one cell, it does not prevent multiple row selections whereas my answer did.  Which I believe was your requirement in the first place.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question