Hello,
I have a problem with the RadComboBox control. The telerik version that I use is Q1 2014.
When I group data using ICollectionViewSource, the data are well grouped but some items are not accessible because the scroll go directly to the next group.
How can I solve that problem ?
The code of the Group style is defined below:
Thanks in advance, this problem is critical for us.
Geofrrey
I have a problem with the RadComboBox control. The telerik version that I use is Q1 2014.
When I group data using ICollectionViewSource, the data are well grouped but some items are not accessible because the scroll go directly to the next group.
How can I solve that problem ?
The code of the Group style is defined below:
01.public FormatBox()02. {03. this.IsEditable = false;04. this.EmptyText = Translator.Translate("Generic_SelectFormat");05. 06. 07. ScrollViewer.SetCanContentScroll(this, true);08. 09. DataTemplate itemTemplate = new DataTemplate();10. 11. FrameworkElementFactory stackPanelFactory = new FrameworkElementFactory(typeof(StackPanel));12. stackPanelFactory.SetValue(StackPanel.OrientationProperty, System.Windows.Controls.Orientation.Horizontal);13. 14. FrameworkElementFactory textBlock = new FrameworkElementFactory(typeof(TextBlock));15. textBlock.SetBinding(TextBlock.TextProperty, new Binding("Name"));16. stackPanelFactory.AppendChild(textBlock);17. 18. textBlock = new FrameworkElementFactory(typeof(TextBlock));19. textBlock.SetValue(TextBlock.TextProperty, " - ");20. stackPanelFactory.AppendChild(textBlock);21. 22. textBlock = new FrameworkElementFactory(typeof(TextBlock));23. textBlock.SetBinding(TextBlock.TextProperty, new Binding("Description"));24. stackPanelFactory.AppendChild(textBlock);25. 26. itemTemplate.VisualTree = stackPanelFactory;27. 28. this.ItemTemplate = itemTemplate;29. 30. 31. GroupStyle style = new GroupStyle();32. style.HidesIfEmpty = true;33. 34. DataTemplate headerTemplate = new DataTemplate();35. 36. textBlock = new FrameworkElementFactory(typeof(TextBlock));37. textBlock.SetBinding(TextBlock.TextProperty, new Binding("Name") { Converter = new FormatBoxBooleanToTranslationConverter() });38. textBlock.SetValue(TextBlock.FontWeightProperty, FontWeights.Bold);39. textBlock.SetValue(FrameworkElement.MarginProperty, new Thickness(5, 0, 5, 0));40. textBlock.SetValue(FrameworkElement.VerticalAlignmentProperty, VerticalAlignment.Center);41. style.HeaderTemplate = headerTemplate;42. 43. FrameworkElementFactory border = new FrameworkElementFactory(typeof(Border));44. border.SetValue(Border.BackgroundProperty, new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 227, 239, 255)));45. border.SetValue(FrameworkElement.HeightProperty, 20d);46. 47. border.AppendChild(textBlock);48. 49. headerTemplate.VisualTree = border;50. 51. this.GroupStyle.Add(style);52. }Thanks in advance, this problem is critical for us.
Geofrrey