Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSFlexGrid 3

Status
Not open for further replies.

dmando84

Programmer
Dec 28, 2005
68
US
Hello,

I have a MSFlexgrid that I populated from a SQL Server database. I need to be able to add a row e.g. FName,LName,COName to the flexgrid without making a trip back to the database to refresh my grid. How do I add a row to a grid that is already populated? Any help would be appreciated.

thanks,

David
 
If the grid is bound to the datasource, you can't. In order to do this, you need to use the grid unbound and then update it manually using a loop through your recordset. Then you can add/remove rows to the grid.
 
Have a look at the TextArray and TextMatrix properties, as these allow you to write or read individual cell values as long as you're using an unbound control.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
For an unbound grid you can add a row by incrementing the .rows property or by using the .additem method.

zemp
 
Thank you all for your responses. It is very helpful. I have only been a member of this site for 6 months and you guys have saved my butt a few times, thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top