|
-
Apr 19th, 2004, 06:31 AM
#1
Thread Starter
Lively Member
Option strict, DataRow and ArrayList
Is it possible to have one function store a DataRow in an ArrayList and have another function in the same class add that DataRow to a DataTable using the index that the row is stored in, while having strict options turned on? I'm getting a convert error so what's the proper way to do this? How can I convert a System.Object to System.Data.DataRow?
-
Apr 19th, 2004, 06:39 AM
#2
If you know it will be a DataRow then you can just cast it
VB Code:
myDataTable.Rows.Add(CType(myList(x), System.Data.DataRow))
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Apr 19th, 2004, 09:46 AM
#3
Thread Starter
Lively Member
Thanks a lot man! That's exactly what I needed to know.
Now I've collected all my data, tables, sets and all. Why is it when I set my datagrid to read from a dataset that is returned from a result, I still don't see any information?
The debugger shows that there's something there. That there's a table there. But I don't see it! Do I have to tell the DataGrid what exactly to show from the DataSource? And how am I supposed to do that if the DataSource is dynamic? Meaning it's not there till the program creates it. The datagrid control properties at design time don't let you set that up unless you have a hard data source such as one from a database or something.
EDIT: NEVERMIND! Figured it out! Thanks a lot for all your help dude. My program works, feels soooo good to say that.
Last edited by Kt3; Apr 19th, 2004 at 09:56 AM.
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
|