There is one Simple Way , To make a Column Check box in MSFlexGrid..
Say, you want to make Column 4 as Selection Column.
FontName Marlett has character "b" looking like a Check-Mark Icon.
What you can do is Set whole of the column name = "Marlett", and In Click-event Toggle between "b" and empty...
Write this code in Grd_Click Event:
[code=vb]
If Grd.Row >0 And Grd.Col=4 Then
Grd.CellFontnam e ="Marlett"
If Trim(Grd.Text) = "" Then
Grd.Text ="b"
Else
Grd.Text = ""
End If
End If
[/code]
And In Save/Print Button, Loop thru the Rows, and Check For
[code=vb]
If Trim(Grd.TextMa trix(2,4)) ="b" Then
MsgBox "Row 2 Selected"
Else
MsgBox "Row 2 Not Selected"
End If
[/code]
It will indicate Selected Row.
Alternatively, Webdings font has also got font "a" looking like a Check Mark..
you can use Either..
There is one Simple Way , To make a Column Check box in MSFlexGrid..
Say, you want to make Column 4 as Selection Column.
FontName Marlett has character "b" looking like a Check-Mark Icon.
What you can do is Set whole of the column name = "Marlett", and In Click-event Toggle between "b" and empty...
Write this code in Grd_Click Event:
[code=vb]
If Grd.Row >0 And Grd.Col=4 Then
Grd.CellFontnam e ="Marlett"
If Trim(Grd.Text) = "" Then
Grd.Text ="b"
Else
Grd.Text = ""
End If
End If
[/code]
And In Save/Print Button, Loop thru the Rows, and Check For
[code=vb]
If Trim(Grd.TextMa trix(2,4)) ="b" Then
MsgBox "Row 2 Selected"
Else
MsgBox "Row 2 Not Selected"
End If
[/code]
It will indicate Selected Row.
Alternatively, Webdings font has also got font "a" looking like a Check Mark..
you can use Either..
Regards
Veena
Hi
This thread helped me. It's simply superb.. It looks great..
Thank you.
Comment