Telerik Forums
UI for WPF Forum
1 answer
126 views

Sorry my bad English,

There is my RadGridView

<telerik:RadGridView x:Name="DepartmentBalanceListRadGridView"
                                     ItemsSource="{Binding Display}"
                                     IsBusy="{Binding IsBusy}"
                                     IsReadOnly="True"
                                     ScrollViewer.VerticalScrollBarVisibility="Visible"
                                     AutoGenerateColumns="True"
                                     RowHeight="50"
                                     SelectionMode="Extended"
                                     CanUserFreezeColumns="False"
                                     RowIndicatorVisibility="Collapsed"
                                     GroupRenderMode="Nested"
                                     AutoExpandGroups="True"
                                     HorizontalAlignment="Stretch"
                                     VerticalAlignment="Stretch"
                                     VerticalGridLinesBrush="LightGray"
                                     ShowGroupFooters="True"
                                     ShowColumnFooters="True"
                                     CanUserResizeColumns="True"
                                     CanUserGroupColumns="False"
                                     ColumnWidth="*"
                                     AutoGeneratingColumn="DepartmentBalanceListRadGridView_AutoGeneratingColumn">

            <telerik:RadGridView.ControlPanelItems>
                <telerik:ControlPanelItem ButtonTooltip="Filtering Options">
                    <telerik:ControlPanelItem.ButtonContent>
                        <Button Background="Transparent">

                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <cal:ActionMessage MethodName="PrintDepartmentBalance">
                                        <cal:Parameter Value="{Binding ElementName=DepartmentBalanceListRadGridView, Path=Items}"/>
                                        <cal:Parameter Value="{Binding ElementName=DepartmentBalanceListRadGridView, Path=SelectedItems}"/>
                                    </cal:ActionMessage>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>

                            <materialDesign:PackIcon Kind="Printer" Foreground="White" />

                        </Button>
                    </telerik:ControlPanelItem.ButtonContent>
                </telerik:ControlPanelItem>

            </telerik:RadGridView.ControlPanelItems>

            <telerik:RadGridView.Columns>

                <telerik:GridViewSelectColumn/>

            </telerik:RadGridView.Columns>

        </telerik:RadGridView>


Binding Display


private ObservableCollection<IDictionary<string, object>> _display;

public ObservableCollection<IDictionary<string, object>> Display
{
    get { return _display; }
    set
    {
         _display = value;
         NotifyOfPropertyChange(() => Display);
    }
}

now only 4 options 
is equal to, is not equal to, is null, is not null 

how can I add startswith and contains filter in the FilterControl ?

Martin Ivanov
Telerik team
 answered on 31 May 2023
0 answers
157 views

Hello, I have an issue with the style of the ContextMenus.

I changed the style of the ContextMenu and it is working for TextBlock and TextBox but on Telerik controls like RadNumericUpDown and RadRichTextBox the context menu looks different.

Let's take for example the menu in the RadNumericUpDown (see attached picture).

I expect that the menu with Cut,Copy,Paste looks like other menus.

I tried to define in RadNumericUpDown.Resources a style for ContextMenu and RadContextMenu (change the Background property) but it doesn't work.

When I change the Foreground property of the TextBlock style inside RadNumericUpDown.Resources, I can see that the text color changed.

I hope you can guide me on this matter.

Thanks,

Alex

alex
Top achievements
Rank 2
Bronze
Iron
Iron
 updated question on 29 May 2023
1 answer
362 views
I would like to know if the WPF RadDatePicker control offers a built-in clear button functionality to remove the selected date.
Martin Ivanov
Telerik team
 answered on 29 May 2023
0 answers
129 views

 

Hi Telerik,

I implemented a Column group grid view. In  that I want to show same background color for a group of columns and its header .

Our requirement: All columns that belong to the same component type are grouped together and displayed with the same color.

How to achieve our requirement? please help me as soon as possible . 

Thanks in advance!

Mahima
Top achievements
Rank 1
 updated question on 29 May 2023
0 answers
111 views

I am using telerik:RadScheduleView in my control and when user tries to use "Edit Recurrence" dialog while adding any event/schedule, the window comes up with some messed up texts for buttons. Like Every appears as E_very, please find attached screenshots.

I am using below content in my page.

<telerik:RadScheduleView AppointmentsSource="{Binding Recordings}"
								 AppointmentCreated="OnAppointmentCreated"
								 AppointmentEdited="OnAppointmentEdited"
								 AppointmentDeleted="OnAppointmentDeleted">
			<telerik:RadScheduleView.ViewDefinitions>
				<telerik:MonthViewDefinition />
				<telerik:WeekViewDefinition />
				<telerik:DayViewDefinition />
			</telerik:RadScheduleView.ViewDefinitions>
		</telerik:RadScheduleView>

 

How to fix the text?

Sunny
Top achievements
Rank 1
 asked on 26 May 2023
1 answer
127 views

Is it possible to change height of all rows of a virtualized RadGridView in runtime (e.g. when user clicks a button)?

I tried to do this by changing height of every element of ChildrenOfType<GridViewRow>, but this affects only rows which are currently displayed. 

Switching virtualization off is not an option due to size of the grid.

Thanks

Martin Ivanov
Telerik team
 answered on 26 May 2023
1 answer
186 views

I am utilizing the RadGridView's export to Excel functionality, and I have encountered an issue where the footer of my grid is not being exported correctly.

In my implementation, I have a Footer for the GridViewDataColumn that uses a TextBlock control, and I have applied a binding to the Text property of this TextBlock. This TextBlock shows up perfectly when viewing the grid within the application. However, when I export the grid to Excel, the content of the TextBlock from the Footer appears in the Excel file as "System.Windows.Controls.TextBlock" rather than the actual expected value.

Here is the XAML for the GridViewDataColumn footer:

<telerik:GridViewDataColumn.Footer>
    <TextBlock
        Text="{Binding Path=ItemsSource, RelativeSource={RelativeSource AncestorType=telerik:RadGridView}, Converter={StaticResource QiYesValueToCountConverter}, ConverterParameter=IK_2_1_2, UpdateSourceTrigger=PropertyChanged}"
        FontSize="20"
        ToolTip="{Binding ElementName=UserControl1, Path=DataContext.IkItemsSummary.IK_2_1_2}" />
</telerik:GridViewDataColumn.Footer>

And here is the method I use for the export:

private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
    string extension = "xlsx";
    SaveFileDialog dialog = new SaveFileDialog()
    {
        DefaultExt = extension,
        Filter = String.Format("{1} Dateien (*.{0})|*.{0}", extension, "Excel"),
        FilterIndex = 1,
        FileName = "QI-Auswertungen"
    };
    if (dialog.ShowDialog() == true)
    {
        using (Stream stream = dialog.OpenFile())
        {
            RadGridView1.ExportToXlsx(stream);
        }
    }
}

I have tried a few potential solutions, such as using a ContentControl instead of a TextBlock and tried using the ElementExporting and ElementExported events to manipulate the exported value directly. However, I am still facing the same issue.
Stenly
Telerik team
 answered on 26 May 2023
1 answer
491 views

Hi team

I have created sample with RadNavigationView, below this i have added list of items and those has been bind using itemsource property.

ItemSource type has two property 1st name as NameDisplay with type string and 2 nd as Icon with type string

Create style like below

<Style TargetType="telerik:RadNavigationViewItem">
        <Setter Property="Content" Value="{Binding NameDisplay}" />
        <Setter Property="Icon">
            <Setter.Value>
                <Image Source="{Binding Icon}" Height="25" Width="25" MinWidth="20" MinHeight="20" />
            </Setter.Value>
        </Setter>
<Style>

Output Image

 

Why the 1st icon is now showing after the render.

 

This is the behavior? if yes

Is there any alternate way to use our custom png icon under RadNavigationViewItem? without using glyph icon

 

Thanks

Narendran S

Stenly
Telerik team
 answered on 24 May 2023
1 answer
107 views

I am using a RadHorizontalLinearGauge and a RadVerticalLinearGauge in a WPF UserControl. Each of these controls has 7 properties that are bound, Min, Max, MajorTickStep, MiddleTicks, StartTickOffset, EndTickOffset, and LabelFormat to DependencyProperties. As I drag an image back and forth in the UI (pan), the gauge control properties get updated accordingly. Please refer to the attached image.  The performance can be pretty sluggish because I think the controls update after every property update instead of all at once.  What I need is the old WinForms BeginUpdate/EndUpdate functions, but I don't think the equivalent functionality exists in WPF. Do you have any suggestions on how I can improve the performance?

 

Vladimir Stoyanov
Telerik team
 answered on 23 May 2023
1 answer
278 views

Hi, i am converting our app datagrids to RadGridViews and we need to change the colour of the row based on the previous row data. We used a multibinding ad passed "PreviousData" as the relative source:


                    <Style TargetType="DataGridRow">
                        <Style.Triggers>
                            <DataTrigger Value="True" >
                                <DataTrigger.Binding >
                                    <MultiBinding Converter="{StaticResource EvaluatePreviousRow}">
                                        <Binding RelativeSource="{RelativeSource PreviousData}"/>
                                        <Binding Path="."/>
                                    </MultiBinding>
                                </DataTrigger.Binding>
                                <Setter Property="Background" Value="Gray"/>
                            </DataTrigger>
                        </Style.Triggers>
                        <Setter Property="Background" Value="Red"/>
                    </Style>

Now i managed to convert everything so that the EvaluatePreviousRow converter is called when a row is being drawn by the RadGridView but now 

<Binding RelativeSource="{RelativeSource PreviousData}"/>

Always sends null to the converter. Is there any way to pass the previous collection item data in a similar fashion?

Stenly
Telerik team
 answered on 22 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?