Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4695
set font in ultragrid and decimal values??
posted

Dear all,

I am setting the fonts for all the ultragrid in the project. But have suspect that some ultragrid cannot be set as shown in the attached screen. I use the code :  ultragrid1.font=new font("Microsoft Sans Serif", 9).  Is it correct way to set or any other place that I have not set???

Moreover, How to set the decimal places in the ultragrid? Can I have the global variable that can set the decimal place e.g. 1 decimal place or 2 decimal places with truncate option, I don't want rounding ???

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    The preferred way to set the font on the whole grid would be to use the grid.DisplayLayout.Appearance.FontData. On advantage to this is that it will get saved along with the DisplayLayout. But setting the Font property on the control is fine, too.

    I'm looking at your screen shots, but I don't know what problem it is supposed to be showing. I don't see anything wrong with the fonts here.

    Regarding the decimal places, you can control this using the Format property on the UltraGridColumn. There is no way to set this globally, it must be done on each column. The InitializeLayout event of the grid is usually a good place for this.

Children
No Data