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
80
Header et Cells Appareance ?
posted

Hello

I cant change the appareance for some cells in the Ultragird !

Look at the picture bellow

I use Ultragrid 7

thank you

Parents
No Data
Reply
  • 21795
    Offline posted

    Hello Oliver,

    Thank you for posting in our forum.

    Please find bellow answers to your questions:

    1. From your pictures it seems that you need to retain the cell appearance even when the row is selected. Please note the appearance of each cell is determined in this order: column -> row -> cell -> selected/active appearance. So you need first to remove the selected and active appearance. To do so set SelectedAppearancesEnabled and ActiveAppearancesEnabled of the Override to False. Then you need to set the appearance for each cell of the necessary columns. Finally you need to set row appearance of the selected rows. You can do this in BeforeSelectChange event of the grid. Note you will need first to clear the appearance of the old selection and apply the appearance to the new one. Check the attached sample where I have implement this approach.

    2. It seems that you need to set the appearance of the column header. Please note by default the column headers have ThemedElementAlpha applied. So whatever appearance you set to the header it will not be visible. So you need first to remove the ThemedElementAlpha and then to set the necessary appearance of the header. You may use code like this:

    // by default column headers are with applied ThemedElementAlpha
    // we need to set this to transparent in order to be able to apply any appearance
    var colWithCustomHeader = e.Layout.Bands[0].Columns[4].Header;
    colWithCustomHeader.Appearance.ThemedElementAlpha = Alpha.Transparent;
    colWithCustomHeader.Appearance.BackColor = Color.Orange;

    Please let me know if you need any additional information.

    Thank you for using Infragistics Controls.

    CAS-169131-S0X1V3.zip
Children