Telerik Forums
UI for WPF Forum
1 answer
307 views

Hi,

im unable to change my RadGridView language to French. Following this page :

https://docs.telerik.com/devtools/wpf/common-information/common-localization

I wrote this in the App.xaml.cs : 

Thread.CurrentThread.CurrentCulture = new CultureInfo("fr");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr");
Telerik.Windows.Controls.LocalizationManager.DefaultCulture = new CultureInfo("fr");

Then my RadGridView control have the "Language="fr" tag in the xaml.

The language of the filters are still in English.

I can see a dll called "Telerik.Windows.Controls.resources.dll in the documentation but can't find it anywhere.

Thank you

Martin Ivanov
Telerik team
 answered on 19 May 2023
1 answer
154 views

Hello,

I am dealing with a minor bug on my pages that have a hidden panel that I show when adding new items. It shows the selected item, but also includes the text afterwards. It only happens when the dropdown visibility is collapsed. When I am populating the dropdowns I have tried setting  AutoCompleteProvider.SearchText = string.Empty and AutoCompleteProvider.MatchText = string.Empty and setting the panel to visible and then populating the value, but I cannot figure out how to clear out the text. What is a good work around for this bug. 

 I have attached an example project. To replicate my issue click "Populate Dropdown" then click "Toggle Visibility". If you toggle visibility before populating the issue will not occur. 
Stenly
Telerik team
 answered on 19 May 2023
1 answer
153 views

I need to translate the following xaml code into c# to build the real-time graph, but I always get reported that there are no series defined. If instead I directly use the xaml code in binding with my object it works regularly. Where am I doing wrong?

 

                <TK:RadCartesianChart x:Name="RadCartesianChart"
                                      Margin="0,18,0,0"
                                      Palette="Windows8">
                    <TK:RadCartesianChart.HorizontalAxis>
                        <TK:CategoricalAxis LabelInterval="15"
                                            ShowLabels="True" />
                    </TK:RadCartesianChart.HorizontalAxis>

                    <TK:RadCartesianChart.VerticalAxis>
                        <TK:LinearAxis LabelInterval="15"
                                       ShowLabels="True" />
                    </TK:RadCartesianChart.VerticalAxis>

                    <TK:RadCartesianChart.SeriesProvider>
                        <TK:ChartSeriesProvider Source="{Binding Path=grafico[0].dataSERIE, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
                            <TK:ChartSeriesProvider.SeriesDescriptors>
                                <TK:CategoricalSeriesDescriptor CategoryPath="etichetta"
                                                                ItemsSourcePath="dataITEM"
                                                                ValuePath="valore">
                                    <TK:CategoricalSeriesDescriptor.Style>
                                        <Style TargetType="TK:BarSeries">
                                            <Setter Property="LegendSettings">
                                                <Setter.Value>
                                                    <TK:SeriesLegendSettings Title="{Binding Path=serie, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </TK:CategoricalSeriesDescriptor.Style>
                                </TK:CategoricalSeriesDescriptor>
                            </TK:ChartSeriesProvider.SeriesDescriptors>
                        </TK:ChartSeriesProvider>
                    </TK:RadCartesianChart.SeriesProvider>
                </TK:RadCartesianChart>

 

C# code

 

            RadCartesianChart ctrl = new RadCartesianChart() { Name = "RadCartesianChart" };
            ctrl.Palette = ChartPalettes.Windows8;
            ctrl.VerticalAxis = new LinearAxis() { ShowLabels = true, LabelInterval = 15 };
            ctrl.HorizontalAxis = new CategoricalAxis() { ShowLabels = true, LabelInterval = 15 };

            ChartSeriesProvider series = new ChartSeriesProvider()
            {
                Source = new Binding("grafico[0].dataSERIE") { Mode = BindingMode.OneWay, UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged },
            };

            CategoricalSeriesDescriptor seriesDescriptor = new CategoricalSeriesDescriptor
            {
                ItemsSourcePath   = "dataITEM",
                CategoryPath      = "etichetta",
                ValuePath         = "valore",
                Style = new Style(typeof(BarSeries))
            };
            seriesDescriptor.Style.Setters.Add(new Setter(BarSeries.LegendSettingsProperty,
                                                          new Binding("serie") { Mode = BindingMode.OneWay, UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged }));
            series.SeriesDescriptors.Add(seriesDescriptor);
            ctrl.SeriesProvider = series;

Object data

        public ObservableCollection<OGRecGrafico> grafico
        {
            get { return _grafico; }
            set { _grafico = value; RaisePropertyChanged(() => grafico); }
        }
        private ObservableCollection<OGRecGrafico> _grafico = new ObservableCollection<OGRecGrafico>();

publicclassOGRecGrafico : NotificationObject { publicstring titolo { get; set; } public ObservableCollection<OGRecGraficoSerie> dataSERIE { get; set; } = new ObservableCollection<OGRecGraficoSerie>(); } publicclassOGRecGraficoSerie : NotificationObject { publicobject serie { get; set; } public ObservableCollection<OGRecGraficoItem> dataITEM { get; set; } = new ObservableCollection<OGRecGraficoItem>(); } publicclassOGRecGraficoItem : NotificationObject { publicobject serie { get { return _serie; } set { _serie = value; RaisePropertyChanged(() => serie); } } privateobject _serie = null; publicobject etichetta { get { return _etichetta; } set { _etichetta = value; RaisePropertyChanged(() => etichetta); } } privateobject _etichetta = null; publicobject valore { get { return _valore; } set { _valore = value; RaisePropertyChanged(() => valore); } } privateobject _valore = null; publicstring scriptSQL { get { return _scriptSQL; } set { _scriptSQL = value; RaisePropertyChanged(() => scriptSQL); } } privatestring _scriptSQL = null; }


 

Martin Ivanov
Telerik team
 answered on 19 May 2023
1 answer
279 views

Hi 

Currently I am trying to change the height of the GridViewColumnGroup from a global style,

Right now the height is being altered but its not quite I am looking for.

This is the current result Where the header is no longer vertically aligned 

These are the global style tags

The desired result is for the Height value to be changed via a data trigger and the group header to be aligned vertically in the center

Any assistance here would be appreciated 

Stenly
Telerik team
 answered on 19 May 2023
0 answers
176 views

I'm facing an issue with the RadMenu control. I have a requirement where I need to display a menu with collapsible items, and I would like some guidance on how to implement this functionality.

Here's a simplified example of my current XAML code:

<telerik:RadMenu>
    <telerik:RadMenuItem Header="Menu">
        <telerik:RadMenuGroupItem ItemsSource="{Binding Alist}" Header="A"/>
        <telerik:RadMenuGroupItem ItemsSource="{Binding Blist}" Header="B"/>
    </telerik:RadMenuItem>
</telerik:RadMenu>

In this example, I have two RadMenuGroupItems, "A" and "B", each bound to a separate list (Alist and Blist respectively). Currently, the items are displayed in an expanded state by default.

However, I would like to achieve the following behavior:

1. Initially, all the items in the lists should be collapsed, i.e., hidden.

2. Users should be able to expand and collapse the items by clicking on the respective RadMenuGroupItem headers. When the header is clicked, the items should toggle between being expanded (visible) and collapsed (hidden).

Is there a built-in way to achieve this behavior in the RadMenu or RadMenuGroupItem controls? If not, could you please provide some guidance on how I can implement this functionality myself?

I appreciate any assistance or code examples you can provide to help me accomplish this requirement.

Thank you in advance for your help.

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 updated question on 18 May 2023
1 answer
202 views

Hello,

 

Here is my situation:

1. I have got client app in WPF ( Cant create here any db context etc )

2. I have got Rest Api where is DbContext (EntityFramework)

3. I have got RadGrid and RadPager

 

I want to pass QueryableCollectionView or QueryableEntityCollectionView or something else? to this rest api, processing data, use filters, pagination and sorters from radgrid. Then in returns i want to receive collection of Products, Employees or something

 

Is any body do something like this? I know that in Blazor UI there is DataSourceRequest etc and it works fine, but i did not find alternative in WPF

Martin Ivanov
Telerik team
 answered on 18 May 2023
0 answers
83 views

Hello,

I use RadPdfViewer to view a PDF file in my WPF application, the PDF file has only one page and the contents are in the middle of the page, so I'm trying to zoom and focus on the middle of the page, I use the following code:


private void DocumentChanged(object sender, DocumentChangedEventArgs e)
        {
            pdfViewer.ScaleFactor = 1.3;
            var size = pdfViewer.Document.Pages[0].Size;
            pdfViewer.ScrollToVerticalOffset(size.Height * 0.3);
            pdfViewer.ScrollToHorizontalOffset(size.Width * 0.20);
        }

however, I only see the horizontal scroll working.

How can I zoom then scroll to vertical and horizontal offset?

Turk
Top achievements
Rank 1
 asked on 17 May 2023
0 answers
284 views

Hello,

I have a strange behavior during grouping.

When I drag a column to the header and the grouping is performed then you redraw the RadGridView layout.

Sometimes I see the first group at the middle of the grid instead of the top (there is an empty space in half of the grid). If I scroll a little bit then the layout is fixed and the grid looks as expected.

I tried to InvalidateVisual on the Grouped event but it looks the same. How do I solve it ?

alex
Top achievements
Rank 2
Bronze
Iron
Iron
 asked on 16 May 2023
1 answer
307 views

Hello,

I am working with a RadGridView and developed two features:

1. A ListBox that displays the RadGridView's columns where the user can check/uncheck some columns or all of them. The purpose of the control is to show or hide the columns according to the CheckBox state.

2. User Settings mechanism that saves the columns visibility status to a file. After the application starts, I load the IsVisible status to the columns and override the configured value in the xaml.

I noticed that the default behavior in RadGridView is to show the rows even when there are 0 visible columns and the SelectedItem remains.

I would like to hide the rows and unselect the items.

I tried to use a data trigger to do this funcionality.

It works with a DataTrigger when the value Columns.Count = 0.

To finish this functionality I would like to update the data trigger to the Visible Columns count, which is not provided by Telerik.

How can I do that?

I tried to create an attached property that maintains a counter when the user change the state of the columns visibility from the ListBox, but it does not work when the state is changed from the xaml or the user settings.

I don't want to bind to Columns Collection Changed and Visibility Changed because I think it is an overhead for this functionality. 

Can you expose this property or help me with a better solution?

Martin Ivanov
Telerik team
 answered on 16 May 2023
0 answers
119 views

Hi Telerik Community,

How can I get programmaticaly the result of a column aggregate ? I tried something like "Column.Footer" but my footer is <null>...

I have thought of something like "Column.Footer.Cell.Value" or maybe "Column.AggregateResult"...

Regards,

 

Matthieu M

Matthieu
Top achievements
Rank 1
 asked on 15 May 2023
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
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?