有关鼠标卡顿的情况,我粘上代码,有劳版主帮忙看看如何优化,谢谢!
记录100条左右
//刷新职员视图
//以下select中select,相当多表外连接视图
string sqlstr = " select lngemployeeid as 'ID', stremployeecode as '编号', stremployeename as '姓名', blnismale as '性别',"
+ " strdepartmentname as '部门',"
+ " stremployeetypename as '职员类别',"
+ " streducationname as '学历',"
+ " strtitlename as '职务',"
+ " stroperatorname as '操作员',"
+ "lngBankName as '开户行', strBankCode as '账号', strInDate as '入职日期', strOutDate as '离职日期', strAddress as '地址', strPostalCode as '邮编',"
+ "strOfficePhone as '办公电话', strHomePhone as '家庭电话', strBirthdate as '出生日期', strNotes as '备注', strCardNo as '身份证',"
+ " strMobileNumber as '手机'"
+ " from employeeview where blnisinactive=0 order by stremployeecode";
SqlDataAdapter sda = new SqlDataAdapter(sqlstr, PubClass.dataClass.getcon());
DataSet ds = new DataSet();
sda.Fill(ds, "tab");
////填充Datagrideview视图
//dataGridView3.DataSource = ds.Tables["tab"];//鼠标滚动不卡顿
//填充Flex
employee_flex.DataSource = ds.Tables["tab"];//鼠标滚动卡顿 |