Telerik Forums
UI for WPF Forum
1 answer
118 views
Hello,
I want Fields of RadDataForm (AutoGenerateFields = "true") to satisfy the conditions:
1. Width of field is not depended on the length of the string in this field. 
2.All labels have the equal width (= max {with = auto})
 



Yoan
Telerik team
 answered on 27 Sep 2013
1 answer
108 views
Hello everyone,

I'm posting in General Discussions because I'm not sure which control to use.

I want to display properties of two objects side by side for comparison.  Is it possible to add more columns to PropertyGrid? That would be perfect for me.

I cannot use GridView because it displays records in rows (I want them in column like in PropertyGrid). Is there a way to swap rows with columns in GridView or specify orientation? Just like in StackPanel?

I'm open to any other suggestions as well. 

Thanks,
Umar
Dimitrina
Telerik team
 answered on 27 Sep 2013
5 answers
1.3K+ views
Hello,

I've got double click on a task on the right hand side working, but cannot seem to be able to double click on a row on the grid on the left hand side?

Any pointers?

thanks
Vladi
Telerik team
 answered on 26 Sep 2013
1 answer
216 views
Hi Telerik team,

 I want to filter columns by specifying wildcards. Is there any way to specify the wildcard as bellow:
 columnFilter.FieldFilter.Filter1.Value=cell.value;

I have another query regarding the performance in gridview. I had binded the grid to a datatable with 100 columns X 10000 rows. When i apply programmatic filtering or sorting, the grid lags. I had enabled the virtualization in the grid, but it didnt had any improvement. 

Is there any other way to filter the columns in the grid other than specified in your help . i had used IColumnFilterDescriptor , but its slow. Is there any other way to filter .

Following are the system environment:
WPF version: 4.5
OS: windows 7
exact version of the Telerik product: 2013 Q2 SP1
preferred programming language :  C#

Regards
Nitin
Dimitrina
Telerik team
 answered on 26 Sep 2013
13 answers
197 views
Hello,

We work on a project with EF5 (DbContext) and MVVM WPF Light Toolkit.
So, to load data on the RadGridView, we try to use QueryableEntityCollectionView, instead of RadEntityFrameworkDataSource, it seems to be the good approach ?

But when we want to include graph object when we load entities (with relatedObjectsToInclude in the ctor) when have a problem with the inheritance of the model because we have 2 levels. The message is : 

An include path specified is not valid. The EntityType 'OPY.Entities.Sinistre' does not declare a navigation property with the name 'Agent'.

The model :

[Sinistre]
   |
[SinistrePS]
[----------]      
[ AgentId  ] ---------- [Agent]
   |
[Others class]

The code :

this.SinistreDataView = new QueryableEntityCollectionView<SinistrePS>(
  ((IObjectContextAdapter)_bdd).ObjectContext, "Sinistres", new List<string>() { "Agent" });

As you can see, we want to load "SinitrePS" with all derived but we are forced to use "Sinistres" (top level) as entitySetName because the SinistrePS class don't have it own entityset on the model. 

How can we do ?
Thx

JMazeran
Top achievements
Rank 1
 answered on 26 Sep 2013
2 answers
185 views
Hi

I am facing tab index ordering issue. See the screenshot. When tab key pressed, i want to navigate like 1,2,3.......18,19,20. I have also included a sample project code here:

<telerik:RadGridView x:Name="radGridView" Grid.Row="1" AutoGenerateColumns="False"
                             AutoExpandGroups="True"
                             ColumnWidth="100">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="First Name" TextWrapping="Wrap" TabStopMode="Skip" DataMemberBinding="{Binding FirstName}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding TabIndex}">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <TextBox Text="{Binding TabIndex}" TabIndex="{Binding TabIndex}"></TextBox>
                            </StackPanel>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding TabIndex2}">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <TextBox Text="{Binding TabIndex2}" TabIndex="{Binding TabIndex2}"></TextBox>
                            </StackPanel>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
Ilias
Top achievements
Rank 1
 answered on 26 Sep 2013
5 answers
237 views
Hello,

I attach the sources to reproduce the issue. I used Q3 2011. I've a grid bound to a list of items that have a property "Name". This name can be wrapped inside the datatemplate of the gridview column. If you scroll down to the bottom of the grid, the last item is not fully visible (please see attached screenshot for details). In some cases the last item is not visible at all, depending on the size of the wrapped text and the width of the column. I've played with different sizes and was able to reproduce the issue.

We have an application in production and this issue is very important for us.

Notes: In the example, to generate test data I've used "nbuilder" that can be obtained from NuGet.

<Window x:Class="GridViewBug.MainWindow"
        Title="MainWindow"
        WindowState="Maximized"
        WindowStartupLocation="CenterScreen" Loaded="Window_Loaded">
    <telerik:RadGridView ItemsSource="{Binding Items}" Margin="20" AutoGenerateColumns="False">
        <telerik:RadGridView.Columns>
            <telerik:GridViewColumn Width="300" Header="Data">
                <telerik:GridViewColumn.CellTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}" TextWrapping="Wrap"  />
                    </DataTemplate>
                </telerik:GridViewColumn.CellTemplate>
            </telerik:GridViewColumn>
        </telerik:RadGridView.Columns>
    </telerik:RadGridView>
</Window>

using System.Windows;
 
namespace GridViewBug
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
 
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            DataContext = new MainWindowViewModel();
            ((MainWindowViewModel)DataContext).Test();
        }
    }
}

using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using FizzWare.NBuilder;
using FizzWare.NBuilder.Generators;
 
namespace GridViewBug
{
    public class Stuff
    {
        public string Name { get; set; }
    }
 
    public class MainWindowViewModel : INotifyPropertyChanged
    {
        private PropertyChangedEventHandler _propertyChangedEvent;
        public event PropertyChangedEventHandler PropertyChanged
        {
            add
            {
                _propertyChangedEvent += value;
            }
            remove
            {
                _propertyChangedEvent -= value;
            }
        }
 
        protected virtual void NotifyPropertyChanged(string name)
        {
            PropertyChangedEventHandler handler = _propertyChangedEvent;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(name));
            }
        }
 
        private List<Stuff> _items;
        public List<Stuff> Items
        {
            get { return _items; }
            set
            {
                _items = value;
                NotifyPropertyChanged("Items");
            }
        }
 
        public void Test()
        {
            string phrase = GetRandom.Phrase(130);
            Items = Builder<Stuff>.CreateListOfSize(70).All().With(x => x.Name = phrase).Build().ToList();
        }
    }
}


Feedback is appreciated.

Thanks.
Dimitrina
Telerik team
 answered on 26 Sep 2013
5 answers
258 views
Hello,

I'm extending your RadCartesianChart to provide Legend support. Creating them manually is not an option for us (all series are dynamic and mapped to signals configured by user), and we don't want to create user control which will contain RadCartesianChart and Legends because we need to access all properties of RadCartesianChart directly on our control because they will be configurable in external tool.

The problem I've encountered is that RadCartesianChart ignores this template and just takes the width and height of the whole control,
and not the size which was given in this template. In the end I always get legend over the graph area as if I were using Grid for layouting.

How can I resolve this?

Control template I've created for my control is this:

  <ControlTemplate TargetType="{x:Type CartesianChart:ConfigurableCartesianChart}">
                        <DockPanel LastChildFill="True">
                            <Grid Width="{TemplateBinding LegendWidth}"
                                  Height="{TemplateBinding LegendHeight}"
                                  DockPanel.Dock="{TemplateBinding LegendPosition}"
                                  Margin="5">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <TextBlock Margin="2" VerticalAlignment="Center" Text="{TemplateBinding LegendTitle}" />
                                <ItemsControl ItemsSource="{Binding Series}" Grid.Row="1">
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <Grid DataContext="{Binding Configuration}">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition />
                                                </Grid.ColumnDefinitions>
                                                <Line Width="12" Height="12" X1="0" Y1="6" X2="12" Y2="6" 
                                                      Stroke="{Binding SeriesStrokeColor}" StrokeThickness="2" 
                                                      VerticalAlignment="Center" MaxWidth="100" Margin="5" />
                                                <TextBlock Grid.Column="1" Text="{Binding DisplayName}"
                                                           VerticalAlignment="Center" />
                                            </Grid>
                                        </DataTemplate>
                                    </ItemsControl.ItemTemplate>
                                </ItemsControl>
                            </Grid>

                            <!--from CartesianChart template-->
                            <Border x:Name="layoutRoot" 
                                    BorderBrush="{TemplateBinding BorderBrush}" 
                                    BorderThickness="{TemplateBinding BorderThickness}" 
                                    Background="{TemplateBinding Background}">
                                <Grid>
                                    <ContentPresenter x:Name="emptyContent" 
                                                      ContentTemplate="{TemplateBinding EmptyContentTemplate}" 
                                                      Content="{TemplateBinding EmptyContent}" 
                                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                                      IsHitTestVisible="False" 
                                                      Visibility="Collapsed"
                                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                    <Canvas x:Name="adornerContainer" 
                                            Background="Transparent" 
                                            HorizontalAlignment="Stretch" 
                                            VerticalAlignment="Stretch">
                                        <Canvas x:Name="labelContainer" 
                                                HorizontalAlignment="Stretch"
                                                VerticalAlignment="Stretch">
                                            <Canvas x:Name="renderSurface" 
                                                    HorizontalAlignment="Stretch" 
                                                    VerticalAlignment="Stretch">
                                                <Border x:Name="plotAreaDecoration" Style="{TemplateBinding PlotAreaStyle}"/>
                                            </Canvas>
                                        </Canvas>
                                    </Canvas>
                                </Grid>
                            </Border>
                         </DockPanel>
                    </ControlTemplate>
Petar Marchev
Telerik team
 answered on 26 Sep 2013
2 answers
132 views
Hi,

I have a problem whith the CustomCommand of the RadMap. 

I use a CustomCommand for Add or remove a WMS provider. 

My problem is the CustomCommand State, when i click the button of the custom command, it is highlighted (this is ok), but when i clicking the button for second time to disable, the button remains highlighted.

Another problem, when i click the button of the custom command, it is highlighted (this is ok), but when i clik another button (ex. road view), the button not remains highlighted.

¿How I can control this?

Thanks and sorry for my english.
Jose Ramon
Top achievements
Rank 1
 answered on 26 Sep 2013
1 answer
133 views
Attached is an image of a rendered RadCartesianChart in which I am trying to overlay a CandlestickSeries on a BarSeries. First, as you can see, the Candlestickseries is horizontally left-aligned. I would like to center that series with respect to the barseries' bars but am having difficulty. Any suggestions? Another problem I am having with the same chart is that the point of the chart is to compare low and high temperatures to the usage. The chart is generating the min y and the max y values for the temperature so the CandletstickSeries may not align vertically with the BarSeries so they can be properly compared. My thought is to allow the user to adjust the temperature chart vertically up and down. To achieve this feature, I would need to get the displayed axis min-y and the displayed axis max-y and add or subtract some value from each. My problems with this is that I don't know how to get and set the displayed min axis y-value and the displayed axis max y-value and would love some suggestions. Here is my XAML so far:
<chart:RadCartesianChart Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="3"  x:Name="AccountUsageChart" Height="500" Width="875" VerticalAlignment="Top" HorizontalAlignment="Center">
 
                <chart:RadCartesianChart.HorizontalAxis>
                    <chartView:CategoricalAxis HorizontalAlignment="Center" LabelFitMode="Rotate" Title="{Binding XAxisTitle, Mode=TwoWay}" Foreground="Gray" FontSize="15"/>
                </chart:RadCartesianChart.HorizontalAxis>
 
                <chart:RadCartesianChart.VerticalAxis>
                    <chartView:LinearAxis Title="Usage" ElementBrush="#FF8EC441" FontSize="20"/>
                </chart:RadCartesianChart.VerticalAxis>
 
                <chart:RadCartesianChart.Grid>
                    <chartView:CartesianChartGrid MajorLinesVisibility="Y" />
                </chart:RadCartesianChart.Grid>
 
                <chartView:BarSeries CategoryBinding="XValue" ValueBinding="YValue" ItemsSource="{Binding BindingData}" CombineMode="Stack">
 
                    <telerik:BarSeries.PointTemplate>
                        <DataTemplate>
                            <Rectangle Fill="#FF8EC441"/>
                        </DataTemplate>
                    </telerik:BarSeries.PointTemplate>
 
                </chartView:BarSeries>
 
                <chartView:BarSeries CategoryBinding="XValue" ValueBinding="YValue" ItemsSource="{Binding ProjectedBindingData}" CombineMode="Stack" >
 
                    <telerik:BarSeries.LegendSettings>
                        <telerik:DataPointLegendSettings />
                    </telerik:BarSeries.LegendSettings>
 
                    <telerik:BarSeries.PointTemplate>
                        <DataTemplate>
                            <Rectangle Fill="Gray"/>
                        </DataTemplate>
                    </telerik:BarSeries.PointTemplate>
 
                </chartView:BarSeries>
 
                <chartView:LineSeries Visibility="{Binding ShowLineSeriesTempChart, Converter={StaticResource boolToVisibility}}" CategoryBinding="XValue" ValueBinding="Temp" ItemsSource="{Binding BindingData}" Stroke="#FF1B9DDE" >
                    <chartView:LineSeries.VerticalAxis>
                        <chartView:LinearAxis Title="{Binding TemperatureAxisTitle, Mode=TwoWay}"
                                              ElementBrush="#FF1B9DDE"
                                              HorizontalLocation="Right"
                                              Visibility="{Binding ShowLineSeriesTempChart, Converter={StaticResource boolToVisibility}}"
                                              IsInverse="{Binding FlipTempYAxisVertically, Mode=TwoWay}" />
                    </chartView:LineSeries.VerticalAxis>
                </chartView:LineSeries>
 
                <chartView:CandlestickSeries ItemsSource="{Binding BindingData}"
                                             CategoryBinding="XValue"
                                             LowBinding="LowTemp"
                                             HighBinding="HighTemp"
                                             OpenBinding="LowTemp"
                                             CloseBinding="HighTemp"
                                             Visibility="{Binding ShowCandleStickTempChart, Converter={StaticResource boolToVisibility}}" >
                     
                    <chartView:CandlestickSeries.DefaultVisualStyle>
                        <Style TargetType="chartView:Candlestick">
                            <Setter Property="MaxWidth" Value="10"/>
                            <Setter Property="HorizontalAlignment" Value="Center"/>
                            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Visible"/>
                            <Setter Property="UpFill" Value="#FF1B9DDE"/>
                            <Setter Property="UpStroke" Value="#FF1B9DDE"/>
                            <Setter Property="DownFill" Value="#FF1B9DDE"/>
                            <Setter Property="DownStroke" Value="#FF1B9DDE"/>
                        </Style>
                    </chartView:CandlestickSeries.DefaultVisualStyle>
                     
                    <chartView:CandlestickSeries.VerticalAxis>
                         
                        <chartView:LinearAxis Title="{Binding TemperatureAxisTitle, Mode=TwoWay}"
                                              Visibility="{Binding ShowCandleStickTempChart, Converter={StaticResource boolToVisibility}}"
                                              ElementBrush="#FF1B9DDE"
                                              HorizontalLocation="Right"/>
                         
                         
                    </chartView:CandlestickSeries.VerticalAxis>
                     
                </chartView:CandlestickSeries>
                 
                <telerik:RadCartesianChart.Behaviors>
                    <telerik:ChartSelectionBehavior DataPointSelectionMode="Single" >
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="SelectionChanged">
                                <ei:CallMethodAction MethodName="Bar_SelectionChanged"
                                            TargetObject="{Binding}"
                                            IsEnabled="True" />
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                    </telerik:ChartSelectionBehavior>
                </telerik:RadCartesianChart.Behaviors>
             
            </chart:RadCartesianChart>
Petar Kirov
Telerik team
 answered on 26 Sep 2013
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?