Re: Manually adding to DataView / Custom RowFilter
- From: "Cor Ligthert" <notmyfirstname@xxxxxxxxx>
- Date: Fri, 22 Apr 2005 08:41:16 +0200
Mike,
For Net 1.x versions
\\\
DataView dv = new DataView(dt);
dv.Sort = "bla"; // sorts column bla
DataTable dtnew = dt.Clone();
foreach (DataRowView dvr in dv)
dtnew.ImportRow(dvr.Row);
dt.Clear();
dt = dtnew.Copy();
///
In the Net 2 version there is a CopyTo command to copy it in one time to a
new datatable.
I hope this helps,
Cor
.
- Follow-Ups:
- References:
- Manually adding to DataView / Custom RowFilter
- From: mikeorb
- Manually adding to DataView / Custom RowFilter
- Prev by Date: Datareader and Connection
- Next by Date: RowChanged DataTable RowCollection
- Previous by thread: Manually adding to DataView / Custom RowFilter
- Next by thread: Re: Manually adding to DataView / Custom RowFilter
- Index(es):
Relevant Pages
|