Solved

MSHFlexGrid problem

Posted on 2000-04-10
7
193 Views
Last Modified: 2011-10-03
I'm using MSHFlexgrid control to display data from SQLServer
my problem is, I want user only can select one row only at the flexgrid
How to do this ? Thanks

 JavaBoy
0
Comment
Question by:JavaBoy060299
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 14

Expert Comment

by:wsh2
ID: 2699390
<----- Code Begin ----->

Private Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)
'  Enter your row number here
   If MSFlexGrid1.Row <> 1 _
   Then
      MsgBox ("You can only update row 1")
      KeyAscii = 0
   End If
End Sub

<----- Code End ----->

0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2699479
SelectionMode = 1 - flexSelectionByRow
AllowBigSelection = False
0
 

Author Comment

by:JavaBoy060299
ID: 2703386
Adjusted points from 25 to 50
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:JavaBoy060299
ID: 2703387
wsh2:
Maybe there is some misunderstanding
I don't want user to select more than 1 row (not row 1), so user only allowed to block not more than one row

angelIII:
Have you try it ?
I have tried before I post this Q
but nothing happened

 
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2703419
i admin, i didn't try the settings, as they seemed evident...

On the other hand, you say you don't want to have more that one row selected, what is if you consider only the Current Row as selected (for recordsets you have only one active row too)
0
 
LVL 14

Accepted Solution

by:
wsh2 earned 50 total points
ID: 2704651
Oh.. thats different.. <smile>.

Private Sub MSFlexGrid1_SelChange()

   MSFlexGrid1.rowsel = MSFlexGrid1.row

End Sub

0
 

Author Comment

by:JavaBoy060299
ID: 2706197
angelIII,

I know that, but I need some solution as wsh2 provides. thanks

wsh2,
Thanks for your answer !
It's exactly I'm looking for

 
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

710 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