我用C# 代码创建了临时表,如
c DataTable CreateExcellenceProjectDt()
{
DataTable tempDt = new DataTable();
DataColumn c = new DataColumn("PO号", typeof(System.String));
tempDt.Columns.Add(c);
c = new DataColumn("应到数量", typeof(System.Int32));
tempDt.Columns.Add(c);
c = new DataColumn("延期数量", typeof(System.Int32));
tempDt.Columns.Add(c);
c = new DataColumn("延期率", typeof(System.Decimal));
tempDt.Columns.Add(c);
c = new DataColumn("完成率", typeof(System.Decimal));
tempDt.Columns.Add(c); return tempDt;
}
可是显示的数据表头排列的不是很齐 ,有的长度不够被压缩在一起了 不好看
怎么让表头的每个表格长度 可以自己设定呢 ? 谢谢
c DataTable CreateExcellenceProjectDt()
{
DataTable tempDt = new DataTable();
DataColumn c = new DataColumn("PO号", typeof(System.String));
tempDt.Columns.Add(c);
c = new DataColumn("应到数量", typeof(System.Int32));
tempDt.Columns.Add(c);
c = new DataColumn("延期数量", typeof(System.Int32));
tempDt.Columns.Add(c);
c = new DataColumn("延期率", typeof(System.Decimal));
tempDt.Columns.Add(c);
c = new DataColumn("完成率", typeof(System.Decimal));
tempDt.Columns.Add(c); return tempDt;
}
可是显示的数据表头排列的不是很齐 ,有的长度不够被压缩在一起了 不好看
怎么让表头的每个表格长度 可以自己设定呢 ? 谢谢
那绑定后怎么设置呢
比如我要设置第2列