Hi,
I have all my code working great except for this one thing. When I add an item to the bound collection of the gridview my rowdetails template displays and all is well except that the + does not toggle to a -. How do I change this via code? I tried doing it in the OnCollectionChanged event (for the Add action) by setting the IsExpanded flag, but when I try to do a GetRowForItem, it returns null. If I try to find the selected item via MyGrid.ChildrenOfType<GridViewRow>(), ALL the items are null.
Help!!!
Thanks ... Ed
I am evaluating radpdfviewer and seeing Telerik.Windows.Documents.Core.Shapes instances ( Line Segment,Path Segment) are not cleaned up when taking memory snapshot in profiling app which invokes garbage collector. I am wondering why?
I initialize pdfviewer to read file on demand and use while loop to cycle through pages
pdfViewer.GoToPage(page) in a loop
when rerach last page I make page=1 and cycle again
Thanks

Hello,
I am doing a RadGridView, with data from a LiteDB with MVVM to refuel. This works so far quite well. Now you want to use a buttonbar to edit the data.
<Button Grid.Column = "0" Margin = "0,0,3,0" Command = "telerik:RadGridViewCommands.Delete" CommandTarget = "{Binding ElementName=GridShutdowns}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width = "Auto" /> <ColumnDefinition Width = "10" /> <ColumnDefinition Width = "*" /> </Grid.ColumnDefinitions> <fa:FontAwesome Icon = "Trash" VerticalAlignment = "Center" HorizontalAlignment = "Center" /> <TextBlock Grid.Column = "2" VerticalAlignment = "Center" HorizontalAlignment = "Center" Text = "Delete" /> </Grid></Button><Button Grid.Column = "1" Margin = "0,0,3,0" Command = "telerik:RadGridViewCommands.BeginInsert" CommandTarget = "{Binding ElementName=GridShutdowns}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width = "Auto" /> <ColumnDefinition Width = "10" /> <ColumnDefinition Width = "*" /> </Grid.ColumnDefinitions> <fa:FontAwesome Icon = "PlusCircle" VerticalAlignment = "Center" HorizontalAlignment = "Center" /> <TextBlock Grid.Column = "2" VerticalAlignment = "Center" HorizontalAlignment = "Center" Text = "Insert" /> </Grid></Button><Button Grid.Column = "2" Margin = "0,0,3,0" Command = "telerik:RadGridViewCommands.CommitEdit" CommandTarget = "{Binding ElementName=GridShutdowns}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width = "Auto" /> <ColumnDefinition Width = "10" /> <ColumnDefinition Width = "*" /> </Grid.ColumnDefinitions> <fa:FontAwesome Icon = "Save" VerticalAlignment = "Center" HorizontalAlignment = "Center" /> <TextBlock Grid.Column = "2" VerticalAlignment = "Center" HorizontalAlignment = "Center" Text = "Save" /> </Grid></Button><Button Grid.Column = "3" Margin = "0,0,3,0" Command = "telerik:RadGridViewCommands.CancelRowEdit" CommandTarget = "{Binding ElementName=GridShutdowns}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width = "Auto" /> <ColumnDefinition Width = "10" /> <ColumnDefinition Width = "*" /> </Grid.ColumnDefinitions> <fa:FontAwesome Icon = "Ban" VerticalAlignment = "Center" HorizontalAlignment = "Center" /> <TextBlock Grid.Column = "2" VerticalAlignment = "Center" HorizontalAlignment = "Center" Text = "Cancel" /> </Grid></Button>
I use how to see the Comands: RadGridViewCommands.CancelRowEdit, etc. (ShutdownViewModel.cs)
/// <summary>/// Constructor/// </summary>public ShutdownViewModel(){ try { MakeSampleData(); InitializeCommands(); } catch (Exception exc) { Log.Error(exc); }}/// <summary>/// See the Sample on http://www.telerik.com/wpf/mvvm-support/// </summary>private void InitializeCommands(){ ICommand deleteCommand = RadGridViewCommands.Delete; ICommand saveCommand = RadGridViewCommands.CommitEdit; //todo: ???}private void MakeSampleData(){ using (var db = new LiteDatabase(FileAndPath.DataBaseFile)) { var ShutdownSources = db.GetCollection<Shutdown>("Shutdowns"); IEnumerable<Shutdown> shutdownSources = ShutdownSources.FindAll().OrderBy(x => x.Weekday).ThenBy(x => x.ShutdownTime.TimeOfDay); if (shutdownSources != null && shutdownSources.Any()) { _shutdowns = new ObservableCollection<Shutdown>(shutdownSources); } else { _shutdowns = new ObservableCollection<Shutdown>() { new Shutdown() {ShutdownId = Guid.NewGuid(), Weekday = 0}, new Shutdown() {ShutdownId = Guid.NewGuid(), Weekday = 1}, new Shutdown() {ShutdownId = Guid.NewGuid(), Weekday = 2}, new Shutdown() {ShutdownId = Guid.NewGuid(), Weekday = 3}, new Shutdown() {ShutdownId = Guid.NewGuid(), Weekday = 4}, new Shutdown() {ShutdownId = Guid.NewGuid(), Weekday = 5}, new Shutdown() {ShutdownId = Guid.NewGuid(), Weekday = 6}, }; var col = db.GetCollection<Shutdown>("Shutdowns"); foreach (Shutdown shutdown in _shutdowns) { col.Insert(shutdown); IndexObject(col); } } }}
After InitializeCommands I ask myself the question where I process now actually "saveCommand" and how?
Is that correct?
/// <summary>/// SelectedItem/// </summary>public Shutdown SelectedShutdown{ get { return _selectedShutdown; } set { if (_selectedShutdown != value) { _selectedShutdown = value; OnPropertyChanged(nameof(SelectedShutdown)); } }}/// <summary>/// See the Sample on http://www.telerik.com/wpf/mvvm-support/// </summary>private void InitializeCommands(){ ICommand deleteCommand = RadGridViewCommands.Delete; ICommand saveCommand = RadGridViewCommands.CommitEdit; //todo: ??? saveCommand.Execute(SaveShutdown());}private object SaveShutdown(){ try { if (SelectedShutdown != null) { using (var db = new LiteDatabase(FileAndPath.DataBaseFile)) { //todo: save/update Shutdown for DB } } } catch (Exception exc) { Log.Error(exc); } return null;}
How do I use the RadGridViewCommands to edit data in the DB?
Thanks for your help
I have two controls in a GridViewDataColumn (LinkButton and Texblock) and only one control is visible at a time.
<Controls:GridViewDataColumn DataMemberBinding="{Binding Id, Mode=OneWay}" Header="{x:Static lr:TransactionHistoryRes.Id_Header_Text}" UniqueName="TransactionHistoryModelId" Width="130"> <Controls:GridViewDataColumn.CellTemplate> <DataTemplate> <Grid> <max:LinkButton HorizontalAlignment="Right" Command="{Binding DataContext.OpenDocumentCommand, RelativeSource={RelativeSource FindAncestor, AncestorType=Views:TransactionHistoryView}}" CommandParameter="{Binding Path=.}" Content="{Binding Path=Id}" Visibility="{Binding Path=CanCreateOrViewDocument, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}"> </max:LinkButton> <TextBlock HorizontalAlignment="Right" Text="{Binding Path=Id}" ToolTip="{Binding Path=Information}" Visibility="{Binding Path=CanCreateOrViewDocument, Converter={StaticResource ReverseBooleanToVisibilityCollapsedConverter}}"/> </Grid> </DataTemplate> </Controls:GridViewDataColumn.CellTemplate> </Controls:GridViewDataColumn>
When the grid initially load, it works fine.
However, there's a wierd behavior that if you SORT the column, initially - the LinkButtons wont show even if it's visibility = true
When you try to sort the column again, the LinkButtons are shown "gradually". (see video link below)
https://youtu.be/GI5G-WaPy-k
When I tried to remove the <Texblock> and just retain the LinkButton, its not behaving like this so I think its something about putting two controls in the cell template. I tried separating the two controls by stackpanel but sill the same behaviour.
Thanks,
Karlo
hi
I wanna to use RadTileView with pdfviewer in each content that display employee salary slips

<telerik:RadGridView Name="grvKanten" AutoGenerateColumns="False" IsReadOnly="True" CanUserReorderColumns="True" FilteringMode="FilterRow" FilterOperatorsLoading="grvKanten_FilterOperatorsLoading" > <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Name="colKantenname" DataMemberBinding="{Binding Kantenname}" Header="Kantenname" MinWidth="150"/> <telerik:GridViewDataColumn Name="colKantenbreitenname" DataMemberBinding="{Binding Kantenbreitenname}" Header="Kantenbreiten-Name" MinWidth="150"/> <telerik:GridViewDataColumn Name="colLagerplatz" DataMemberBinding="{Binding Lagerplatzname}" Header="Lagerplatz" MinWidth="150"/> <telerik:GridViewDataColumn Name="colLaenge" DataMemberBinding="{Binding Laenge}" Header="Länge" MinWidth="100"/> <telerik:GridViewDataColumn Name="colDekor" DataMemberBinding="{Binding Dekor}" Header="Dekor" MinWidth="100"/> <telerik:GridViewDataColumn Name="colBreie" DataMemberBinding="{Binding Breite}" Header="Kantenbreite" MinWidth="100"/> </telerik:RadGridView.Columns></telerik:RadGridView>Private Sub grvKanten_FilterOperatorsLoading(sender As System.Object, e As Telerik.Windows.Controls.GridView.FilterOperatorsLoadingEventArgs) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.EndsWith) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsContainedIn) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsEmpty) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsEqualTo) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsGreaterThanOrEqualTo) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsLessThanOrEqualTo) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNotEmpty) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNotEqualTo) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNotNull) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsNull) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.StartsWith) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsLessThan) e.AvailableOperators.Remove(Telerik.Windows.Data.FilterOperator.IsGreaterThan) e.DefaultOperator1 = Telerik.Windows.Data.FilterOperator.ContainsEnd SubHello!
I'm using a "RadGridView" in my application. The grid is in a border with HorizontalAlignment="Stretch". I'm having 8 columns with only 2 of them given fixed widths. Since I want my grid to fill the horizontal space I'm setting the columns width in form of "*" values (e.g. 50* or 100*). Every thing works fine if the amount of data bound is small up-till around 50-70 max. When I bind a collection with more data like around 100-200 the UI starts to distort. The columns do not resize to take the whole space (Se the attached image). I need help asap on this.
Regards
Tushar Gupta

In WPF RadRichTextBox (2015.2.623.45 build).
how to get number of lines while text get wrapped in DocumentContentChanged event?
Thanks

Hi ,
I am binding one of the Property "Location" of a class to Gridview column as combobox.Its ItemSource is another property in ViewModel of type List<string>.
But here the problem is I am not able to see the value of Location when Grid is loaded.The following is Xaml related to GridviewComboColumn.
<telerik:RadGridView.Columns>
<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding Location}" ItemsSource="{Binding LocationList}" IsComboBoxEditable="False" Width="*" />
</telerik:RadGridView.Columns>
Here what should be the selectedValueMemberPath and DisplayMemberPath values will be ?? Location List is a simple List<string> not a class type.
How to make Location value to be seen when grid loaded?/
Regards,
Nagasree.