AngelEyes on .Net

Tips, tricks and WTFs about Asp .Net, SQL Server and the likes.
posts - 54 , comments - 235 , trackbacks - 6

My Links

News

Tag Cloud

Article Categories

Archives

3rd party

Official ASP .NET

Useful info

Example: how to sort and get top iNumOfRecords from a DataTable, using a DataView

DataView dvSortTotalUpdates = new DataView();

dvSortTotalUpdates = dtAllUpdates.DefaultView;

dvSortTotalUpdates.Sort = "UploadDate";

DataTable dtGetBySize = dtAllUpdates.Clone();

for( int i = 0; i < iNumOfRecords; i++ )

{

dtGetBySize.ImportRow(dvSortTotalUpdates[i].Row);

}

 

return (dtGetBySize);

Print | posted on Wednesday, January 30, 2008 6:49 PM |

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 

Powered by: