Telerik Forums
UI for WPF Forum
1 answer
10 views

Hello,
please I need help to display the data of this type List<List<string>> in the component RadGridView.
Attached is a work in progress that I've started and I'm stuck.

Thanks for your help 

Dinko
Telerik team
 answered on 10 Nov 2023
2 answers
15 views

I have the following code:

<telerik:GridViewDataColumn DataMemberBinding="{Binding CreatedBy.Name}" Header="Name"/>
<telerik:GridViewDataColumn DataMemberBinding="{Binding EventObject.TextData}" Header="User Text"/>

public UserType CreatedBy { get; set; }

public object EventObject { get; set; }

in another class:

public string TextData { get; set; }

 

In the first column, there is a filter icon, and it filters correctly. However, in the second column, there is no filter icon. Could you explain why this might be and how to resolve the issue?

 

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 09 Nov 2023
1 answer
16 views

Hi,
We have an issue with tab control and the drop down menu items. Users can create multiple instances of the same tab, that's being displayed fine but when the drop down menu is shown, I can see the names of the tabs, i.e. multiple instances of say "Customer" tab. Now if I select first repeating tab then click on drop down, I can see multiple tabs being highlighted as selected. My question is how can I make those tab items unique so the tab control recognises them as such.

TIA

P.S. please find attached xaml for styling of drop down items
    <Style TargetType="Telerik_Windows_Controls_TabControl:DropDownMenu" x:Key="DropDownMenuStyle">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource MainScreen.DropDownMenu.BorderBrush}"/>
        <Setter Property="Background" Value="{StaticResource {x:Static root:TabResources.Tab_Active_Background_Brush}}"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="IconColumnWidth" Value="0"/>
        <Setter Property="MaxHeight" Value="500"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <telerik:RadWrapPanel Orientation="Vertical"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="Telerik_Windows_Controls_TabControl:DropDownMenuItem">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="Telerik_Windows_Controls_TabControl:DropDownMenuItem">
                                <ControlTemplate.Triggers>
                                    <Trigger Property="IsChecked" Value="True">
                                        <Setter Property="TextBlock.FontWeight" Value="Bold"/>
                                        <Setter Property="Border.Visibility" Value="Visible"/>
                                    </Trigger>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="TextBlock.FontWeight" Value="SemiBold"/>
                                    </Trigger>
                                </ControlTemplate.Triggers>
                                <Grid MaxWidth="250" MaxHeight="100"
                                      ScrollViewer.VerticalScrollBarVisibility="Disabled" 
                                      DataContext="{Binding ., Converter={StaticResource String2ComplexObjectConverter}}" 
                                      ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="2"/><!--padding left-->
                                        <ColumnDefinition Width="3"/><!--selected item border-->
                                        <ColumnDefinition/><!--content-->
                                        <ColumnDefinition Width="5"/><!--padding right-->
                                    </Grid.ColumnDefinitions>
                                    <!--Let's try to put something that can be hit detected when mousing over-->
                                    <TextBlock Text="" Grid.ColumnSpan="4" HorizontalAlignment="Stretch"/>
                                    <Border Background="{StaticResource ResourceKey={x:Static root:TabResources.Tab_Selected_Indicator_Brush}}"
                                            Visibility="{Binding RelativeSource={RelativeSource AncestorType=Telerik_Windows_Controls_TabControl:DropDownMenuItem}, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}" 
                                            Grid.Column="1"/>
                                    <TextBlock Text="{Binding Title}"
                                               Foreground="{StaticResource {x:Static ColourResources.MenubarRibbonText}}"
                                               Margin="3,0"
                                               FontFamily="Segoe UI"
                                               Grid.Column="2"/>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Telerik_Windows_Controls_TabControl:DropDownMenu">
                    <Border Background="{TemplateBinding Background}"
                            Margin="{TemplateBinding Padding}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <ItemsPresenter Margin="2,5,3,10" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

Dinko
Telerik team
 answered on 08 Nov 2023
1 answer
12 views

Hi

I set the PaneStateChange event in RadDocking, but the argument of method is of type RadRoutedEventArgs that is useless  because it not contains information about the pane and the state. In https://docs.telerik.com/devtools/wpf/controls/raddocking/events/overview is written that the argument should be ActivePangeChangedEventArgs (that inherits from RadRoutedEventArgs but the cast give me null).

Telerik is 2023.02

Thank you

Luigi

 

Dinko
Telerik team
 answered on 07 Nov 2023
1 answer
19 views

Hi,

I'm trying to add a barcode inside a FlowDocumentEditor.

 


public static ImageInline InsertQRCode(this RadFlowDocumentEditor editor, string code, double width = 96)
{

    // Barcode
    const double imgWidth = 1000;
    var barcode = new RadBarcode
    {
        Width = imgWidth,
        Height = imgWidth,
        Symbology = new QRCode()
        {
            ErrorCorrectionLevel = ErrorCorrectionLevel.H,
            CodeMode = CodeMode.Alphanumeric
        },
        Value = code
    };
    
    barcode.BeginInit();
    barcode.Measure(new Size(imgWidth, imgWidth));
    barcode.Arrange(new Rect(new Size(imgWidth, imgWidth)));
    barcode.UpdateLayout();
    barcode.EndInit();

    using (var stream = new MemoryStream())
    {
        Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(barcode, stream, new PngBitmapEncoder());
        stream.Position = 0;

        return editor.InsertImageInline(new Telerik.Windows.Documents.Media.ImageSource(stream, "png"),
            new Size(96, 96));

    }

At barcode.Measure, I've got an NullException. This didn't happen with old RadBarCodeQR component.

Any ideas?

Martin Ivanov
Telerik team
 answered on 07 Nov 2023
0 answers
13 views
hello
I am Korean, so please understand that I wrote this in translation.

[inquiry]
As the title suggests, there is a problem with my source code and it cannot be resolved.

I am coding in MVVM method.

1. Enter TEXT in “ChangeDetails” [Cell] of [Grid View]
2. When executing the event of “PgmUpCommand”
3. “ChangeDetails” does not lose focus, and the bound “ChangeDetails” value cannot be retrieved.
4. After doing number 1, click another [Cell] in the [Grid] and execute number 2 to get the “ChangeDetails” value normally.

I would appreciate it if you could tell me the solution.

Below is the source

<telerik:RadGridView x:Name="dataGrid1" Grid.Column="1" IsReadOnly="False"
ItemsSource="{Binding PgmInfoList}"
SelectedItem="{Binding SelectedPgmInfoItem, Mode=TwoWay}" Margin="239,27,-0.2,-0.4" Grid.RowSpan="2" Grid.ColumnSpan="3" >
<i:Interaction.Behaviors>
<behaviors:GridViewBehavior UseSummaryInfo="False" ShowFooterInfo="False"/>
</i:Interaction.Behaviors>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Loaded">
   <prism:InvokeCommandAction Command="{Binding GroupDetailLoadedCommand}" />
</i:EventTrigger>
<i:EventTrigger EventName="CellEditEnded">
   <prism:InvokeCommandAction Command="{Binding CellEditEndedCommand}" />
</i:EventTrigger>
<i:EventTrigger EventName="SelectedCellsChanged">
   <prism:InvokeCommandAction Command="{Binding PgmInfoSelectedCellChangedCommand}"/>
</i:EventTrigger>
<i:EventTrigger EventName="RowEditEnded">
   <prism:InvokeCommandAction Command="{Binding RowEditEndedCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<telerik:RadGridView.ColumnGroups>
<telerik:GridViewColumnGroup Name="Division" Header="" />
<telerik:GridViewColumnGroup Name="Regist" Header="{Binding [WRD_RegistChangeHistory], Source={StaticResource DRes}}" />
<telerik:GridViewColumnGroup Name="Upload" Header="{Binding [WRD_UploadPGMfile], Source={StaticResource DRes}}" />
</telerik:RadGridView.ColumnGroups>
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding ChangeDetails, Mode=TwoWay}" IsReadOnlyBinding="{Binding Path=IsEnableReadOnly, Mode=TwoWay}"
                                    Header="{Binding [WRD_ChangeHistory1], Source={StaticResource DRes}}"
                                HeaderCellStyle="{StaticResource GridViewHeaderRowStyleBV}"
                                ColumnGroupName="Regist"/>
        <telerik:GridViewDataColumn Header="{Binding [WRD_UP], Source={StaticResource DRes}}" ColumnGroupName="Upload" HeaderCellStyle="{StaticResource GridViewHeaderRowStyleB}">
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <Button
                                Command="{Binding DataContext.PgmUpCommand,  RelativeSource={RelativeSource Mode=FindAncestor, AncestorLevel=1, AncestorType={x:Type telerik:RadGridView}}}"
                                CommandParameter="{Binding}"
                                Content="..." IsEnabled="{Binding PgmUpisEnabled}"/>
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>


son
Top achievements
Rank 1
 asked on 07 Nov 2023
0 answers
17 views

Hi

I have a RadDocking with tabbed documenthost.
If I have only one tab in DocumentHost and I dragged it, the content of the floating window is empty, when I dock again the tab the content is correctly restored.
If I have many tabs in DocumentHost and I dragged one, the content is correctly displayed.

I attached two images that explain the two cases

With 2 or more tabs (correct):

With only one tab (empty) (the content of the second panel should be the same of first image)

 

Furthermore, in both cases the header is missing.

 

Thank you
Luigi

Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
 updated question on 02 Nov 2023
0 answers
12 views

So I've got an application that has been working for the last 2 years with no issue. All of a sudden on some machines the radPdfViewer will not load or display PDFs. I've updated the code to the most recent version of the Telerik WPF UI controls but nothing different. The application works fine on my dev machine and a handful of others, but there are 3 machines specifically that it fails to load on. No errors just does not load. Has anyone else encountered this issue?

Here is the relevant code snippet:
Uri documentSourceUri = new Uri("https://www.somedomain.com/printables/paview.php?get_permitNumber=" + permitNumber);
PdfDocumentSource documentSource = new PdfDocumentSource(documentSourceUri);
pdfViewer.DocumentSource = documentSource;

Clint
Top achievements
Rank 1
 asked on 02 Nov 2023
0 answers
19 views

I'm looking for a NuGet Package that contains the Telerik.Windows.Controls.DataServices library that is binded against the latest Microsoft.OData.Client library.

In your documentation (https://docs.telerik.com/devtools/wpf/controls/raddataservicedatasource/getting-started/getting-started) you write, that such a version can be found in the NetCore, WPF50 and WPF60 folders. But in none of the NuGet packages I'm able to find such a folder.

I would highly appreciate it if you can help out here.

Robin
Top achievements
Rank 1
 asked on 01 Nov 2023
1 answer
14 views

Dear Telerik Team,

I am using the RadNumericUpDown control for accepting the numeric value. I have made hidden the up and down tick button so it look like simple textbox. The purpose of using this control specific for Distance and Weight values so it can be in any unit of measurement. For example, meter, millimeter, feet, kg, ton etc.

For simple UOM like meter, I can simply set the CustomUnit as "m" and it works fine. But How can I represent the value of 99.11 feet to feet and inch e.g., 99 ft 1 in

So whenever user trying to edit the value, it will be in feet only and once it is edited value will be displayed in feet and inch. 

How can  I achieve this behavior using RadNumericUpDown control ?

Thanks & Regards,

Hiren Lad

Dinko
Telerik team
 answered on 01 Nov 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 3
Iron
Iron
Iron
Jie
Top achievements
Rank 2
Iron
Iron
Iron
Janko
Top achievements
Rank 1
Iron
Iron
Mahesh
Top achievements
Rank 1
Iron
Eli
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 3
Iron
Iron
Iron
Jie
Top achievements
Rank 2
Iron
Iron
Iron
Janko
Top achievements
Rank 1
Iron
Iron
Mahesh
Top achievements
Rank 1
Iron
Eli
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?