var colLabor = new GridViewComboBoxColumn();var tTemp = new DataTemplate() { DataType = typeof(Labor) };FrameworkElementFactory factoryTextBlock = new FrameworkElementFactory(typeof(TextBox)) { Name = "factoryTextBlock" };//factoryTextBlock.SetBinding(TextBlock.TextProperty, new Binding("ResourceTypeId"));factoryTextBlock.SetValue(TextBox.TextProperty, "OK BYE");factoryTextBlock.SetValue(TextBox.FontSizeProperty, 10.0d);factoryTextBlock.SetValue(TextBox.WidthProperty, 100.0d);tTemp.VisualTree = factoryTextBlock;colLabor.ToolTipTemplate = tTemp;Hi telerik support
I have a changing observable list of dates on my viewmodel, and I would like to highlight the days within that collection.
I have tried to implement my own DataTemplateSelector for the dayTemplateselector and I have managed to get the dates from my CollectionViewSource, but it seems that it only works on static data and the changes made to my collection does not appear in the Calendar.
How can I archive binding between the daytemplateSelector and my observableCollection?
<telerik:DataFormCheckBoxField Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" Label="FIRMA:" Foreground="Black" HorizontalAlignment="Left" x:Name="FirmaConf" VerticalContentAlignment="Center" VerticalAlignment="Center" DataMemberBinding="{Binding Firma,Mode=TwoWay}" /> <telerik:DataFormCheckBoxField Grid.Row="1" Grid.Column="0" Label="zeigen:" Foreground="Black" HorizontalAlignment="Left" x:Name="FirmazeigenConf" VerticalContentAlignment="Center" VerticalAlignment="Center" DataMemberBinding="{Binding FIRzeigen,Mode=TwoWay}"IsEnabled="{Binding ElementName=FirmaConf, Path=DataMemberBinding, Mode=TwoWay}"/>
<selector:CTS x:Key="CTS" DataTemplate1="{StaticResource SomeThing}" DateTemplate2="{StaticResource SomeThing2}"></selector:CTS><telerik:RadPane x:Name="FiltersPane" ContentTemplateSelector="{StaticResource CTS}" Content="{Binding Data, Mode=TwoWay}" ><DataTemplate x:Key="SomeThing"> <vw:aView DataContext="{Binding}"></vw:aView></DataTemplate><telerik:RadPane x:Name="FiltersPane" ContentTemplate="{StaticResource SomeThing}" Content="{Binding Data, Mode=TwoWay}"><telerik:RadDocking x:Name="radDockingst" HasDocumentHost="False" Background="Transparent">
<telerik:RadSplitContainer x:Name="radSplitContainerst" Orientation="Vertical">
<telerik:RadPaneGroup>
<telerik:RadPane Header="Pane Left 1" >
<telerik:RadGridView Height="auto" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Visible" telerikControls:StyleManager.Theme="Office_Blue" Margin="0,5,0,0" x:FieldModifier="public" x:Name="radGridRighe" FilteringMode="FilterRow" FontSize="11" RowHeight="18" CanUserSortGroups="True" CanUserSortColumns="True" CanUserSelect="True" AlternationCount="1" FontFamily="Tahoma" CanUserDeleteRows="False" CanUserInsertRows="False" ShowGroupPanel="False" IsReadOnly="True" Grid.Row="0" IsManipulationEnabled="True" />
</telerik:RadPane>
</telerik:RadPaneGroup>
<telerik:RadPaneGroup Background="Transparent">
<telerik:RadPane Header="Pane Left 2" Background="Transparent">
<Grid x:FieldModifier="public" Name="GridStandard">
<Grid.RowDefinitions>
<RowDefinition Height="0"/>
<RowDefinition Height="0"/>
</Grid.RowDefinitions>
</telerik:RadPane>
</telerik:RadPaneGroup>
</telerik:RadSplitContainer>
</telerik:RadDocking>
public class RowViewModel : INotifyPropertyChanged{ public RowViewModel(Deal deal) { Deal = deal; } public Deal Deal { get; private set; } public event PropertyChangedEventHandler PropertyChanged; public void UpdateBookingStatus() { Deal.IsBooked = true; Deal.BookingTime = DateTime.UtcNow; OnPropertyChanged("Deal"); } protected virtual void OnPropertyChanged(string propertyName) { var handler = PropertyChanged; if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName)); }}public class Deal{ public string Id { get; private set; } public DateTime ReceivedTime { get; private set; } public DateTime? BookingTime { get; set; } public bool IsBooked { get; set; } public Deal(string id, DateTime receivedTime) { Id = id; ReceivedTime = receivedTime; }}OnPropertyChanged("Deal") event and update all columns using that property?