Results 1 to 3 of 3

Thread: Option strict, DataRow and ArrayList

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2004
    Posts
    95

    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?

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    If you know it will be a DataRow then you can just cast it
    VB Code:
    1. 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

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2004
    Posts
    95
    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
  •  



Click Here to Expand Forum to Full Width