|
-
May 16th, 2002, 11:12 AM
#1
Thread Starter
Lively Member
I don't know if this is the only way, but one way is to create a "custom" ADO recordset and then attach this to the datagrid. ADO recordsets are generally a lot more friendly at data manipulation than the datagrid control...and you can create an ADO recordset without ever attaching to a database or anything.
The following url is to an article explaining "custom" ADO recordsets:
http://www.4guysfromrolla.com/webtech/071799-1.shtml
Also, the recordset object can save and load .xml files, so if you wanted to store your data in this format...piece of cake.
Good luck!
Dave <><
-
May 16th, 2002, 07:16 PM
#2
Addicted Member
yep thanks, thats kinda how i ended up doing it, apparently the grid control can have a datasource of a DataSet, DataTable, DataView and DataViewManager...
Given that i only have one "table" to display i just used a DataTable class, created it, populated it manually and then made that the DataSource for the class.
I would say that if you do want to populate a DataGrid control manually then this is how it has to be done, ie creating one of these classes, populating them manually, then binding them to the grid. It just seemed like a stupid thing to have to do at first, but having done it it is not sooooo bad.
cheers,
funky
-
May 18th, 2002, 02:02 AM
#3
Hyperactive Member
You can also bind a datagrid to an array if you want to avoid using a custom data set.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|