你的ADD是在哪里写的,请确保在INIT,LOAD里面做
解决方案 »
- js更新label值的问题
- VS2005打了SP1补丁后在项目中复制进去文件在解决方案里看不到
- 求教 ASP页面里只打印某个<panel>里的东西(急)!
- 在VS2005调试正常,在IIS上调试出错,怎么回事??
- http/1.1 500 internal server error”是怎么回事啊
- 求教一组有趣的问题
- 在asp.net中怎样显示两个表的信息并且可以更新到数据库
- SVG矢量图讨论
- asp.net的标签功能是怎么实现的 _最好能给个事例或代码 (参照)
- 请问能不能将viewstate中的数据赋给cache呢?
- 如何通过客户端的ip地址得到其所在的省市?
- 急啊,困了我三天的问题了!分不够再贴
public bool SetColStyle(System.Data.DataTable dtConfig)
{
this.AutoGenerateColumns = false;
System.Web.UI.WebControls.BoundColumn Col;
for (int i = 0;i < dtConfig.Rows.Count ;i ++)
{
if ((string)dtConfig.Rows[i]["ColFullName"]!= "a.CName")
{
Col = new BoundColumn();
Col.HeaderText = (string)dtConfig.Rows[i]["CName"];
Col.DataField = (string)dtConfig.Rows[i]["ColFullName"];
Col.SortExpression = (string)dtConfig.Rows[i]["ColFullName"];
int intDateType;
intDateType =(int)dtConfig.Rows[i]["DataType"];
switch(intDateType)
{
case 2: Col.ItemStyle.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Right;
Col.DataFormatString = "{0:N}";
break;
case 3:
Col.DataFormatString = "{0:d}";
break;
}
this.Columns.Add(Col);
}
}
return true;
}
我也在该方法中设过,不过也没有用