Hello,
I'm currently testing the RadGridView with Load On Demand behaviour and I'm having some issues.
I'm using Entity Framework and when grouping the GridView the rows within some groups appear twice. This happens sometime just after opening the groups but sometimes not until clicking on the row within the group. Then a second row appears within that group.
This only happens when using VirtualQueryableCollectionView as ItemsSource of the GridView. When using ObservableCollection everything is ok. It's also in both cases ok, when no grouping is used - also when removing the grouping after having the duplicated rows. The affected groups are mostly those displayed at the top of the gridview. When changing the sort order of the column before grouping the column, the groups with duplicated rows are at the bottom.
using System;using System.Collections.Generic;using System.Collections.ObjectModel;using System.Linq;using Telerik.Windows.Controls;using Telerik.Windows.Data;using GalaSoft.MvvmLight.Messaging;namespace PsShell.ViewModels.Articles.CtlArticleMainSelection { public class ArticleMainSelectionViewModel : ViewModelBase { public delegate ArticleMainSelectionViewModel Factory(); public ArticleMainSelectionViewModel() { } private PsShell.Models.Articles.CtlArticleMainSelection.ArticleModel _selectedArticle = null; public PsShell.Models.Articles.CtlArticleMainSelection.ArticleModel SelectedArticle { get { return _selectedArticle; } set { _selectedArticle = value; OnPropertyChanged("SelectedArticle"); } }// private ObservableCollection<Models.Articles.CtlArticleMainSelection.ArticleModel> _articles = null;// public ObservableCollection<Models.Articles.CtlArticleMainSelection.ArticleModel> Articles { private VirtualQueryableCollectionView _articles = null; public VirtualQueryableCollectionView Articles { get { if (_articles == null) { var context = new Models.Articles.CtlArticleMainSelection.ArticleContext(); var query = from gp in context.BusinessPartner orderby gp.geschaeftspartner_id ascending select new Models.Articles.CtlArticleMainSelection.ArticleModel() { Name1 = gp.Name1, Name2 = gp.Name2 }; _articles = new VirtualQueryableCollectionView(query) { LoadSize = 50, VirtualItemCount = 150 }; // duplicate row in group// _articles = new ObservableCollection<Models.Articles.CtlArticleMainSelection.ArticleModel>(query); // ok } return _articles; } } }}
<UserControl x:Class="PsShell.Views.Articles.CtlArticleMainSelectionView" xmlns:globalization="clr-namespace:System.Globalization;assembly=mscorlib" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="1400"> <DockPanel LastChildFill="True"> <telerik:RadGridView x:Name="gvArticles" ItemsSource="{Binding Articles}" SelectedItem="{Binding SelectedArticle, Mode=TwoWay}" IsReadOnly="True" EnableRowVirtualization="True" EnableColumnVirtualization="True" AutoGenerateColumns="False" ShowGroupPanel="True" GroupRenderMode="Flat" IsSynchronizedWithCurrentItem="True" SelectionMode="Single" FilteringMode="FilterRow" ScrollMode="RealTime"> <telerik:RadGridView.SortDescriptors> <telerik:ColumnSortDescriptor Column="{Binding Columns[\Name1\], ElementName=gvArticles}" SortDirection="Ascending"/> </telerik:RadGridView.SortDescriptors> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name1}" Width="400" ShowDistinctFilters="False"/> <telerik:GridViewDataColumn Header="Namenszusatz / Vorname" DataMemberBinding="{Binding Name2}" Width="300" ShowDistinctFilters="False"/> </telerik:RadGridView.Columns> </telerik:RadGridView> </DockPanel></UserControl>
A second issue is the performance. When using ObservableCollection as ItemsSource the performance is ok. But when using VirtualQueryableCollectionView the performance is unacceptable slow. I can see the empty grid for about 2 seconds before it is populated with data - and this with a Loadsize of 50 items (in this example it's a bit faster because I reduced the columns from about 10 to 2). I noticed that when using GroupRenderMode="Nested" the performance is noticeable faster, but that isn't the recommended way because of performance issues when using nested grouping.
Best Regards
Raul
I use auto generate property and find it to an object with a string property....
(in edit mode) if i type a super long text into the textbox, the width of the textbox would keep increasing so the whole text is always visible
How can i change that behavior to have width of the textbox fixed?
Please see attached
I have a WPF window that contains a Telerik RadPaneGroup, and in it I have a RadPanes:
<telerik:RadPaneGroup> <telerik:RadPane x:Name="ticketMapPane" Header="Map" CanUserPin="False" CanFloat="{Binding preferencesProperties.canFloatPanes}" IsHidden="{Binding Path=viewModel.stickyProperties.mapPaneVisible, RelativeSource={RelativeSource AncestorType=KtWpf:KorWindow}, Mode=TwoWay, Converter={StaticResource boolInverterConverter}}" telerik:RadDocking.SerializationTag="ticketMapPane" > <local:TicketMap x:Name="ticketMap" ticketMapType="{Binding RelativeSource={RelativeSource AncestorType=KtWpf:KorWindow}, Path=viewModel.preferencesProperties.ticketMapType}" /> </telerik:RadPane></telerik:RadPaneGroup>The ticketMapPane.IsHidden property is bound to the negation of stickyProperties.mapPaneVisible, so if mapPaneVisible is true, IsHidden is false, and the pane is displayed.
If mapPaneVisible is true on startup, ticketMapPane is visible, and ticketMap.ticketMapType is bound correctly to preferencesProperties.ticketMapType, and all is well with the world.
If I then manipulate the UI control that sets stickyProperties.mapPaneVisible to false the pane becomes invisible, if I set it to true the pane becomes visible again, and ticketMapType is bound correctly through it all.
But if stickyProperties.mapPaneVisible is false on startup, ticketMapPane is hidden, and ticketMapType doesn't seem to be bound.
I have a change handler on the ticketMapType property. It's called, when the ticketMapPane is visible on startup, and it is not, when it is not:
public partial class TicketMap : KorUserControl{ public TicketMapType ticketMapType { get { return (TicketMapType)GetValue(ticketMapTypeProperty); } set { SetValue(ticketMapTypeProperty, value); } } public static readonly DependencyProperty ticketMapTypeProperty = DependencyProperty.Register("ticketMapType", typeof(TicketMapType), typeof(TicketMap), new PropertyMetadata(new PropertyChangedCallback(ticketMapTypePropertyChanged))); private static void ticketMapTypePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var ticketMap = d as TicketMap; if (ticketMap != null && e.NewValue is TicketMapType) { var ticketMapType = (TicketMapType) e.NewValue; ticketMap.setTicketMapType(ticketMapType); } } [...]}So what is happening is that if the pane is hidden on startup, when I make it visible the TicketMap.ticketMapType contains the default value, and not the value that it was supposed to be bound to. If the pane is visible on startup, everything binds correctly.
So, the question - how do I get this to work?
I can see two possibilities:
Any ideas as to how to do either?
I'm trying to render appointments in the scheduleview but only entire days are rendered as shown in attachment.
I'm using the Scheduleview like this
<telerik:RadScheduleView x:Name="MainSchedule" Grid.Column="1" Margin="2" NavigationHeaderVisibility="Collapsed" AppointmentsSource="{Binding Appointments}" ResourceTypesSource="{Binding ResourceTypes}" SelectedAppointment="{Binding SelectedAppointment, Mode=TwoWay}" MouseDoubleClick="MainSchedule_MouseDoubleClick" CurrentDate="{Binding DateStart}" GroupHeaderContentTemplateSelector="{StaticResource GroupSelector}" AppointmentItemContentTemplate="{StaticResource AppointmentTemplate}"> <telerik:RadScheduleView.GroupDescriptionsSource> <scheduleView:GroupDescriptionCollection> <scheduleView:ResourceGroupDescription ResourceType="Staff" /> </scheduleView:GroupDescriptionCollection> </telerik:RadScheduleView.GroupDescriptionsSource> <telerik:RadScheduleView.ViewDefinitions> <telerik:TimelineViewDefinition TimerulerGroupStringFormat="{}{0:dd MMM}" TimerulerMajorTickStringFormat="{}{0:HH}" TimerulerMinorTickStringFormat="{}{0:HH}"/> </telerik:RadScheduleView.ViewDefinitions> </telerik:RadScheduleView>
private void LoadHolidays() { if (_holidayResource != null) { Appointments.Clear(); var holidays = _dataService.GetManager().TblDatStaffTime.Where(st => st.TblLstActivity.ActivityType == "Holiday" && st.RealStart >= this.CurrentView.MainSchedule.CurrentDate.FirstDayOfMonth() && st.RealEnd < this.CurrentView.MainSchedule.CurrentDate.LastDayOfMonth()).Execute(); foreach (TblDatStaffTime item in holidays) { var appt = new HolidayAppointment(item); if (_holidayResource.Where(c => c.Key == item.StaffID.ToString()).Count() > 0) { appt.Resources.Add(_holidayResource[item.StaffID.ToString()]); this.Appointments.Add(appt); } } var countApp = this.CurrentView.MainSchedule.AppointmentsSource; } }
public class HolidayAppointment : Appointment { private bool isReadOnly; public TblDatStaffTime Holiday { get; set; } public HolidayAppointment(TblDatStaffTime holiday) { this.Holiday = holiday; } public bool IsReadOnly { get { return this.Storage<HolidayAppointment>().isReadOnly; } set { var storage = this.Storage<HolidayAppointment>(); if (storage.isReadOnly != value) { storage.isReadOnly = value; this.OnPropertyChanged(() => this.IsReadOnly); } } } public override string Subject { get { return Holiday.TblLstActivity.ShortName; } } public SolidColorBrush HolidayBrush { get { return new SolidColorBrush(StringExtensions.HexStringToColor(Holiday.TblLstActivity.Color)); } } public override DateTime Start { get { return this.Holiday.RealStart; } set { base.Start = this.Holiday.RealStart; this.OnPropertyChanged(() => this.Start); } } public override DateTime End { get { return this.Holiday.RealEnd; } set { base.End = this.Holiday.RealEnd; this.OnPropertyChanged(() => this.End); } } private string GetTranslation() { string result = string.Empty; switch (IdentityCSD.Language) { case IdentityCSD.Languages.EN: result = Holiday.TblLstActivity.DescEN; break; case IdentityCSD.Languages.NL: result = Holiday.TblLstActivity.DescNL; break; case IdentityCSD.Languages.FR: result = Holiday.TblLstActivity.DescFR; break; case IdentityCSD.Languages.GE: result = Holiday.TblLstActivity.DescGE; break; default: result = Holiday.TblLstActivity.DescLC; break; } return result; } }So that appoinments that are showing are 24 hours long. And those which are not showing are less. Anyone got a solution for this ?
In Visual Studio 2012 I have problem with a RadGridView using a project binding source. It happened after making a change in my code and recompiling.
Sometimes the problem will magically go away after clicking on a different control and then clicking on the grid again. Other times I have to completely close VS and reopen it.
Hopefully someone has suggestions on how to fix it.

Hello,
Where can I download the NuGet packages for WPF ? Your UG is not like in live site
http://docs.telerik.com/devtools/wpf/installation-and-deployment/installing-telerik-ui-on-your-computer/installation-installing-from-nuget-wpf#installing-wpf-controls-package
is this possible to get the download zip packages for all the controls that is mentioned in UG?
Thanks,
Abbas K

Hi,
I want hide a row completely in radgridview when specific columns contains null(empty) values.