Hi,
After i click on a Cell the whole row becomes ActiveRow , at that row the ActiveCell becomes in a different color to indicate to the user that it is the ActiveCell and i know how to change that color but it I am trying to change a cell back color, not the ActiveCell BackColor but the one on the left or right of the ActiveCell. and i simply can't find the correct way to change it. in other words, i am trying to change a cell back color which is located on an ActiveRow just not the ActiveCell.
Can you help me ?
Thanks for the feedback. Please do not hesitate to write us if you have any questions
!! exactly what i needed !!
your support at infragistics is 10 starts out of 5 !!
thank you all!
Hello Sharik,
Maybe one possible way to achieve desired behavior could be if you are using DrawFilter. Could you please take a look at th eattached sample and video file for more details and let me know if you have any questions.
public class MyDraw1 : IUIElementDrawFilter { public bool DrawElement(DrawPhase drawPhase, ref UIElementDrawParams drawParams) { EditorWithTextUIElement slot = drawParams.Element as EditorWithTextUIElement; if (drawPhase == DrawPhase.AfterDrawBackColor && slot != null) { if (slot.SelectableItem.IsSelected) { drawParams.AppearanceData.BackColor = Color.Red; drawParams.DrawBackColor(ref drawParams.AppearanceData, new Rectangle(slot.Rect.X, slot.Rect.Y, slot.Rect.Width, slot.Rect.Height), new Rectangle(slot.Rect.X, slot.Rect.Y, slot.Rect.Width, slot.Rect.Height), false); Debug.WriteLine(DateTime.Now.ToString()); } } return false; } public DrawPhase GetPhasesToFilter(ref UIElementDrawParams drawParams) { EditorWithTextUIElement slot = drawParams.Element as EditorWithTextUIElement; if (slot != null) return DrawPhase.AfterDrawBackColor; else return DrawPhase.None; } }
public class MyDraw1 : IUIElementDrawFilter
{
public bool DrawElement(DrawPhase drawPhase, ref UIElementDrawParams drawParams)
EditorWithTextUIElement slot = drawParams.Element as EditorWithTextUIElement;
if (drawPhase == DrawPhase.AfterDrawBackColor && slot != null)
if (slot.SelectableItem.IsSelected)
drawParams.AppearanceData.BackColor = Color.Red;
drawParams.DrawBackColor(ref drawParams.AppearanceData, new Rectangle(slot.Rect.X, slot.Rect.Y, slot.Rect.Width, slot.Rect.Height), new Rectangle(slot.Rect.X, slot.Rect.Y, slot.Rect.Width, slot.Rect.Height), false);
Debug.WriteLine(DateTime.Now.ToString());
}
return false;
public DrawPhase GetPhasesToFilter(ref UIElementDrawParams drawParams)
if (slot != null)
return DrawPhase.AfterDrawBackColor;
else
return DrawPhase.None;
wow did you create this view for me? thanks !!
i am indeed using the ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.CellSelect;and get the behaviur as in the video. i do this only on one row each time, and i would want that row to show as ActiveRow(whole row is colored) AND in addition to be able to color each cell (as in the video), with different color of the ActiveRow.
thanks again for the video :)
sharik said: there are few features , ActiveRow and SelectedRow(s) when clicking on a row what does actually happen ? it is now both ActiveRow and SelectedRow but which one is the top UI layer appearance wise ?
That`s correct. The ActiveRows appearance has priority over SelectedRows appearance.
I`m not sure that I understand your scenario, but maybe you are looking for the property:
ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.CellSelect;
Please take a look at the attached video for more details and please let me know if you have any questions or if you think that I misunderstood your scenario.
Regards