hi,
I have a grid with one row. each column is using a comboeditor as the editor control. When I select the row the backcolor is like a silver and the forecolor becomes white. I can't figure out where to control this appearance. Is it in one of the appearances in the override of the grid? The combo editor itself (which i am creating in code?) i have futzed with a bunch but can't get it to change.
Thanks,
Mel
Hi Mel,
Are you saying that when you select the row, only that one cell is changing color and not the entire row?
The appearance resolution process in the grid is quite staggeringly complicated and there are appearance properties on many different objects which could be affecting a cell. There's no way I could guess without seeing the code.
Have you tried removing the editor from the column to see if the editor is related to the issue at all?
When I select the row with the row selector every cell in the grid shows silver back with white foreground.
I reset the grid appearances before testing.
Here is the code
In Form Constuctor
Infragistics.Win.UltraWinEditors.UltraComboEditor vlColumns = null;
In Grid Init Event
e.Layout.Bands[0].ColHeadersVisible = false;
foreach (Infragistics.Win.UltraWinGrid.UltraGridColumn c in e.Layout.Bands[0].Columns)
{
c.EditorComponent = vlColumns;c.ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
}
When not an editor compenent the appearance works like normal, blue when selected with white foreground.
Thanks,Mel
melegant said:When I select the row with the row selector every cell in the grid shows silver back with white foreground.
Okay... now I am REALLY confused. Now you are saying that when you select one row, every cell in every row and every column of the entire grid turns silver?
If that's the case, then why did you mention the ComboEditor? Are you using the same ComboEditor for every column?
I don't see how selecting a single row could possibly affect every row in the grid grid, unless you are doing something very strange in our code. Are you loading a style library?
I thought I did a good job explaning what is the issue.
My first post pointed out it is a grid, with one row. To avoid confusion there is only ever one row in this grid.
I mention a ComboEditor because I created one in the form constructor as demonstrated in my 2nd post.
I use that ComboEditor , vlColumns as the EditorCompenent of each column. I set this editor compenent in the Grids Init event, as I demonstrated in my 2nd post. Notice the foreach loop that iterates through each column and sets the editor component. Each cell has the same value list that is consistent. One editor control, one value list, many columns.
SO when I select the row, using your grid row selector, there is a silver background with white foreground.
Is there a way anymore to attach an picture?
Hi,
Okay, that makes sense, now. I didn't realize you only had one row.
I am trying to narrow down the issue.
So... does the issue still occur if you do not assign the editor?
If you have more than one row in the grid, does the problem occur on every row? Or is it just the one row?
Typically, the selected row uses the system highlight colors. So something may have changed the selection colors. You could have changed these in code, or it could have been changed by a style library file loaded into your application. Are you calling StyleManager.Load?
Another possibility is that you have an ActiveRowAppearance applied which is overriding the selected appearance. Having more than one row and selecting multiple rows would shed some light on that, since you can have more than one selected row, but only one active row.
I just started with a brand new grid, and now I am getting expected results. Thanks for the help.
Hello melegant,
Are you sure that you are not loading any style library? It could be overriding your settings.
If this is not the case and you are sure about it, we will be happy to take a look at a sample reproducing this.
I reset the layout to make sure I was starting from ground 0 (IE no apperance was edited).
The first setting I edited was the SelectedRow Appearance in override. I only changed the forecolor (to purple) and sure enough when I select the row the forecolor is purple.
I next tried to changed the backcolor of that same appearance and it remains that grey color as in the screenshot. If I take the editor control out then it works. It feels like some appearance of the editor control (vlColumns) is overriding the row select appearance.
I will try to work my way backward but if you take the editor control out things go back to normal.