Telerik Forums
UI for WPF Forum
9 answers
981 views
Hello,

I am trying to implement MVVM pattern using RadGridView.
I have a People property as the ItemsSource of the Grid.
Now, I also have a SelectedPeople property that I want to bind to the grid (Two Way).
Anyone knows how can that be supported in RagGridView?

Thanks!
Dimitrina
Telerik team
 answered on 21 May 2014
12 answers
164 views
Hi,
Copying from a TFS PBI Description into a rad Rich Text Box does not work.
Could this be due to different rich text formats and is there a way to fix this ?
Thanks
- Chris
Mihail
Telerik team
 answered on 21 May 2014
3 answers
424 views
Hi.

I have one problem.

My source is below.

             <telerik:RadCartesianChart.SeriesProvider>
                <telerik:ChartSeriesProvider Source="{Binding Series}">
                    <telerik:ChartSeriesProvider.SeriesDescriptors>
                        <telerik:CategoricalSeriesDescriptor ItemsSourcePath="Data" ValuePath="Value" CategoryPath="LocalTime">
                            <telerik:CategoricalSeriesDescriptor.Style>
                                <Style TargetType="telerik:LineSeries">
                                    <Setter Property="StrokeThickness" Value="1"/>
                                    <Setter Property="Visibility" Value="{Binding Name , Converter={StaticResource pointFocusConverter}}"/>
                                    <Setter Property="ShowLabels" Value="{Binding Path=DataContext.Ribbon.IsShowLabel, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
                                    <Setter Property="LegendSettings">
                                        <Setter.Value>
                                            <telerik:SeriesLegendSettings Title="{Binding Name}" />
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="VerticalAxis">
                                        <Setter.Value>
                                            <MultiBinding Converter="{StaticResource multiVerticalAxisConverter}">
                                                <Binding Path="Data"/>
                                                <Binding Path="DataContext.Series" ElementName="lineChart"/>
                                            </MultiBinding>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </telerik:CategoricalSeriesDescriptor.Style>
                        </telerik:CategoricalSeriesDescriptor>
                    </telerik:ChartSeriesProvider.SeriesDescriptors>
                </telerik:ChartSeriesProvider>
            </telerik:RadCartesianChart.SeriesProvider>


Currently, good work.

But I want to wort setter about [Property="VerticalAxis"]

Now chart is changed by changing [ItemsSourcePath="Data"]

But converter of 'VerticalAxis' do not work.

Why is this not work?

What should I do for working of converter ?

Petar Marchev
Telerik team
 answered on 21 May 2014
1 answer
202 views
Hi,

I have a short question belonging to the the GridLines in a GridView.
Is it possible to format the GridLines inidividual for each row?  (e.g. the width or color).

Thanks

Vanya Pavlova
Telerik team
 answered on 21 May 2014
4 answers
466 views
Is there a way to make either the RadMaskedNumericInput or RadMaskedTextBox accept only non negative integers?
Juan
Top achievements
Rank 1
 answered on 21 May 2014
7 answers
340 views
I am a long time Telerik user, and I love the ShowColumnWhenGrouped attribute, I've wanted this functionality for a long time.  It works great when the user drags a column to the group bar, but when set in XAML with a column grouping defined in XAML, it is ignored.  Is this a bug, and is there a workaround?  Thanks.
Chuck
Top achievements
Rank 1
 answered on 20 May 2014
1 answer
184 views
Hi,

i can't find how to load a second combobox on demand depending  what is selected in the first combobox? For Example, i select "Audi" in
the first combobox and the second should load all Audis "A1, A2, A3, A4, A5,..." out of a csv-File!

Thanks
Best Regards
Rene
Kalin
Telerik team
 answered on 20 May 2014
1 answer
375 views
I'm trying to make a custom appointment following this tutorial. I clone the style using Right Click -> Edit Template -> Edit a Copy. The resulting code has several  ambiguous reference error. I read that the solution is to use the fully qualified namespace but I don't know which option is correct.

One of the errors is in the line 
<Style TargetType="{x:Type telerik:DragVisual}">

but DragVisual is defined in both Telerik.Windows.Controls and Telerik.Windows.DragDrop. Which one should I use?
Alek
Telerik team
 answered on 20 May 2014
1 answer
79 views

Hello,

i am using a Gridview that is having a RadObservableCollection<T> (where T is DependencyObject, INotifyPropertyChanged) as ItemsSource. The same collection is also used in a Chartview as Datasource for a Lineseries.
Any changes in the Chart (Drag&Drop) are reflected in the Gridview and the other direction works too.

My problem is the way the editing is passed on:
I have a Double Column which is editable and reflect the values that are shown in the Chart too. But the editing changes are passed on the the chart on every keypress during the editing which is very irritating.

So lets say someone wants to enter 749 as new value the behavior is now like this:

  • press key 7 -> datapoint in chart jumps to Y-Value 7
  • press key 4 -> datapoint in chart jumps to Y-Value 74
  • press key 9 -> datapoint in chart jumps to Y-Value 749

what i want is this:

  • press key 7 -> nothing
  • press key 4 -> nothing
  • press key 9 -> nothing
  • press return -> datapoint in chart jumps to Y-Value 749

I guess I need to block some notification sending in the BeginningEdit event and pass out the final new value only in the CellEditEnded event. But i havent been able to work out how.

Thanks in advance!
Mikk

Mikk
Top achievements
Rank 1
 answered on 20 May 2014
2 answers
717 views
I've run into a problem where if the DataContext is set too late in the initialization/rendering process, bindings on the IsVisible property of columns are never established. Below is an example showing the problem.

If you establish the DataContext in the constructor, it works as expected; the Number column is not shown, and you can toggle its display using the checkbox.

However, if you comment out that line, run the app, and use the button to establish the DataContext after the grid has rendered, the Number column is shown even though ShowNumber is false, and the binding does not respond to changes in ShowNumber (again using the checkbox).

I found a work-around by re-establishing the binding after setting the DataContext, but this is ugly and much less maintainable.

Is there a way I can force it to update the column bindings when the DataContext is set, rather than re-creating the binding for every column on which I need to control visibility?

Thanks,
Louis

XAML:
<Window x:Class="DelayedBinding.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <telerik:RadGridView Grid.Row="0" x:Name="radGridView" AutoGenerateColumns="False" ItemsSource="{Binding Path=Items}"
                                 IsFilteringAllowed="False" ShowGroupPanel="False" CanUserSortColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Name" Width="65"
                                            DataMemberBinding="{Binding Path=Name}"/>
                <telerik:GridViewDataColumn IsVisible="{Binding Path=ShowNumber}" Header="Number" Width="65" x:Name="NumberColumn"
                                            DataMemberBinding="{Binding Path=Number}"/>
                <telerik:GridViewDataColumn Header="Group" Width="65"
                                            DataMemberBinding="{Binding Path=Group}"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
        <StackPanel Grid.Row="1" Orientation="Horizontal">
            <Button Click="ConnectVM" Content="ConnectVM" Margin="5"/>
            <CheckBox IsChecked="{Binding Path=ShowNumber}" Content="Show Number" VerticalAlignment="Center"/>
        </StackPanel>
    </Grid>
</Window>

Code-behind:

using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows;
 
namespace DelayedBinding
{
    public class Item
    {
        public string Name { get; set; }
        public int Number { get; set; }
        public string Group { get; set; }
    }
    public partial class MainWindow : Window, INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        public ObservableCollection<Item> Items { get; private set; }
        private bool _ShowNumber = false;
 
        public bool ShowNumber
        {
            get { return _ShowNumber; }
            set
            {
                _ShowNumber = value;
                if (PropertyChanged != null)
                    PropertyChanged(this, new PropertyChangedEventArgs("ShowNumber"));
            }
        }
 
        public MainWindow()
        {
            Items = new ObservableCollection<Item>();
            for (int i = 0; i < 5; i++)
                Items.Add(new Item() { Name = "Object " + i, Number = i, Group = (i % 2 == 1 ? "Odd" : "Even") });
            InitializeComponent();
            // If we connect the DataContext here, everything works fine!
            DataContext = this;
        }
 
        private void ConnectVM(object sender, RoutedEventArgs e)
        {
            // If we wait to connect it here, the ShowNumber binding isn't established!
            DataContext = this;
            // This is the work-around, by re-establishing the binding, the grid again works correctly.
            //NumberColumn.SetBinding(Telerik.Windows.Controls.GridViewColumn.IsVisibleProperty, "ShowNumber");
        }
    }
}
Boris
Telerik team
 answered on 20 May 2014
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?