请教ultraGrid根据内容自动调整列宽
1个回答
展开全部
private void UltraWebGrid1_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e)
{
UltraWebGrid1.Bands[0].Columns.FromKey("RegardingContent").Hidden =true;
UltraWebGrid1.Bands[0].Columns.FromKey("StartOn").Hidden =true;
UltraWebGrid1.Bands[0].Columns.FromKey("Priority").Width =Unit.Percentage(20);
UltraWebGrid1.Bands[0].Columns.FromKey("Type").Width =Unit.Percentage(20);
UltraWebGrid1.Bands[0].Columns.FromKey("Status").Width =Unit.Percentage(20);
UltraWebGrid1.Bands[0].Columns.FromKey("EndOn").Width =Unit.Percentage(40);
//Format Header
UltraWebGrid1.Bands[0].Columns.FromKey("Type").Header.Caption=Activity_List_Header_Type.ToString();
UltraWebGrid1.Bands[0].Columns.FromKey("Subject").Header.Caption=Activity_List_Header_Subject;
}
{
UltraWebGrid1.Bands[0].Columns.FromKey("RegardingContent").Hidden =true;
UltraWebGrid1.Bands[0].Columns.FromKey("StartOn").Hidden =true;
UltraWebGrid1.Bands[0].Columns.FromKey("Priority").Width =Unit.Percentage(20);
UltraWebGrid1.Bands[0].Columns.FromKey("Type").Width =Unit.Percentage(20);
UltraWebGrid1.Bands[0].Columns.FromKey("Status").Width =Unit.Percentage(20);
UltraWebGrid1.Bands[0].Columns.FromKey("EndOn").Width =Unit.Percentage(40);
//Format Header
UltraWebGrid1.Bands[0].Columns.FromKey("Type").Header.Caption=Activity_List_Header_Type.ToString();
UltraWebGrid1.Bands[0].Columns.FromKey("Subject").Header.Caption=Activity_List_Header_Subject;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询