If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Database with MSHFlex Grid

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-09-04, 02:37
hoangleo hoangleo is offline
Registered User
 
Join Date: Feb 2004
Location: VietNam
Posts: 1
Arrow Database with MSHFlex Grid

How to create a MSHFlex Grid for interactive with database (Access)? Example: edit record, update record...?
Reply With Quote
  #2 (permalink)  
Old 02-10-04, 10:41
accarvajal accarvajal is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On