Telerik Forums
UI for WPF Forum
9 answers
185 views
Hello ,
I am trying to  bind my rad chart title to a string in view model.

 

 

<telerik:ChartDefaultView.ChartTitle>

 

 

<telerik:ChartTitle Content= "{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type views:PlotView}},Path=DataContext.ChartTitle}" HorizontalAlignment="Center"/>

 

 

</telerik:ChartDefaultView.ChartTitle>


But it is not getting binded niether i am getting any error.
Please help.....
Yavor
Telerik team
 answered on 06 Jul 2012
9 answers
375 views
I am using MVVM and would like to move the event handling out of the view. I am trying to handle the PageIndexChanged event of the RadDataPager by using a custom binding. The handler sets the ItemsSource of a RadGridView and the ItemCount of the pager (i.e. I am doing the paging myself). To set it up I use a style:

    <Window.Resources>
        <Style TargetType="{x:Type telerik:RadDataPager}"
               x:Key="indexChangedStyle">
            <Setter Property="local:PageIndexChangedBehavior.SetPageIndexChanged"
                    Value="True" />
        </Style>
    </Window.Resources>

        <telerik:RadDataPager x:Name="dataPager"
                              Grid.Row="1"
                              DisplayMode="All"
                              PageSize="10"
                              Style="{StaticResource indexChangedStyle}">

In the custom behavior I do this:
        public static readonly DependencyProperty SetPageIndexChangedProperty =
            DependencyProperty.RegisterAttached(
            "SetPageIndexChanged",
            typeof(bool),
            typeof(PageIndexChangedBehavior),
            new UIPropertyMetadata(true, OnSetPageIndexChanged));

        private static void OnSetPageIndexChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            RadDataPager pager = obj as RadDataPager;
            if (pager == null)
                return;

            if (e.NewValue is bool == false)
                return;

            if ((bool)e.NewValue)
                pager.PageIndexChanged += pager_PageIndexChanged;
            else
                pager.PageIndexChanged -= pager_PageIndexChanged;
        }

OnSetPageIndexChanged() never gets called. Will this methodology work? Is there a better way?

Thanks.

Andrea
Ivan Ivanov
Telerik team
 answered on 06 Jul 2012
2 answers
459 views
I'm having an issue getting a RadProgressBar to databind in a DataTemplate of a GridViewData Column. Here is my code:

<telerik:RadGridView Name="radGridView1"
                     Canvas.Left="48"
                     Canvas.Top="48"
                     telerik:StyleManager.Theme="Transparent"
                     ShowGroupPanel="False"
                     AutoGenerateColumns="False"
                     ItemsSource="{Binding}"
                     IsFilteringAllowed="False"
                     CanUserSelect="False"
                     RowIndicatorVisibility="Collapsed"
                     RowStyle="{DynamicResource GridViewRowStyle1}"
                     HeaderRowStyle="{DynamicResource GridViewHeaderRowStyle1}">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Width="300"
                                    DataMemberBinding="{Binding Path=TSE, Converter={StaticResource TSEconverter}}"
                                    Header="TSE"
                                    CellStyle="{StaticResource GridViewCellStyle1}"
                                    HeaderCellStyle="{StaticResource GridViewHeaderCellStyle1}" />
        <telerik:GridViewDataColumn Width="100"
                                    DataMemberBinding="{Binding Path=My_Count}"
                                    Header="Count"
                                    CellStyle="{StaticResource GridViewCellStyle1}"
                                    HeaderCellStyle="{StaticResource GridViewHeaderCellStyle1}"
                                    TextAlignment="Center"
                                    HeaderTextAlignment="Center" />
        <telerik:GridViewDataColumn Width="150"
                                    DataMemberBinding="{Binding Path=My_Percent_Double, Mode=OneWay}"
                                    Header="Status"
                                    CellStyle="{StaticResource GridViewCellStyle1}"
                                    HeaderCellStyle="{StaticResource GridViewHeaderCellStyle1}"
                                    TextAlignment="Center"
                                    HeaderTextAlignment="Center">
                <telerik:GridViewDataColumn.CellTemplate>
                    <DataTemplate>
                            <telerik:RadProgressBar Name="PercentBar"
                                                    Orientation="Horizontal"
                                                    Margin="0"
                                                    Height="24"
                                                    Style="{StaticResource statusBar}"
                                                    Value="{Binding Path=My_Percent_Double, Mode=OneWay}" />
                    </DataTemplate>
                </telerik:GridViewDataColumn.CellTemplate>
            </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn Width="100"
                                    DataMemberBinding="{Binding Path=My_Status}"
                                    Header="2pd"
                                    CellStyle="{StaticResource GridViewCellStyle1}"
                                    HeaderCellStyle="{StaticResource GridViewHeaderCellStyle1}"
                                    TextAlignment="Center"
                                    HeaderTextAlignment="Center" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

I can see the progress bar on project run, but no values are present (zero bars). What am I doing wrong?
Tingting
Top achievements
Rank 1
 answered on 06 Jul 2012
3 answers
134 views
Hello,

Is it possible to show collection items on the same grid instead of a separate custom editor ? I mean like this:

Name
Players
    [0] Player 1
             Player1 property1
             Player1 property 2
             ...
    [1] Player 2
             Player2 property1
             Player2 property 2
             ...
TeamColor
SomeOtherProperty

Dimitrina
Telerik team
 answered on 06 Jul 2012
1 answer
103 views
I posted this in TimePicker forum but that forum seems to get less attention so cross posting here.

It appears the default behavior when selecting a time is by mouse click only. Can I select via enter key?  
I have the following requirement:

- the time picker control shall enable selection of time by pressing Enter key

Before I start intercepting key press events etc., I just want to make sure there are not setter properties I could be unaware of which would enable this behavior. 


http://www.telerik.com/community/forums/wpf/timepicker/directional-navigation-selection.aspx#2170625 

Ivo
Telerik team
 answered on 06 Jul 2012
1 answer
162 views
hi ...

I wish to know if it is possible to view the rad dataform in new item mode when i click on a button which is not the one on the form.
I am not using the command buttons on the raddataform.

I really need a quick solution to do this.

Regards,
Shaimaa
Philippe
Top achievements
Rank 1
 answered on 06 Jul 2012
2 answers
235 views

Hi, I'm evaluating RadGridView at the moment, and I need to implement group headers in such way that for a set of columns sums of values is showed in header, but aligned with columns. I've attached image of what am I trying to achieve (marked few examples with red).

I've looked in your examples and there is similar functionality which allows implementing same thing but in group footer.

Can you help me with this?

Thanks,

Nenad.

Nenad
Top achievements
Rank 1
 answered on 05 Jul 2012
3 answers
117 views

I've removed header, footer and borders from RadDataForm:

<t:RadDataForm ItemsSource="{Binding Item}" MinHeight="300" MinWidth="300"
          AutoEdit="True" BorderThickness="0" Background="Transparent"
          CommandButtonsVisibility="None" BorderBrush="Transparent"
          ValidationSummaryVisibility="Collapsed" />

But two lines are present. How to remove horizontal lines?
enter image description here

Vanya Pavlova
Telerik team
 answered on 05 Jul 2012
6 answers
246 views
Hi,

Is it possible to create a list using mail merge?

For example, I wish to create a "summary page" listing pricing details for an order. It would be great if mail merge could take my pricing list/collection and create tables and rows.

If not then I guess I could either create a Document table and populate the cells with my data. Another option may be to use the UI Element feature of RadDocument and insert a RadGridView.

Thank you for your time.
Martin Ivanov
Telerik team
 answered on 05 Jul 2012
1 answer
124 views
Hi,

I would like to display the RadLinearSparkline for 2 values that I have, relative to zero being the bottom of the graph.So, if I had 2 values, 500 and 1000, and they get displayed in the graph, I would like the first point to be displayed middle-left and the next point (1000) to be top-right... hope that makes sense? so, if I had 2 other points, 0 and 50, the first point would be bottom-left and the next one top-right. At the moment, the first point is displayed bottom-left (or top-left depending if the next value is higher or lower), but that is not what I want.

I'm sure it's just some of the properties that I have to set correctly, but I having some trouble finding the right one/combination.

Thanks.
Yavor
Telerik team
 answered on 05 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?