Telerik Forums
UI for WPF Forum
11 answers
1.0K+ views
Hi, I want to change font color of wpf radgridview header row in xaml with styles. please let me know the possible way.
Dimitar Dinev
Telerik team
 answered on 29 Jul 2019
10 answers
929 views

Hi, everyone. For example, I have such chunk of code:

01.<telerik:RadTabControl
02.    Name="someNamehere"
03.    HorizontalAlignment="Stretch"
04.    Height="100" Margin="7"
05.    VerticalAlignment="Center"
06.    Foreground="anyColor"
07.    telerik:TouchManager.IsTouchHitTestVisible="False"
08.    BorderThickness="1 3 1 1"
09.    BorderBrush="{telerik:Windows8Resource ResourceKey=BasicBrush}"
10.    Style="{DynamicResource InnovaRadTabControlStyle}"
11.    ItemsSource="{Binding anyViewModelHere, UpdateSourceTrigger=PropertyChanged}"
12.    SelectedIndex="{Binding anyIndexValueHere, UpdateSourceTrigger=PropertyChanged}">
13. 
14.    <telerik:RadTabControl.Resources>
15.        <Style TargetType="telerik:RadTabItem" BasedOn="{StaticResource CustomStyleHere}">
16.            <Setter Property="HeaderForeground" Value="Red"/>
17.        </Style>
18.    </telerik:RadTabControl.Resources>
19.    <telerik:RadTabControl.ContentTemplate>
20.        <DataTemplate DataType="Unit1:ViewModel2Here">
21.        <unit1:ViewModel2 DataContext="{Binding DataContext, RelativeSource={RelativeSource Self}, UpdateSourceTrigger=PropertyChanged}"/>
22.    </DataTemplate>
23.    </telerik:RadTabControl.ContentTemplate>
24.</telerik:RadTabControl>

 

Why style for telerik:RadTabItem (lines 14-18) is not working at all ? Thanks in advance !

Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 29 Jul 2019
3 answers
147 views

Hello,

I'm using IsolatedStorageProvider to save/load RadGridView settings in my application and I also wanted to provide the ability to serialize/deserialize settings when the application gets updated to a newer version of Telerik controls. If I were to use PersistenceManager, this would be possible via PersistenceManager.AllowCrossVersion property, but I cannot find anything similar when using IsolatedStorageProvider.

How can assembly upgrades be handled with IsolatedStorageProvider?

Martin Ivanov
Telerik team
 answered on 29 Jul 2019
2 answers
169 views

Hi,

Please have a look at the attachments.

When I launch the view, the MultiColumnComboBox is displayed as in issue 1.  When I increase the width of the view, I is displayed as in issue 2.

I do not understand why I have issue 1 as there is clearly enough space to display the content of the selectionbox at startup.

Any ideas ?

Regards,
Hans

Hans
Top achievements
Rank 1
Veteran
 answered on 29 Jul 2019
2 answers
501 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
187 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
271 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
570 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
221 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
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
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?