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
Printable View
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
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]
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
Hello chaps, thank you both for your replies, I shall investigate both.
Regards
Tom