专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅
#include<iostream> #include<iomanip> using namespace std; void BubSort(int r[],int n) { int i,j,t; int flag;//flag=0 means no sorting;otherwise sorting for(i=n-1;i>0;i--) { flag=1; for(j=0;j<i;j++) if(r[j]>r[j+1]) { t=r[j+1]; r[j+1]=r[j]; r[j]=t; flag=0; } if(fla [阅读全文] [PDF]
在.Net 中 DataGrid 虽然有排序的功能,但并不支持双向的排序。用到了,看了些相关的帖子,自己尝试了一种方法,竟然也行得通,呵呵 主要是用DataGrid.Attributes 存了一个参数,同时在onSortCommand中修改了DataGridColumn的SortExpression. 代码如下: private void BindData() { DataTable dt = .......; if(dt != null) { DataView dv = dt.DefaultView; if(DataGrid1.Attributes[\" [阅读全文] [PDF]
1 共2条 分1页