Hello
I cant change the appareance for some cells in the Ultragird !
Look at the picture bellow
I use Ultragrid 7
thank you
Hello Oliver,
Thank you for posting in our forum.
Please find bellow answers to your questions:
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.
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.
but what I'm tryiing to do is, like is there an ActvieRowAppareance, is there any way to do an "ActiveColAppareance" ?
when I click in a Cell I would like to "Higlight" the entire row AND the entire col and go back to the original state when I leave the cell
Hope you understand what I'm talking about ;-)
Thanks
like the picture below
Thank you for your feedback.
Right now UltraGrid does not expose such property like ActiveColumnAppearance. However you can achieve this by handling BeforeCellActivate and BeforeCellDeactivate events of the grid and set/reset the active cell's column appearance. Please check the attached sample project where I have implemented this.
Please note, in my previous sample I have set appearance to the selected rows, selected cells and etc. Now I am working with active cell, active row and etc. As you know the difference between selected and active is that the active cell is the cell you can edit – this can be only one cell at a time. Selected are all the cells, row or columns the user has selected. There could be many selected cells or rows or columns. So if you need to set the selected appearance you need to get back to my previous sample project and set the appropriate appearances.