Results 1 to 2 of 2

Thread: Dataview

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2004
    Posts
    154

    Dataview

    How do I iterate thru a dataview after sorting or can this even be done? I have sorted by date but can I use datarow to go thru the sorted data?

    daCSV.Fill(parts)
    Dim myDataView As DataView
    myDataView = parts.DefaultView
    myDataView.Sort = "Date DESC"
    Thanks,
    Russ

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,430

    Re: Dataview

    VB Code:
    1. For Each row As DataRowView In myDataView
    2.     MessageBox.Show(row("Date").ToString())
    3. Next row
    A DataRowView is like a DataRow but not exactly the same. If you want to get the actual DataRow that the DataRowView corresponds to then you can get it from the Row property of the DataRowView.

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