|
-
Feb 6th, 2000, 10:52 PM
#1
Thread Starter
New Member
Hello,
I would be grateful if anyone could shed any light on how I might be able to disable a particular chosen cell in an MSFlexGrid. Thanks very much in advance for any replies.
Tom
-
Feb 6th, 2000, 11:04 PM
#2
Frenzied Member
In Apex TrueDBGrid (www.apexsc.com) you can disable cell(s) at runtime dependant of values, database records, etc,etc, etc.
For example, I have a TrueDBGrid in my project displaying the monthly payments required for a loan - the user can edit any payments after todays date but the payments shown before today's date are locked to prevent editing as they have already happened.
MS FlexGrid is a cut-down, all-the-good-bits-missing version of Apex TrueDBGrid.
------------------
Mark "Buzby" Beeton
VB Developer
[email protected]
-
Feb 6th, 2000, 11:48 PM
#3
I like the MSFlexGrid, it's very Flexible and Extremely Quick to use, to Know when a Cell is Disabled, you could make use of the CellForeColor/CellBackColor Properties, ie.
Code:
Private Sub Form_Load()
Dim iIndex As Integer
Randomize Timer
With MSFlexGrid1
.FixedCols = 0
.FixedRows = 0
.Rows = 10
.Cols = 4
For iIndex = 0 To (.Rows * .Cols) - 1
.TextArray(iIndex) = Rnd * 100
Next
.Col = Int(Rnd * 3)
.Row = Int(Rnd * 9)
.CellForeColor = vbGrayText
End With
MSFlexGrid1_RowColChange
End Sub
Private Sub MSFlexGrid1_RowColChange()
Caption = IIf(MSFlexGrid1.CellForeColor = vbGrayText, "Disabled", "Enabled")
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Certified AllExperts Expert
-
Feb 7th, 2000, 01:04 AM
#4
Thread Starter
New Member
Hello chaps, thank you both for your replies, I shall investigate both.
Regards
Tom
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|