Inputing Numbers in a Flexgrid using input box

How can I input numbers in a Msflexgrid using a input box??


Comments

  • : How can I input numbers in a Msflexgrid using a input box??

    :



    Try the following:



    Add a Text box (Text1) with following properties



    BorderStyle set at 0

    Visible set as False



    In the MSFlexGrid1_DblClick or EnterCell event



    Text1.Move MSFlexGrid1.Left + MSFlexGrid1.CellLeft, MSFlexGrid1.Top + MSFlexGrid1.CellTop, MSFlexGrid1.CellWidth - 8, MSFlexGrid1.CellHeight - 8

    Text1.Text = MSFlexGrid1.Text

    Text1.Visible = True

    Text1.SetFocus



    In the MSFlexGrid1_LeaveCell event



    MSFlexGrid1.Text = Text1.Text

    Text1.Text = ""

    Text1.Visible = False



    -----------------

    This will allow the flexgrid to accept in cell editing. All you need to do is put some validation in the text box to check for numbers.




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories