Telerik Forums
UI for WPF Forum
1 answer
204 views

Dear Telerik Team

I just faced an issue about displaying RichTextBox failed.

I would like to edit comment for validation process with RichTextbox in a window that customized by myself inherits by System.Windows.Window.

and I put a Grid as RichTextBox container, the Xaml code is as follow:

<Grid>

    <Grid.RowDefinitions>

        <RowDefinition Height="Auto"/>

        <RowDefinition Height="*"/>

   </Grid.RowDefinitions>

   <telerik:RadRichTextBox Grid.Row="1"  x:Name="myRichTextBox" />

   <telerik:RadRichTextBoxRibbonUI ApplicationName="{x:Null}" TitleBarVisibility="Collapsed"  Title="{x:Null}"  ApplicationButtonVisibility="Collapsed" Grid.Row="0" DataContext="{Binding Commands,Element=myRichTextBox"}>

<....>//Only one RibbonTab added here with two RibbonButtonGroup for Paragraph and Font Editing

   </telerik:RadRichTextBoxRibbonUI>

</Grid>

 

and Added Loaded Event is as follow:

   private void Example_Loaded(object sender, RoutedEventArgs e)
   {

       this.myRichTextBox.Document=new RadDocument();

       this.myRichTextBox.Document.LayoutMode=DocumentLayoutMode.Flow;

   }

and the result is that no RibbonRichTextBoxUI and RichTextBox displayed, only blank area showed in my window.

Telerik dll version is 2014.1.411.45.

Kindly help me, thanks a lot.

 

 

 

 

Tanya
Telerik team
 answered on 20 Sep 2017
3 answers
134 views

Hi -

I'm trying to familiarize myself with the RadGanttView for WPF and am working through the Getting Started section of the documentation. However, when I create a new WPF app (Visual Studio 2017, .Net 4.6.1), add the listed references, add the namespace to the main window and then add a RadGanttView control to the XAML, the test app does not display the empty Gantt View. The window XAML is below. Getting up to speed with the RadGridView was quite easy with the documentation and I was hoping that the RadGanttView would be likewise.

<Window x:Class="TelerikGantt.MainWindow"
        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:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:local="clr-namespace:TelerikGantt"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <telerik:RadGanttView x:Name="ganttView" />
    </Grid>
</Window>

Vladimir Stoyanov
Telerik team
 answered on 20 Sep 2017
8 answers
292 views
Hi, how can I programatically add child tables and relations (hierarchies) to a WPF RadGridView? Can I add more than one level of hierarchies?

I need to create something like a master/details view in my RadGridView, but every detail can have its own details as well (that's why I need more that one level of hierarchies).

Thanks a lot.
Stefan
Telerik team
 answered on 20 Sep 2017
14 answers
466 views
Hi,
I have derived a custom class from the RadGridView to expose some dependency properties, and in the XAML when I create a control and binding its ItemSource to my viewmodel, then in the design view I'm getting the below error, and due to which the design view is not appearing, can you please help me:

Error 119 The local property "ItemsSource" can only be applied to types that are derived from "DataControl".

Thanks.

Gaurav Gupta
Martin
Telerik team
 answered on 20 Sep 2017
3 answers
654 views

Hi,

I am using Q3 2015.

I have editable RadGridView with two rows: Name and Count.

Name is editable.

Count is readonly.

When user clicks on "new row indicator" new row is created and focus is set to Name cell.

User enters text in name cell and clicks on "Count" cell.

My problem is that row remains in edit mode, "new row indicator" is not visible. User is confused because he thinks that edit is finished and there is no way to add another row.

To finish row edit user have to use tab key or click on any other control. Is there a way to end edit mode when any of readonly cells are focused?

My grid configuration:

<telerik:RadGridView
    x:Name="DocumentPositionsGridView"
    Style="{StaticResource EditableGridViewStyle}"
    SelectionMode="Extended"
    ItemsSource="{Binding Data, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"
    ValidatesOnDataErrors="InViewMode"
    AddingNewDataItem="DocumentPositionsGridView_AddingNewDataItem"
    CellEditEnded="DocumentPositionsGridView_CellEditEnded"
    CanUserDeleteRows="{Binding CanEditDocumentPositions}"
    CanUserInsertRows="{Binding CanEditDocumentPositions}"
    NewRowPosition="{Binding CanEditDocumentPositions, Converter={StaticResource BooleanToGridViewNewRowPositionConverter}}"
    ShowColumnFooters="True"
    >
 
<Style x:Key="EditableGridViewStyle" TargetType="{x:Type telerik:RadGridView}" BasedOn="{StaticResource RadGridViewStyle}">
    <Setter Property="ShowGroupPanel" Value="False"/>
    <Setter Property="AutoGenerateColumns" Value="False"/>
    <Setter Property="IsFilteringAllowed" Value="False"/>
    <Setter Property="GroupRenderMode" Value="Flat"/>
    <Setter Property="NewRowPosition" Value="Bottom"/>
</Style>



 

 

Lukasz
Top achievements
Rank 1
 answered on 20 Sep 2017
3 answers
142 views

Hey,

In my project, I'm using a ScheduleView to display all scheduled appointments within a range of days. Objective is to find an empty slot for a new appointment. However, I already know how long will be the new appointment and I would like to highlight the appropriate time range on mouse over.

The default behavior for the schedule view is to highlight only a single time slot on mouse over (using MouseOverHighlightStyle). In my case, I would like to display the full appointment length instead.

Moreover, if possible, I would like to change the background color of the highlight item if it overlaps another booking.

See attached file for basic mockups of expected behavior.

Regards,

Stefan
Telerik team
 answered on 19 Sep 2017
2 answers
607 views

Hi,

I am trying to disable 2-3 options from my combo box using converter. I do not want to use IsEnabled property as my data is dynamically populated. Therefore, I have created a converter for the same. 

However, when I am using <Style.Triggers> my combo box is coming blank.

PFB the xaml code used.

 

 <ScrollViewer.Resources>
        <converters:ComboboxDisableConverter x:Key="itemDisableconverter"/>
        <Style x:Key="EnableStyle" TargetType="telerik:RadComboBoxItem">
            <Setter Property="IsEnabled" Value="True"/>
        </Style>
        <Style x:Key="DisableStyle" TargetType="telerik:RadComboBoxItem">
            <Setter Property="IsEnabled" Value="False"/>
        </Style>

 

 <telerik:RadComboBox Grid.Row="0" Grid.Column="1" Name="MeterTypes"
                                     VerticalContentAlignment="Center"
                                     IsReadOnly="False"
                                     DisplayMemberPath="Name"
                                     ClearSelectionButtonVisibility="Visible"
                                    ItemsSource="{Binding MeterTypes}">
                        <!--SelectedItem ="{Binding MeterTypes, Converter={StaticResource itemDisableconverter}, ConverterParameter={StaticResource itemDisableconverter}, Mode=TwoWay}">-->

                        <telerik:RadComboBox.ItemContainerStyle>
                            <Style TargetType="{x:Type telerik:RadComboBoxItem}">
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding Path=Text,
                                        RelativeSource={RelativeSource Self}, Converter={StaticResource itemDisableconverter}, ConverterParameter={StaticResource itemDisableconverter}}" Value="true">
                                        <Setter Property="IsEnabled" Value="False"/>
                                    </DataTrigger>
                                </Style.Triggers>
                                <Setter Property="IsEnabled" Value="True"/>
                            </Style>
                        </telerik:RadComboBox.ItemContainerStyle>

 

Instead when I am using the commented SelectedItem, my ComboBox is populated but my options are not greyed out.

Can you please help me here.

Thanks.

 

Pankhuri
Top achievements
Rank 1
 answered on 19 Sep 2017
8 answers
375 views
Hi!

There seems to be a bug in RadAutoCompleteBox displayed in DataGridTemplateColumns. While editing the DataGrid row the Texts of SelectedItems aren't visible but on lost focus they are.

namespace WpfApplication.ViewModels
{
    public class ListViewModel
    {
        public ListViewModel()
        {
            this.ViewModels = new ObservableCollection<ViewModel>() { new ViewModel() };
        }
         
        public ObservableCollection<ViewModel> ViewModels { get; set; }
         
    }
 
    public class ViewModel
    {
        public ObservableCollection<Country> AvailableCountries { get; set; }
        public ObservableCollection<string> SelectedCountries { get; set; }
  
        public ViewModel()
        {
            this.AvailableCountries = new ObservableCollection<Country>()
            {
                new Country() { Name = "Australia" , Capital = "Canberra" },
                new Country() { Name = "Bulgaria", Capital = "Sofia" },
                new Country() { Name = "Canada" , Capital = "Ottawa" },
                new Country() { Name = "Denmark" , Capital = "Copenhagen" },
                new Country() { Name = "France" , Capital = "Paris" },
                new Country() { Name = "Germany" , Capital = "Berlin" },
                new Country() { Name = "India" , Capital = "New Delhi" },
                new Country() { Name = "Italy" , Capital = "Rome" },
                new Country() { Name = "Norway" , Capital = "Oslo" },
                new Country() { Name = "Russia" , Capital = "Moscow" },
                new Country() { Name = "Spain " , Capital = "Madrid" },
                new Country() { Name = "United Kingdom" , Capital = "London" },
                new Country() { Name = "United States" , Capital = "Washington, D.C." },
            };
  
            this.SelectedCountries = new ObservableCollection<string>();
  
        }
    }
}

<Window x:Class="WpfApplication.MainWindow"
        xmlns:local="clr-namespace:WpfApplication.ViewModels"
        Title="MainWindow"
        Width="525"
        Height="350">
    <Window.Resources>
        <local:ListViewModel x:Key="ListViewModel" />
    </Window.Resources>
    <Grid>
        <DataGrid AutoGenerateColumns="False" ItemsSource="{Binding ViewModels, Source={StaticResource ListViewModel}}">
            <DataGrid.Columns>
                <DataGridTemplateColumn Width="*">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadAutoCompleteBox DisplayMemberPath="Name"
                                                        ItemsSource="{Binding AvailableCountries}"
                                                        SelectedItems="{Binding SelectedCountries}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Window>

Could you check that please?
qui
Top achievements
Rank 1
 answered on 19 Sep 2017
2 answers
172 views
Hi ,

Is there any option to perform Multiple column sorting in Radgridview  without using SHIFT Press?

If i select column 'A' to sort then in a signle click  i need to sort Column 'B' . Right now Radgridview by pressing SHIFT key i can perform the multiple column sorting.But I need to do multiple column sorting in a single click on second column.



Thanks,
Ashwin.
Stefan
Telerik team
 answered on 15 Sep 2017
5 answers
144 views
I have searched high an low and cannot figure out how to Hide the LayoutModeSelectorName  on the  RadRichTextBoxStatusBar.  I do not want my users switching to a different word layout in my application, how can I do this?

Thanks

Marc
Top achievements
Rank 1
 answered on 15 Sep 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?