Hi,
I've presenting a very large data-set within a XamGrid, each line has different display style and I'm using conditional formatting to do so.
I'm setting all conditional formatting via code after some long loading process.
My problem is that once user selects a row, the style of the row becomes the default style of a selected-row, where the conditional formatting is lost.
I would like the conditional formatting to stay, even when user selects row, and just show a border around the row, make the font bold or any other small appearance change that will let the user know row is selected while keeping the conditional formatting as is?
this is the relevant part of conditional formatting - using a dictionary to create all types of styles
/// <summary> /// /// </summary> /// <param name="sourceDataObject"></param> /// <param name="sourceDataValue"></param> /// <returns></returns> protected override Style EvaluateCondition(object sourceDataObject, object sourceDataValue) { LogViewerLineInfo lvli = sourceDataObject as LogViewerLineInfo;
if (!_styles.ContainsKey(lvli.DisplayAttributes)) _styles.Add(lvli.DisplayAttributes, CreateStyleFromDisplayAttributes(lvli.DisplayAttributes));
return _styles[lvli.DisplayAttributes]; }
private Style CreateStyleFromDisplayAttributes(EOILogViewerDisplayAttributes eOILogViewerDisplayAttributes) { Style style = new Style(typeof(ConditionalFormattingCellControl)); style.Setters.Add(new Setter() { Property = ConditionalFormattingCellControl.ForegroundProperty, Value = new SolidColorBrush((Color)ColorConverter.ConvertFromString(eOILogViewerDisplayAttributes.ForegroundColor)) }); style.Setters.Add(new Setter() { Property = ConditionalFormattingCellControl.BackgroundProperty, Value = new SolidColorBrush((Color)ColorConverter.ConvertFromString(eOILogViewerDisplayAttributes.BackgroundColor)) }); style.Setters.Add(new Setter() { Property = ConditionalFormattingCellControl.VerticalAlignmentProperty, Value = VerticalAlignment.Center }); return style; }
OK, thanks!
Hello eligazid,
Currently I cannot say whether this is a bug or not. The development team will investigate it. Also I cannot give you a time frame regarding when the issue will be resolved. It depends on the development team and their workload. You will receive a notification when the issue has any development.
As discussed in this thread:http://ko.infragistics.com/community/forums/t/57988.aspxthe selection color is set by changing the control's template and more specific its visual states.
However there is an issue when the xamGrid is using conditional formatting. This issue is preventing the xamGrid to pickup any new template which makes changes to the selection style. This is why currently I cannot provide you with the workaround you are requesting.
Sincerely,Radko KolevSenior Software Developer
Hi, so this is a bug?
when you say 'future sprint' does it mean days, weeks or months...?
In the meanwhile, a workaround for me would be that only one column will be marked as selected rather than the entire row, how can I do that (without changing the selection mode to 'cells')?
Hello eligazit,I have investigated your issue, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 229120. This will be assigned to a developer in a future sprint to review my investigation and confirm my findings or to offer a fix, or other resolution.Please let me know if you need more information.