Click here to Skip to main content
15,893,161 members
Articles / Desktop Programming / Windows Forms

A method to move rows within a DataTable

Rate me:
Please Sign up or sign in to vote.
3.86/5 (6 votes)
13 Jan 2012CPOL 16.8K   2  
Nice solution agent154, I'd just suggest to implement it as extension methods for data row: (and I don't liked your "error reporting" with the '0' Value - because '0' could be a valid index). But I have to say, even if you don't have a database behind the datatable you can use sorting (LINQ,...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
11 Jan 2012agent154 1 alternative  
A method to move rows within a DataTable

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Austria Austria
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions