日期:2014-05-20  浏览次数:20438 次

使用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%就可以了