
2008年4月10日
posted @
2008-06-04 11:09 romce 阅读(10) |
评论 (0) |
编辑
摘要: DataGrid 通过内部控件获取所在控件的列索引, 原来以为列所引很容易通过属性得到,没想到费了一番周转,花了不少时间,太过费劲了,不知有更简单的方法没?
foreach (DataGridItem i in this.DtGrid.Controls[0].Controls)
{
if (i.ItemType == ListItemType.Header)
{
for (int month_i = 1; month_i <= 12; month_i++)
{
Label myLabel = (Label)i.FindControl("lblMonth" + month_i.ToString());
myLabel.Text = myYear.
阅读全文
posted @
2008-04-10 12:41 romce 阅读(10) |
评论 (0) |
编辑