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