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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display data in grid

Status
Not open for further replies.

dbeagle

Programmer
Mar 12, 2001
1
US
I want to display data in a spreadsheet type control. I need to be able to populate it, the user to not be able to edit the contents, however I need them to be able to copy the contents and paste them into a spreadsheet.... I have tried a few controls, but have not found a way to make everything work. I know there must be a way. Can someone point me in the right direction please?
Thanks
 
Hey,

Yes, it is possible. I would start by using a MSFlexGrid (because it allows free selection). and use the grid in unbound mode since it is faster and you do not require editing.

Hope this helps (a little).

good luck,
KCI
 
Just use a DataGrid and the recordset's GetString method to copy a row of data as a delimited string, and then paste it onto the ClipBoard using the VB.ClipBoard method.

If you want to paste the string back, you will need to use the Split() function to get the data into an array, and then loop through the array elements, copying each element to the recordset field, first checking if the DataType is valid.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top