Telerik Forums
UI for WPF Forum
2 answers
465 views

I want to change the Header row mouse over/selection background color and I am not getting any properties for that in wpf rad grid view.

please help.


Dimitar Dinev
Telerik team
 answered on 29 Jul 2019
3 answers
144 views

Hi,

I'm using the RadMaskedNumericInput with Mask="#6.2".  SelectAll() is called when the control gets the focus.  This works fine as long as the value of the binded property is not zero.  In this case, only the decimals and decimal point get selected, but not the zero digit before the decimal point (see attachment), which is very annoying behavior for the end user.

Regards,
Hans

Hans
Top achievements
Rank 1
Veteran
 answered on 29 Jul 2019
2 answers
230 views
Is it possible to use the symbols from the TelerikWebUi font in an RTF document?
Harald
Top achievements
Rank 2
 answered on 28 Jul 2019
5 answers
522 views

Hi,

Could you please help me to figure out how to define columns and properties for all-level nested tables in hierarchical gridview?

I'm referring to pages:

https://docs.telerik.com/devtools/wpf/controls/radgridview/hierarchical-gridview/basic-hierarchies

https://docs.telerik.com/devtools/wpf/controls/radgridview/hierarchical-gridview/how-to/access-child-gridview

 

But columns and properties AutoGenerateColumns and ShowGroupPanel are applied only for first child table and second-level table and deeper is not affected by that property.

MainWindow.xaml

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:HierarchyTest"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="HierarchyTest.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="513.789" Width="1084.149">
    <Grid>

        <telerik:RadGridView ItemsSource="{Binding}" DataLoading="RadGridView_DataLoading" AutoGenerateColumns="False" telerik:StyleManager.Theme="Fluent">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Id}" Header="Id" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding StartTime}" Header="Start Time" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Type}" Header="Type" />
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition />
            </telerik:RadGridView.ChildTableDefinitions>
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView ItemsSource="{Binding ChildJobs}" Name="childGrid" ShowGroupPanel="False" telerik:StyleManager.Theme="Fluent" AutoGenerateColumns="False">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Id}" Header="Id" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding StartTime}" Header="Start Time" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Type}" Header="Type" />
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
        </telerik:RadGridView>
    </Grid>
</Window>

 

MainWindow.xaml.cs

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.GridView;
using Telerik.Windows.Data;

namespace HierarchyTest
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public ObservableCollection<Build> Builds { get; set; } = new ObservableCollection<Build>();

        public MainWindow()
        {
            InitializeComponent();

            this.DataContext = this.Builds;

            this.Builds.Add(new Build() { Id = 1 });

            foreach (int i in Enumerable.Range(0, 10))
            {
                this.Builds[0].ChildJobs.Add(new Job() { Id = i });
                this.Builds[0].ChildJobs[i].ChildJobs.Add(new Job() { Id = i + 1 });
            }
        }

        private void RadGridView_DataLoading(object sender, Telerik.Windows.Controls.GridView.GridViewDataLoadingEventArgs e)
        {
            var dataControl = (GridViewDataControl)sender;

            if (dataControl.ParentRow != null && dataControl.ChildTableDefinitions.Count == 0)
            {
                dataControl.ChildTableDefinitions.Add(new GridViewTableDefinition() { Relation = new PropertyRelation("ChildJobs") });
            }
        }
    }

    public class Build
    {
        public int Id { get; set; }

        public DateTime StartTime { get; set; } = DateTime.Now;

        public string Type { get; set; } = "Build";

        public ObservableCollection<Job> ChildJobs { get; set; } = new ObservableCollection<Job>();
    }

    public class Job
    {
        public int Id { get; set; }

        public DateTime StartTime { get; set; } = DateTime.Now;

        public string Type { get; set; } = "Job";

        public ObservableCollection<Job> ChildJobs { get; set; } = new ObservableCollection<Job>();
    }
}

 

Sergey
Top achievements
Rank 1
 answered on 26 Jul 2019
2 answers
1.8K+ views

I have a bit of a programming challenge…

We have a form that has a RadGrid whose itemsource is bound to collection.  That collection includes a Boolean field named ‘Selected’.
The form also has a ‘Select all’ button.

The user filters the grid based on customer, so it is displaying only 10 of the 50 items in the collection.

When they click the ‘Select all’ button, they want the items Selected property to be true for only the 10 records that are displayed in the grid.

If I can get a collection of just the rows displayed in the grid I could roll through both collections to locate matches.   I haven’t figured out a way to get the ‘filtered’ collection, and wonder if there is a more efficient way to accomplish the task.

Any ideas would be greatly appreciated.

Thanks in advance,
Lou

Lou
Top achievements
Rank 1
 answered on 25 Jul 2019
9 answers
177 views

        private void RadRibbonView_SelectionChanged(object sender, RadSelectionChangedEventArgs e)
        {

              if (ribbon.SelectedItem is RadRibbonTab)
                {
                    //keepBackstageOpen = false;
                    //MasterRadRibbonView.IsBackstageOpen = false;
                    System.Diagnostics.Debug.WriteLine("RadRibbonTab");
                }
                else if (ribbon.SelectedItem is RadRibbonBackstage)
                {
                    //keepBackstageOpen = true;
                    //MasterRadRibbonView.IsBackstageOpen = true;
                    System.Diagnostics.Debug.WriteLine("RadRibbonBackstage");
                }

        }

 

If I click on the backstage, this always triggers as a tab (the last one selected), and not as the backstage...which is causing me many problems.

Any advice ?

Barry
Top achievements
Rank 1
 answered on 25 Jul 2019
1 answer
138 views

Good morning, i had a issue when a try to move the RadPane that contains the RadGridView only when i use the theme VisualStudio2013. I try everything, with  any other theme work just fine. Pop into Output window in Visual Studio the following binding error for each column i have int the RadGridView, and it slows the application in a way that is very painful :

 

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor AncestorType='Telerik.Windows.Controls.GridView.DataCellsPresenter', AncestorLevel='1''. . BindingExpression:Path=Foreground; DataItem=null; target element is 'ContentControl' (Name='PART_ContentPresenter'); target property is 'Foreground' (type 'Brush')

 

I try taking of styles of header cells and such, but does not work. The others themes works with custom styles and without it.

Dimitar Dinev
Telerik team
 answered on 25 Jul 2019
9 answers
1.0K+ views

I want to add context menu for RadGridView and tried below code.. but it gives error as in the attached screenshot. please let me know how to proceed.

 

<telerik:RadGridView x:Name="radGridView" AutoGenerateColumns="False">
            <ui:RadContextMenu.ContextMenu>
                <ui:RadContextMenu x:Name="GridContextMenu" />
            </ui:RadContextMenu.ContextMenu>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding FirstName}" Header="First Name"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding LastName}" Header="Last Name"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Age}" Header="Age"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding IsMarried}" Header="Married"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

 

Martin Ivanov
Telerik team
 answered on 25 Jul 2019
1 answer
179 views

Hello,

Our app is extremely heavy with Telerik controls (we use it for just about everything in our UI). We've been getting complaints about the overall memory footprint of our app. Obviously most of that would likely be due to data and business logic, but we also were looking to do an analysis of all (Terlerik) controls being used to see if any are contributing factors. One of our designers mentioned that he feels the Telerik grid control is "very expensive" from a memory point of view - and we use it all over the place in our app, even in places where the stock WPF grid control may have been good enough.

Are there any utilities to track all the controls memory usage ?....or any ways to tap into the controls to find out the memory usage of each individually ?

Any suggestions would be appreciated.

Thanks,

Barry

Martin Ivanov
Telerik team
 answered on 25 Jul 2019
2 answers
119 views

Can i set the TreeListViewItem visibility to visible or hide, when i use the treelistiview in Virtualization model.

I want to use this method to search something,or may be another?

wang
Top achievements
Rank 1
 answered on 25 Jul 2019
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?