Dear all,
I want to Edit MSFLEXGRID using a text box but my textbox(txtEdit) is not getting fix on flexgrid(fg1) cell. Please look at the attached snap.
my code is as under
Attachment 98957
Please suggest
I want to Edit MSFLEXGRID using a text box but my textbox(txtEdit) is not getting fix on flexgrid(fg1) cell. Please look at the attached snap.
my code is as under
Code:
Private Sub fg1_Click()
Call SetForEdit
End Sub
Private Sub fg1_EnterCell()
Call SetForEdit
End Sub
Private Sub fg1_LeaveCell()
fg1.Text = txtEdit.Text
End Sub
Private Sub Form_Activate()
Call SetForEdit
End Sub
Public Sub SetForEdit()
With txtEdit
If Not fg1.Text = "" Then
txtEdit.Text = fg1.Text
Else
txtEdit.Text = ""
End If
.ZOrder
.Top = fg1.CellTop
.Left = fg1.CellLeft
.Height = fg1.CellHeight
.Width = fg1.CellWidth
.SetFocus
End With
End Sub
Please suggest