Solved

MSHFlexGrid problem

Posted on 2000-04-10
7
188 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 142

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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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 142

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now