Thanks Andy. That 'bout what I figured.
Is there a way to bulk move records from one datatable to another?
Here's what I'm doing now, a record at a time...
Dim dt, dtSort As DataTable
Dim dv As DataView
Dim dr As DataRow
....do a bunch of stuff to load dt...
dv = dt.DefaultView 'set initial display order
dv.Sort = "Sort ASC, Name ASC"
dtSort = dt.Clone 'copy datatable structure
dtSort.DefaultView.Sort = Nothing 'remove the sort
For Each dr In dt.Select 'move the data
dtSort.ImportRow(dr)
Next
FileList.DataSource = dtSort
"Andy Becker" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> "Gene Hubert" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Is there an efficient way to present the data in a given order but not
> > have it be an "Active Sort." That is, I don't want records jumping
> > around to different places because the value in a sorted column has
> > been edited. I also need to allow a user to select which column the
> > grid is sorted on by clicking on the column header.
> >
> > Thanks Much,
> > Gene H.
>
> Only to feed it a data source which is pre-sorted as desired. The jumping
> can't be prevented once a column header has been clicked, though, and some
> data in that column edited.
>
> The DataGrid should allow you to click on column headings and sort... The
> property is AllowSorting, but I can't recall the default value at the
> moment.
>
> Does this help any?
>
> Best Regards,
>
> Andy
|