protected DataTable SortDataTable(DataTable dataTable, bool isPageIndexChanging) { DataTable dataTable1 = new DataTable(); if (dataTable != null) { DataView dataView = new DataView(dataTable); if (GridViewSortExpression != string.Empty) { if (isPageIndexChanging) { dataView.Sort = string.Format("{0} {1}", GridViewSortExpression, GridViewSortDirection); } else { dataView.Sort = string.Format("{0} {1}", GridViewSortExpression, GetSortDirection()); } } dataView.ToTable("dataTable"); dataTable1 = CreateTable(dataView); return dataTable1; } else { return new DataTable(); } }
select convert(numeric,'999') -- replace underline with Loan_Number in your query
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)