Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MSHFlexGrid problem

Posted on 2000-04-10
7
Medium Priority
?
203 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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 200 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

885 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