Telerik Forums
UI for WPF Forum
2 answers
285 views
I have had success setting colors of most things on the GanttView, but the expander toggle button and GanttPresenterSplitter continue to elude me. I can find it with Snoop and see the Path object, modify it, and see the color change. Every combination of style change, however, has failed to work on load. I even went into blend to extract the control template, but nothing there is copy-able (extract-able) like it is with RadGridView; I just get a blank template. Any thoughts would be appreciated. 

I have read over this document http://www.telerik.com/help/wpf/radganttview-styles-and-templates-overview.html, and it talks about the ExpandToggleeButton (ToggleButton) and GanttPresenterSplitter as stylable. They either just don't want to play nice or they need an odd style designation.

The general gist is everything is transparent to common background (which is a dark gradient), over which lies white text and controls; except for the splitter that I wanted solid black; of course it's white

This was tested under 2013 Q2 (6/11) release.

Any thoughts/help would be appreciated.

    <Grid.Resources>
        <Style TargetType="{x:Type telerik:RadGanttView}">
            <Style.Resources>
                <Style TargetType="telerik:ColumnHeaderContainer">
                    <Setter Property="Visibility" Value="Hidden" />
                </Style>
                <Style TargetType="{x:Type ToggleButton}">
                    <Style.Resources>
                        <Style TargetType="Path">
                            <Setter Property="Fill" Value="White" />
                        </Style>
                    </Style.Resources>
                </Style>
                <Style TargetType="Path">
                    <Setter Property="Fill" Value="White" />
                </Style>
                <Style TargetType="telerik:SimpleTreeCellContainer">
                    <Style.Resources>
                        <Style TargetType="{x:Type ToggleButton}">
                            <Style.Resources>
                                <Style TargetType="Path">
                                    <Setter Property="Fill" Value="White" />
                                </Style>
                            </Style.Resources>
                        </Style>
                        <Style TargetType="Path">
                            <Setter Property="Fill" Value="White" />
                        </Style>
                    </Style.Resources>
                    <Setter Property="Path.Fill" Value="White" />
                    <Setter Property="Background" Value="Transparent" />
                    <Setter Property="Foreground" Value="White" />
                </Style>
                <Style TargetType="telerik:TreeCellContainer">
                    <Style.Resources>
                        <Style TargetType="{x:Type ToggleButton}">
                            <Style.Resources>
                                <Style TargetType="Path">
                                    <Setter Property="Fill" Value="White" />
                                </Style>
                            </Style.Resources>
                        </Style>
                        <Style TargetType="Path">
                            <Setter Property="Fill" Value="White" />
                        </Style>
                    </Style.Resources>
                    <Setter Property="Path.Fill" Value="White" />
                    <Setter Property="Background" Value="Transparent" />
                    <Setter Property="Foreground" Value="White" />
                </Style>
                <Style TargetType="telerik:AlternatingBorderContainer">
                    <Setter Property="Background" Value="Transparent" />
                    <Setter Property="Foreground" Value="White" />
                </Style>
                <Style TargetType="telerik:MajorTickContainer">
                    <Setter Property="Foreground" Value="White" />
                </Style>
                <Style TargetType="telerik:GroupTickContainer">
                    <Setter Property="Visibility" Value="Collapsed" />
                </Style>
                <Style TargetType="telerik:GanttPresenterSplitter">
                    <Setter Property="Background" Value="Black" />
                </Style>
                <Style TargetType="telerik:GanttPresenterPanel">
                    <Style.Resources>
                        <Style TargetType="telerik:GanttPresenterSplitter">
                            <Setter Property="Background" Value="Black" />
                        </Style>
                    </Style.Resources>
                </Style>
            </Style.Resources>
        </Style>
    </Grid.Resources>
    <telerik:RadGanttView Margin="0" Name="radGanttView1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="LightGray">
        <telerik:RadGanttView.Columns>
            <telerik:TreeColumnDefinition ColumnWidth="175" Header="Title" MemberBinding="{Binding Title}" />
        </telerik:RadGanttView.Columns>
    </telerik:RadGanttView>
</Grid>
Matt
Top achievements
Rank 2
 answered on 13 Jul 2013
4 answers
118 views
Hi,
I have been using the DataFormValidationSummary outside of the DataForm within my own UserControl.  The version I've been using is 2012 Q3 11/29 and it has worked beautifully.  I recently upgraded to 2013 Q2 6/11 and now the DataFormValidationSummary no longer displays.  Hopefully you can identify why this might occur, as I would hate to have to move back to the working version.
Thanks in advance,
Steve
Steve
Top achievements
Rank 1
 answered on 12 Jul 2013
2 answers
132 views

Example : We have one customer  booking one more room.

Wenjie
Top achievements
Rank 1
 answered on 12 Jul 2013
8 answers
281 views
Hi Team,
I'm utilizing the GridView control, and everything is working great. However one thing I'm noticing is when binding to the GridViewCheckBoxColumn, and after the grid loads, the cells don't show the actual checked or unchecked value, but just a square with a minus symbol in it. I have to activate the cell to get it to show if it's checked or not. How can I get it to show the cells state without clicking on it? Or is this a binding problem? Everything else is working great.

See screenshot.

Thanks,
Ryan
Lars
Top achievements
Rank 1
 answered on 12 Jul 2013
1 answer
99 views
I have found that when loading a spreadsheet (Xlsx) that contains comments, I receive a key not found error. I stripped all the sheets of comments and it loaded. This is in 2013.2.611.45
Andrew
Telerik team
 answered on 12 Jul 2013
7 answers
253 views
I'm using a RadDiagram, composed of 3 RadDiagramContainerShape's to represent a header/footer/body of a document.  I'm using a custom RadDiagramShape.  I was originally (with no ContainerShape's) binding the RadDiagram to a GraphSource.  I've since switched and set the ItemsSource of each ContainerShape to an ObservableCollection in my ViewModel of a VM i've derived from NodeViewModelBase.  I'm handing the drag/drop operations as well.  I am able to drag an item and drop it in a container, and update the ObservableCollection to get the Container to update.  However, when I drag an item from one Container to the other, I get an exception stating:

"The Items collection cannot be used together with the ItemsSource. Please set the ItemsSource to null first."

I can see in the call stack that the observable collection was modified, resulting in this.  

Can anyone help me out with this?

Thanks,
Steve
Tina Stancheva
Telerik team
 answered on 11 Jul 2013
2 answers
133 views
I'm trying to bring an app that was written against 2012.3.1017.40 forward, and I've run up against the dropping of RadDragAndDropManager.  So I'm trying to write our stuff to use the new DragDropManager. And I'm having a problem.

We have a grid on which we want drag-and-drop reordering only sometimes.  So I've bound RowReorderBehavior.IsEnabled to a property on my viewmodel.  And here's the odd thing - it only works to turn RowReorderBehavior on, not off.

I can trace, in the debugger, the property as its value is set, and I can see it raising INotifyPropertyChanged. And if I'm setting it to true, I then trace through RowReorderBehavior.OnIsEnabledPropertyChanged(). But if I set it to false, I'm still raising INotifyPropertyChanged, but RowReorderBehavior.OnIsEnabledPropertyChanged() is never called.

I can replicate this in the Q3 2012 Row Reorder demo.

To RowReorderBehavior.cs, I add the following class:
public class SortingAllowed : INotifyPropertyChanged
{
    public SortingAllowed()
    {
        this.allowSorting = false;
    }
 
    private bool allowSorting_;
    public bool allowSorting
    {
        get { return this.allowSorting_; }
        set
        {
            this.allowSorting_ = value;
            OnPropertyChanged("allowSorting");
        }
    }
 
    public event PropertyChangedEventHandler PropertyChanged;
    private void OnPropertyChanged(string propertyName)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    }
}

Then in Example.xaml, I add a static instance to Grid.Resources, create a couple of row definitions, set a checkbox in row 0, move the RadGridView to row 1, then bind Checkbox.IsChecked and RadGridView's RowReorderBehavior.IsEnabled to the static resource:
<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Grid.Resources>
        <local:SortingAllowed x:Key="sortingAllowed" />
 
        <Style TargetType="telerik:GridViewRow"
               x:Key="DraggedRowStyle"
               BasedOn="{StaticResource GridViewRowStyle}">
            <Setter Property="telerik:DragDropManager.AllowDrag"
                    Value="True" />
        </Style>
    </Grid.Resources>
    <StackPanel Grid.Row="0" Orientation="Horizontal">
        <CheckBox IsChecked="{Binding Source={StaticResource sortingAllowed}, Path=allowSorting}">Allow sorting</CheckBox>
    </StackPanel>
    <telerik:RadGridView
                         Grid.Row="1"
                         x:Name="RadGridView1" GroupRenderMode="Flat"
                         ShowGroupPanel="False" CanUserResizeRows="True"
                         ItemsSource="{Binding Customers}"
                         RowStyle="{StaticResource DraggedRowStyle}"
                         AllowDrop="True"
                         CanUserSortColumns="False"
                         local:RowReorderBehavior.IsEnabled="{Binding Source={StaticResource sortingAllowed}, Path=allowSorting}"
                         telerik:ScrollingSettingsBehavior.IsEnabled="True"
                         telerik:ScrollingSettingsBehavior.ScrollAreaPadding="30"
                         telerik:ScrollingSettingsBehavior.ScrollStep="24"
                         telerik:ScrollingSettingsBehavior.ScrollStepTime="00:00:00.05">

Jeff
Top achievements
Rank 1
 answered on 11 Jul 2013
1 answer
39 views
I am adding a new slot every second to give the schedule view a timeline appearance. I have requirement to allow the user to edit any appointment which is not completely within a special slot is there a way to accomplish this task. Currently the moment any part of the appointment enters into a special slot it becomes read only.
Kalin
Telerik team
 answered on 11 Jul 2013
3 answers
188 views
I'm new to using the RadCartesianChart and to WPF in general and I'm having a problem figuring out how to get a value out of the chart. I don't care if it's via command, event handler, binding, or whatever as long as I can get the data. I have a DateTimeContinuousAxis as my HorizontalAxis and 2 LineSeries both binding to list of objects that all have a DateTime on them and 2 other values. Each LineSeries binds to a different one of the values. This seems to work for getting the values on the chart.

Then I added a ChartPanAndZoomBehavior to the chart and I can now zoom into a portion of the whole, which is great and very slick. However, I want to make other things on the page show information based on the date range that the user is now examining data for. The closest I got was using the LayoutUpdated on part of it and getting the HorizontalAxis's ActualRange, but that didn't reflect the fact that you it had been zoomed.

So my question in a nutshell is: Using a DateTimeContinuousAxis as my HorizontalAxis and a ChartPanAndZoomBehavior, how can I get the date range that the user is looking to use for other controls?

My chart:
<chart:RadCartesianChart Margin="0"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            x:Name="LineGraph">
    <chart:RadCartesianChart.HorizontalAxis>
        <telerik:DateTimeContinuousAxis MajorStep="4"
                                        MajorStepUnit="Week">
            <telerik:DateTimeContinuousAxis.LabelTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Vertical">
                        <TextBlock HorizontalAlignment="Center" Text="{Binding StringFormat='MMMM dd'}" />
                        <TextBlock HorizontalAlignment="Center" Text="{Binding StringFormat=yyyy}" />
                    </StackPanel>
                </DataTemplate>
            </telerik:DateTimeContinuousAxis.LabelTemplate>
        </telerik:DateTimeContinuousAxis>
    </chart:RadCartesianChart.HorizontalAxis>
 
    <chart:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxis Title="Count"
                            LabelInterval="1"
                            Minimum="0" />
    </chart:RadCartesianChart.VerticalAxis>
 
    <chart:RadCartesianChart.Grid>
        <telerik:CartesianChartGrid MajorLinesVisibility="Y" StripLinesVisibility="Y">
            <telerik:CartesianChartGrid.YStripeBrushes>
                <SolidColorBrush Color="Transparent" />
                <SolidColorBrush Opacity="0.15" Color="Gray" />
            </telerik:CartesianChartGrid.YStripeBrushes>
        </telerik:CartesianChartGrid>
    </chart:RadCartesianChart.Grid>
 
    <telerik:RadCartesianChart.Behaviors>
        <telerik:ChartTrackBallBehavior ShowIntersectionPoints="True" />
        <telerik:ChartPanAndZoomBehavior PanMode="Horizontal"
                                            ZoomMode="Horizontal" />
    </telerik:RadCartesianChart.Behaviors>
 
    <telerik:LineSeries CategoryBinding="Day"
                        ClipToPlotArea="False"
                        CombineMode="Stack"
                        ItemsSource="{Binding TasksByDay}"
                        Stroke="{StaticResource OnTrackFillAccentBrush}"
                        StrokeThickness="0"
                        Tag="Area"
                        TrackBallInfoTemplate="{StaticResource trackBallInfoTemplate}"
                        TrackBallTemplate="{StaticResource trackBallOnTrackTemplate}"
                        ValueBinding="OnTrack" />
 
    <telerik:LineSeries CategoryBinding="Day"
                        ClipToPlotArea="False"
                        CombineMode="Stack"
                        ItemsSource="{Binding TasksByDay}"
                        Stroke="{StaticResource OverDueFillAccentBrush}"
                        StrokeThickness="0"
                        Tag="Area"
                        TrackBallInfoTemplate="{StaticResource trackBallEmptyInfoTemplate}"
                        TrackBallTemplate="{StaticResource trackBallOverDueTemplate}"
                        ValueBinding="OverDue" />
</chart:RadCartesianChart>

The ItemsSource is a List<TasksDueOnDay>:
public class TasksDueOnDay
{
    public DateTime Day { get; set; }
    public int OnTrack { get; set; }
    public int OverDue { get; set; }
 
    public override string ToString()
    {
        return "TasksDueOnDay.ToString()";
    }
}
Ves
Telerik team
 answered on 11 Jul 2013
5 answers
77 views

Hello

We generate GridViewDataColumn columns in run time

We give cell template and cell edit template

When the cell goes out from edit mode it throws

Null reference exception in TryConvertValueFromEditor at GriveViewCell Class
 
Dll version 2013.2.611.45 
 
If I don’t give cell edit template this not happened. 
 
Any ideas why this happens?

 

Best Regards

Ehud

 

Ehud
Top achievements
Rank 1
 answered on 11 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?