I am running Netvantage 10.2 (asp.net). I have not been able to center the column headers in the ultrawebgrid.
I have tried several approaches, including setting the FixedHeaderStyleDefault.HorizontalAlign to center both in the properties window and in the code behind, and setting the CellStyle.CssClass for each column to a class with text-align: center. It does not seem to be recognizing the cssclass at all, judging from attempts to alter the color in the cssclass as well.
Hi nawillis,
Thank you for your reply. Glad that the matter has been resolved.
Please feel free to contact me if you have any further questions regarding this matter.
That worked, but not until i removed code that set Columns[i].CellStyle.CssClass to a class that specified text-align: left. I had placed the code to set the HeaderStyleDefault.HorizontalAlign to center after the CellStyle.CssClass code, thinking it would override that for the header, but apparently it didn't.
Thanks.
Thank you for posting in the community.
In order to center the column header and cell text in UltraWebGrid I suggest that you try setting the HorizontalAlign property for the HeaderStyleDefault and RowStyleDefault.
Please note that the UltraWebGrid control is now outdated and as of .NetAdvantage 2011 Volume 2 is no longer included in our product package. I would suggest that you consider switching to the WebDataGrid/WebHieararchicalDataGrid. More information regarding these controls is available at:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=Web_WebDataGrid_WebDataGrid.html
Additional samples demonstrating the features of these grids can be found at:http://samples.infragistics.com/aspnet/
Feel free to contact me if you have any questions.