> Mike,
>
[quoted text clipped - 23 lines]
> >
> > Mike
Wow, thanx, that clears something up for me too.
BTW, a way to simply test this would be to add a DataGridView, three
textboxes and a button. Then the following code:
Dim table As New DataTable
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim row As DataRow
table.Columns.Add()
row = table.NewRow
table.Rows.Add(row)
row(0) = "A"
row = table.NewRow
table.Rows.Add(row)
row(0) = "B"
DataGridView1.DataSource = table
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
TextBox1.Text = DataGridView1.Item(0, 0).Value.ToString
TextBox2.Text = table.Rows(0)(0).ToString
TextBox3.Text = table.DefaultView.Item(0)(0).ToString
End Sub
B.
Mike - 27 Jul 2006 17:38 GMT
>> Mike,
>>
>> The datagridview is actually bound to the datatable's
>> defaultview.
>> That will have the records in the right order.
Ahhh, thank you. I think that will solve it.
>> ----------------------------
>> > Dear group,
[quoted text clipped - 25 lines]
>
> Wow, thanx, that clears something up for me too.
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> TextBox1.Text = DataGridView1.Item(0, 0).Value.ToString
> TextBox2.Text = table.Rows(0)(0).ToString
> TextBox3.Text = table.DefaultView.Item(0)(0).ToString
> End Sub
^ Great example too. I'll have to do some recoding tonight. If any MSDN
article authors are reading this; this has got to be somewhere that a LOT of
people trip up on, but very little example documentation alludes to using
the .DefaultView.
Thanks!
Mike