日期:2014-05-18  浏览次数:20550 次

asp.net疑问???
DHTDataGrid21.ConnectionString = ConfigurationSettings.AppSettings["ConnectionString"].ToString();
  DHTDataGrid21.QueryCommand = "select a.*,replace(a.业务链接,'{0}',a.案件编号) as 业务链接2,b.相关文档 as 相关文档2 "
  +"from V_行政处罚 a left outer join (select 编号,相关文档 from V_相关文档 where 模块编号='punish') b "
  +"on a.案件编号 = b.编号 ";
  DHTDataGrid21.DCPageSize = 10;
  DHTDataGrid21.GridHeight = 352;
  DHTDataGrid21.DCHasCheckBox = true;

  string[,] ary = new string[,] {  

  {"bind","指标","指标","14","left"},
{"bind","建立日期","建立日期","8","left"},
  {"bind","描述","描述","8","left"},
  {"temp","录入人","录入人","18","left"},
  {"temp","是否通过","<script labguage='javascript'>FormatTime('<#是否通过#>')</script>","10","left"},
};
  DHTDataGrid21.DCBindColumn = ary;
大家好,这段代码是什么意思呢?
请各位朋友指点密经

------解决方案--------------------
查询数据绑定到DHTDataGrid21上。

然后把ary附值给 DHTDataGrid21 做为绑定列
------解决方案--------------------
看你的代码DHTDataGrid21应该是一个自定义控件
DHTDataGrid21.ConnectionString = ConfigurationSettings.AppSettings["ConnectionString"].ToString(); 
DHTDataGrid21.QueryCommand = "select a.*,replace(a.业务链接, '{0} ',a.案件编号) as 业务链接2,b.相关文档 as 相关文档2 " 
+"from V_行政处罚 a left outer join (select 编号,相关文档 from V_相关文档 where 模块编号= 'punish ') b " 
+"on a.案件编号 = b.编号 "; 
DHTDataGrid21.DCPageSize = 10; 
DHTDataGrid21.GridHeight = 352; 
DHTDataGrid21.DCHasCheckBox = true; 
string[,] ary = new string[,] {

{"bind","指标","指标","14","left"}, 
{"bind","建立日期","建立日期","8","left"}, 
{"bind","描述","描述","8","left"}, 
{"temp","录入人","录入人","18","left"}, 
{"temp","是否通过"," <script labguage= 'javascript ' >FormatTime( ' <#是否通过# > ') </script >","10","left"}, 
}; 
DHTDataGrid21.DCBindColumn = ary; 

这些都是在给DHTDataGrid21的属性赋值
------解决方案--------------------
DHTDataGrid21.ConnectionString = ConfigurationSettings.AppSettings["ConnectionString"].ToString(); //取得连接字符串DHTDataGrid21.QueryCommand DHTDataGrid21.QueryCommand = "select a.*,replace(a.业务链接, '{0} ',a.案件编号) as 业务链接2,b.相关文档 as 相关文档2 "
+"from V_行政处罚 a left outer join (select 编号,相关文档 from V_相关文档 where 模块编号= 'punish ') b "
+"on a.案件编号 = b.编号 "; //获得sql语句bind在DataGrid
DHTDataGrid21.DCPageSize = 10; //设置DataGrid一页显示的条数
 DHTDataGrid21.GridHeight = 352; //DataGrid高度
DHTDataGrid21.DCHasCheckBox = true; //这个应该是自定义控件的一个开关设置
string[,] ary = new string[,] {

{"bind","指标","指标","14","left"},