Hi,
I have a RadGridView that I want to autogenerate columns for, but I also need to add converters to the bindings based on the datatype of the column. I got as far as creating a to attach to the RadGridView.AutoGeneratingColumn event:
private void AutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e){ if (e.ItemPropertyInfo.PropertyType == typeof(DateTimeOffset)) { var col = e.Column; var binding = new Binding() { Converter = new Converters.DateTimeOffsetToLocalDateTimeConverter() }; // How to add the converter to the columns binding?!?! }}
I can't see any way to access the binding of the column to apply the converter. Am I missing something?
Thanks,
Pat
I have an object with a list of sub-objects, each of which can be a different type. These sub objects will then have a list of sub-sub-objects, which also will have different types, and I'd like them all to have different template in my tree view (to allow for different context menus, etc.)
Essentially, I'm looking to have:
- GlobalType (which contains a list of ISubType)
- SubType1 (Which contains a list of ISubSubType)
-SubSubType1
-SubSubType2
- SubType2 (Which contains a list of ISubSubType)
-SubSubType3
-SubSubType4
If I have my ItemTemplateSelector for the TreeView properly defined (i.e, for each of GlobalType, SubType1, SubType2, SubSubType1, ...), will it properly set the templates for the nested items?

I have a list of objects loaded into a RadGridView where the objects have a property that is a List<string>. This list is pulled from a list of possible values.
class myTableItem{ public int itemID {get;set;} public string name {get;set;} public List<string> tagList {get;set;}}
What I would like to do is create a filter that displays a checkbox list of all possible tag values, and any item in the table whose tagList contains any of the values selected in filter will get displayed.
How would I do this? Is this something I need to create a custom filter for?

<Window xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="RadControlsDocking.MainWindow" Title="MainWindow" Height="350" Width="525"> <Grid> <telerikDocking:RadDocking> <telerikDocking:RadDocking.DocumentHost> <telerikDocking:RadSplitContainer> <telerikDocking:RadPaneGroup> <telerikDocking:RadDocumentPane Header="A"/> <telerikDocking:RadDocumentPane Header="B"/> <telerikDocking:RadDocumentPane Header="C"/> <telerikDocking:RadDocumentPane Header="D"/> <telerikDocking:RadDocumentPane Header="E"/> <telerikDocking:RadDocumentPane Header="F"/> <telerikDocking:RadDocumentPane Header="G"/> </telerikDocking:RadPaneGroup> </telerikDocking:RadSplitContainer> </telerikDocking:RadDocking.DocumentHost> </telerikDocking:RadDocking> </Grid></Window>

Hi!
I've been browsing the forum looking for an answer to my problem and found this one: http://www.telerik.com/forums/get-recurrence-appointments-by-timespan.
What I gather from the first part of that thread is that if I want to show the appointments for the week of, say, july 8th -july 14th next year, and populate it with the occurrences produced by an main appointment starting this week, I still have to find this main appointment to figure out what occurrences to show...
Is there some preferred strategy to do this suggested by previous experiences, other than just browse my whole appointments database and check each and every one having a recurrence pattern to see if I should show its occurrences?
Thanks in advance!
Miguel Pinkas
I am trying to have 4 RadPanes in my control arranged in a 2x2 grid that are even height and width. The problem is, that I can't get the height to be the same across the RadSplitContainers. When the control is first opened, the top 2 RadPanes are much shorter than the bottom 2. Is there a way to get them to be equal?
Here is my code:
<telerikDocking:RadDocking Name="radDock" HasDocumentHost="False" telerik:AnimationManager.AnimationSelector="{x:Null}" telerik:AnimationManager.IsAnimationEnabled="False" MouseDoubleClick="RadDocking_MouseDoubleClick" >
<telerikDocking:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedTop">
<telerikDocking:RadPaneGroup>
<telerikDocking:RadPane >
<controls:SpreadView Margin="5,5,5,5" />
</telerikDocking:RadPane>
</telerikDocking:RadPaneGroup>
<telerikDocking:RadPaneGroup>
<telerikDocking:RadPane >
<controls:SpreadView Margin="5,5,5,5" />
</telerikDocking:RadPane>
</telerikDocking:RadPaneGroup>
</telerikDocking:RadSplitContainer>
<telerikDocking:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom">
<telerikDocking:RadPaneGroup >
<telerikDocking:RadPane >
<controls:SpreadView Margin="5,5,5,5" />
</telerikDocking:RadPane>
</telerikDocking:RadPaneGroup>
<telerikDocking:RadPaneGroup >
<telerikDocking:RadPane >
<controls:SpreadView Margin="5,5,5,5" />
</telerikDocking:RadPane>
</telerikDocking:RadPaneGroup>
</telerikDocking:RadSplitContainer>
</telerikDocking:RadDocking>
Hi,
I'm trying to create an horizontal bar chart with labels inside the bars, close the to right side of the bars, line in labels-inside.png. I have tried several things but the closest I could get to it was the labels right after the bars (see labels-outside.png).
How can I get the labels inside the bars close to the right edge? Is it possible?
Thanks,
Luis Barreira
I've been using ChartView for some time to create charts from a Windows service without problems. The chart control (RadCartesianChart or RadPieChart) is created and initialized in code, and then is rendered to a bitmap.
Ever since I updated the libraries to the latest version, when I try to create a pie chart, the result is always a blank image. The other chart types continue to work as expected.
The code I'm using is the following:
private bool CreatePieChartThread(MemoryStream stream, int width, int height){ RadPieChart chart = new RadPieChart { Palette = BuildColorPalette(m_chartColors), SmartLabelsStrategy = new PieChartSmartLabelsStrategy { DisplayMode = PieChartLabelsDisplayMode.SpiderAlignedOutwards } }; var labelBoxFactory = new FrameworkElementFactory(typeof(TextBlock)); labelBoxFactory.SetValue(FrameworkElement.HorizontalAlignmentProperty, HorizontalAlignment.Center); labelBoxFactory.SetBinding(TextBlock.TextProperty, new Binding("Label")); var valueBoxFactory = new FrameworkElementFactory(typeof(TextBlock)); valueBoxFactory.SetValue(FrameworkElement.HorizontalAlignmentProperty, HorizontalAlignment.Center); valueBoxFactory.SetBinding(TextBlock.TextProperty, new Binding("Value")); var panelFactory = new FrameworkElementFactory(typeof(StackPanel)); panelFactory.SetValue(StackPanel.OrientationProperty, Orientation.Vertical); panelFactory.AppendChild(labelBoxFactory); if (m_showValuesOnPie) panelFactory.AppendChild(valueBoxFactory); PieSeries series = new PieSeries { ShowLabels = true, RadiusFactor = 0.75, AngleRange = new AngleRange(-90, 360), LabelConnectorsSettings = new ChartSeriesLabelConnectorsSettings() }; series.LabelDefinitions.Add(new ChartSeriesLabelDefinition { Margin = new Thickness(-8, 0, 0, 0), Template = new DataTemplate { VisualTree = panelFactory } }); // valores ordenados por nome e sem zeros foreach (var value in m_data.Where(d => d.AlarmOccurrences > 0).OrderBy(d => d.Name)) { series.DataPoints.Add(new PieDataPoint { Label = value.Name, Value = value.AlarmOccurrences, OffsetFromCenter = 0.05, }); } chart.Series.Add(series); PrepareElementForExport(chart, width, height); ExportExtensions.ExportToImage(chart, stream, new PngBitmapEncoder()); return true;}protected void PrepareElementForExport(FrameworkElement element, int width, int height){ if (!element.IsInitialized) { element.BeginInit(); element.EndInit(); } element.Measure(Size.Empty); element.Measure(new Size(width, height)); element.Dispatcher.Invoke(() => { }); element.Arrange(new Rect(0, 0, width, height)); element.UpdateLayout();}