当前位置: 代码迷 >> ASP.NET >> 使用DataGrid,绑定列在Edit时候会变长 ,怎么固定每个Cell的长度~
  详细解决方案

使用DataGrid,绑定列在Edit时候会变长 ,怎么固定每个Cell的长度~

热度:5908   发布时间:2013-02-26 00:00:00.0
使用DataGrid,绑定列在Edit时候会变长 ,如何固定每个Cell的长度~~
使用DataGrid,绑定列在Edit时候会变长   ,如何固定每个Cell的长度~~
或者使其中的txtbox变的小点,
谢谢.
在线等.

------解决方案--------------------------------------------------------
if (e.Item.ItemType == ListItemType.EditItem) { ((TextBox)e.Item.Cells[1].Controls[0]).Width = 60; ((TextBox)e.Item.Cells[2].Controls[0]).Width = 60; ..... }
------解决方案--------------------------------------------------------
让txtbox的width=100%就可以了
  相关解决方案