点击columns属性后,在模版中定义吧。
解决方案 »
- 当前页面的权限问题
- Is there a way that treenode can get the properties of treeview in GridView?
- datalist 客户端id 问题
- 如何筛选数据?
- 放分100 强烈推荐报表打印控件wsReport4.6 图表组件wsChart4.6 欢迎大家多提建议
- 这个现象是怎么回事?
- "bootstrap" 网站 主题颜色的修改 是怎么实现的???
- 请教微软的专家!!!!
- 两个问题麻烦一下大家!
- 怎么在MVC工程项目里写一个socket控制台程序?
- 怯怯地问一声,如果有多个字段一起作表的主键,DataGrid的DataKeyField该怎么设?
- 急问一个困扰已久的问题,请各位大虾帮帮忙!
如:
<asp:TextBox id="TextBox1" runat="server" Width="200px" />
e.Item.Cells[0].Width=100;
DataGrid1.Width=200;
private void DataGrid1_UpdateCommand(object source, System.Web.UI.WebC
{
TextBox a = (TextBox)e.Item.Cells[4].Controls[0];
TextBox b = (TextBox)e.Item.Cells[5].Controls[0];
TextBox c = (TextBox)e.Item.Cells[6].Controls[0];
a.Width=10;
b.Width=10;
c.MaxLength = 50;
a.MaxLength = 8;
if (a.Text.Trim() != "")
{
if (CovertMoney(a.Text.Trim()) == false)
{
ShowErrMsg("输入的收费金额错误,请检查!");
return;
}
}
if (c.Text.Trim() != "")
{
if (CovertDate(c.Text.Trim()) == false)
{
ShowErrMsg("开票日期错误格式如2008-08-18 !");
return;
}
}
If e.Item.ItemType = ListItemType.EditItem Then
Dim i As Integer
For i = 5 To e.Item.Cells.Count - 2
Dim t As TextBox = CType(e.Item.Cells(i).Controls(0), TextBox)
t.Width = Unit.Pixel(60)
Next
End If
End Sub