UltraWebGrid多表头的实现
首先在UltraWebGrid中设置好列,这里默认设置的列是col1,col2_1,col2_2,col3.其中col2_1和col2_2是要生成多表头的列。 在UltraWebGrid的InitializeLayout事件中写如下代码: ?View Code CSHARP // All the Headers for bound columns initialize to OriginX = 0. // Since we want them // to appear below the added column headers //we are going to need to move them down a level //先把所有列头都设为第二行 foreach (Infragistics.WebUI.UltraWebGrid.UltraGridColumn c in UltraWebGrid1.DisplayLayout.Bands[0].Columns) { c.Header.RowLayoutColumnInfo.OriginY = 1; //纵向起始点,0为第一行,1为第二行 } //创建一个列头对象 var [...]
Also tagged NET, NetAdvantage
