Hi,
Recently I was using winGrid and got a problem. When my grid's header has only one line, say I want to fix the first column then I could simply use the property XXXColumn.Header.Fixed to fix the column.
But when my grid's header has two line, is there any properties that I could also use to set the first column as fixed?
Thanks for your concern.
Hello Richard,
Thank you for posting in our forum.
Can you please give me a little more information about your scenario? What you mean by grid’s header has only one line? Are you setting the ColHeaderLines of the band? Are you using Groups in your grid?
Can you please provide me a screenshot of your application or a small sample solution so I can investigate your issue further?
Looking forward for your reply. In the meantime please check also the following link related to the Fixed property of the UltraGrid’s column header http://help.infragistics.com/Help/Doc/WinForms/2015.1/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v15.1~Infragistics.Win.UltraWinGrid.HeaderBase~Fixed.html
Hi, Milko
Here is what I got with the screenshot.
In the first screenshot I got one line header and I could use Band.columns[X].Header.Fixed = true to fix the column that I want to fix.
But with the second screenshot when I got multi-line header, I use the following code to implement it.
UltraGridColumn GridColumn = this.ultraGrid1.DisplayLayout.Bands[0].Columns[columnName];GridColumn.Header.Caption = caption;GridColumn.Header.Appearance.TextVAlign = Infragistics.Win.VAlign.Middle;GridColumn.Header.Appearance.TextHAlign = Infragistics.Win.HAlign.Center;GridColumn.RowLayoutColumnInfo.OriginX = x;GridColumn.RowLayoutColumnInfo.OriginY = y;GridColumn.RowLayoutColumnInfo.SpanX = spanX;GridColumn.RowLayoutColumnInfo.SpanY = spanY;GridColumn.RowLayoutColumnInfo.AllowCellSizing = RowLayoutSizing.None;GridColumn.SortIndicator = SortIndicator.Disabled;this.ultraGrid1.DisplayLayout.Bands[0].Columns[columnName].RowLayoutColumnInfo.LabelPosition = LabelPosition.LabelOnly;
Is that enough information? Hopefully get your help. Thanks.
Hi Richard,
Please let me know if you need my further assistance on this matter.
Thank you for using Infragistics Components.
Thanks for your help, that's what I need.
And I'm still trying with that, thanks again.