Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    VietNam
    Posts
    1

    Arrow Unanswered: Database with MSHFlex Grid

    How to create a MSHFlex Grid for interactive with database (Access)? Example: edit record, update record...?

  2. #2
    Join Date
    Feb 2004
    Location
    Cali - Colombia
    Posts
    16
    In my experience using MSFlexgrid or MSHFlexgrid, I learned those kinds of controls are non-editable. If you want, use datagrid control. According to the language you are using, for having editable Flexgrid, there are different things you have to keep in mind.

    First, In visual Basic 6.0 you have to connect it to a datasource using this property. In Visual C++, I recommend fill the rows by CDatabase class through interactive loop (for ...).

    Second, you have to use dynamic textbox or Edit controls. that means you have to create them at run-time. In Visual Basic 6.0, you have to use EnterCell and LeaveCell events for begining edit and make a copy from the cell to the text box and then set the text box position using cellheight, cellwidth, celltop, etc. properties. In visual c++, using GetCellRect , gives those positions and using dynamic creation 'new'.

    Third, you have to destroy the text box or edit control and before do it copy text from dyanmic control to the cell.

    I hope help u


    Aldemar
    A.C.C.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •