public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p) { dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult(); result.page = p.page; //设定当前返回的页号 result.total = 100; //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际 string pspnum = ""; if (p.extParam.ContainsKey("PspNum")) { pspnum = p.extParam["PspNum"]; } TeModel tm = new TeModel(); result.table = tm.searchTisaneClass(pspnum);//调用演示的数据生成函数产生模拟数据 dotNetFlexGrid.FieldFormatorHandle proca = delegate(DataRow dr) { string z = ""; if (dr["bs"].ToString() == "") { String az = dr["bs"].ToString(); az = "3"; if (az == "3") { z = "无"; } } else { int az = Convert.ToInt32(dr["bs"].ToString()); if (az == 1) { z = "泡药完成"; } } return(z); }; result.FieldFormator.Register("bs", proca); return(result); }