Telerik Forums
UI for WPF Forum
9 answers
393 views
Hi!
I have a RadGridView with 5 columns, 2 of which contain rich text. I'm using the following to embed RichTextBox inside my RadGridView.

<telerik:GridViewDataColumn DataMemberBinding="{Binding Procedure}">
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
                <StackPanel>
                    <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=richTextBox}" Html="{Binding Procedure, Mode=TwoWay}"  />
                    <telerik:RadRichTextBox x:Name="richTextBox" IsReadOnly="True"  />
                </StackPanel>
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>

My problem is that the grid is rendered very slowly. In my sample application, I only have 5 lines, so in total 10 rich text boxes and only half of them have actually data, which are very simple HTML and not more than 10 words each (no tables, just some bold words and some coloring).

If I try the same without the rich text boxes then the grid is rendered instantly. The same if I use the WebBrowser control to display my data.

What can I do?
Mihail
Telerik team
 answered on 23 Oct 2013
3 answers
529 views
Hello,

i am trying to use the RadRichTextBox as an html editor. for starters, i simply tried to bind it to html comming from a different text box.
i keep getting binding error on this simple example.
can you please help? what am i doing wrong?

here is the xaml: (i get binding errors on both binding expressions)
<UserControl x:Class="WpfApplication27.UserControl1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:telHtml="clr-namespace:Telerik.Windows.Documents.FormatProviders.Html;assembly=Telerik.Windows.Documents.FormatProviders.Html"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <telHtml:HtmlDataProvider x:Key="htmlDataProvider" 
                    Html="{Binding ElementName=source, Path=Text, Mode=TwoWay}"
                                              RichTextBox="{Binding ElementName=editor}" 
                                     />
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <telerik:RadRichTextBox x:Name="editor"/>
        <TextBox AcceptsReturn="True" Name="source" Grid.Column="1"/>
    </Grid>
</UserControl>

Thanks!

Kfir
Mihail
Telerik team
 answered on 23 Oct 2013
1 answer
107 views
we created a banner beside the help and minimize button by utilizing the TabStripAdditionalContent property of the RibbonView. However, this nudges the ApplicationName off center. 


Milena
Telerik team
 answered on 22 Oct 2013
1 answer
85 views
Hi,
I wanted to display a custom template in a custom aggregated grid format for tracker information for entire series. Currently we have two templates - trackerballControl which is panel template and when the update happens in TrackBallInfoControl, it picks up the tracker information template and adds it into template as seperate controls. How can i control this?
I even tried entrying dummy datapointinfo in the context so that it can display empty row but DatapointInfo and all the classes it uses are internal and very hard to do that.
Can anyone help please?


Thanks
Avneesh
Tina Stancheva
Telerik team
 answered on 22 Oct 2013
1 answer
490 views
Hi All,
Here is the situation for me.
 
I have Profit and loss report

My Requirement is shown in Attachment .. Please go through Grouping.png and come here

for "Totals"  Template i calling in code behind as 

 if (e.Column.UniqueName == "Account_No")
                            {
                                e.Column.Width = 120;
                                e.Column.HeaderTextAlignment = TextAlignment.Left;
                                var dataColumn = e.Column as GridViewDataColumn;
                                dataColumn.DataFormatString = "{0:N2}";
                                e.Column.TextAlignment = TextAlignment.Center;
                                if (i == 1)
                                {
                                    e.Column.GroupFooterTemplate = (DataTemplate)VReportViewer.Resources["GroupFooterRowTemplate"];
                                }

                            }
the string  "Totals" is Print after every Group using "ColumnGroupDescriptor " and  i'm grouping using below code

  if (this.ReportName == "Profit and Loss")
                        {
                           if (VReportViewer.GrdReport.Columns.Count == 9)
                                     { 
                                Telerik.Windows.Controls.GridView.ColumnGroupDescriptor descriptor = new ColumnGroupDescriptor();
                                descriptor.Column = VReportViewer.GrdReport.Columns["Account_Type"];

                                SumFunction sum = new SumFunction();
                                ((GridViewDataColumn)VReportViewer.GrdReport.Columns["Amount"]).AggregateFunctions.Add(sum);
                                sum.ResultFormatString = "{0:c2}";
  VReportViewer.GrdReport.GroupDescriptors.Add(descriptor);
}
}

and the Next Challenge I need to Group  next level i'm showing  example in attachment Please Help me to get these things
Gothrough Grouping2.png

Matt
Top achievements
Rank 1
 answered on 22 Oct 2013
12 answers
568 views
How can we automatically display dates in the correct format for users, based on their Windows localisation settings?

e.g.
UK: 20/12/2013
NO: 20.12.2013
US: 12/20/2013
etc
Kalin
Telerik team
 answered on 22 Oct 2013
1 answer
96 views
i need to filter column (hold integer value) as string ,
EX: col1 
      1023
      11255
      1269
I need to allow (starts with) in the filter

Any Help Please
Matt
Top achievements
Rank 1
 answered on 22 Oct 2013
3 answers
123 views
Hie,
i had written a small code to view pdf file using radpdfviewer and calling the aspx file on server via IIS..
but the problem is, it taking too much time to load on server..
can its downloading pdf file first then showing pdf?? 
Alexander
Telerik team
 answered on 22 Oct 2013
6 answers
348 views
Hi

I want to achieve some functionality. I have searched the web for over 4 days to find a solution but no luck at all. I am using Q2 2013 WPF components.

I have a MainVM that's creates and binds various VMs (one at a time). One of the VM is personVM with 3 properties Name, IsValid and lets say Age. I have implemented the IDataErrorInfo interface and it is working with PropertyGrid as expected. I have the same personVM for creating and editing person. The Name is required property and I want to force the user to set the Name before setting the Age. Best solution would be to disable Age definition and enable it when user sets the Name. I tried to set Age property definition IsReadOnly property to bind to IsValid, but it gave me an error 2 cannot find governing frameworkelement... I found an online help that says I need to explicitly define Source property of IsReadOnly property. How can I achieve that?? Or do you know better solution?? I tried also to disable AutoGeneratedPropertyDefinitions and create custom edit template with TextBox for Age and bind the TextBoxs IsEnabled to IsValid, but it is always enabled. Does the property definition override the enabled property of the textbox?? 

Thanks 

Vitalij
Mikhail
Top achievements
Rank 1
 answered on 22 Oct 2013
1 answer
83 views
Hi,
I wanted to add a title to the Cartesian Chart and used the default template to add a textblock as below :

 <Style x:Key="RadCartesianChartStyle" TargetType="{x:Type controls:ExtendedRadCartesianChart}">
                           <Setter Property="MinWidth" Value="100"/>
                           <Setter Property="MinHeight" Value="100"/>
                           <Setter Property="Background" Value="Transparent"/>
                           <Setter Property="HorizontalContentAlignment" Value="Center"/>
                           <Setter Property="VerticalContentAlignment" Value="Center"/>                                
                           <Setter Property="Template">
                           <Setter.Value>
                           <ControlTemplate TargetType="{x:Type controls:ExtendedRadCartesianChart}">
                           <Border x:Name="layoutRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                           <Grid>
                                            <StackPanel Orientation="Vertical">
                                              <TextBlock Text="This is a test Title" HorizontalAlignment="Center"></TextBlock>
                             <ContentPresenter x:Name="emptyContent" ContentTemplate="{TemplateBinding EmptyContentTemplate}" Content="{TemplateBinding EmptyContent}" 
                                                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                              IsHitTestVisible="False" 
                                              Visibility="Collapsed" 
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                             <Canvas x:Name="adornerContainer" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                             <Canvas x:Name="labelContainer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                             <Canvas x:Name="renderSurface" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                             <Border x:Name="plotAreaDecoration" Style="{TemplateBinding PlotAreaStyle}"/>
                             </Canvas>
                             </Canvas>
                             </Canvas>
                                           </StackPanel>
                           </Grid>
                           </Border>
                           </ControlTemplate>
                           </Setter.Value>
                           </Setter>
                           <Setter Property="TrackBallLineStyle">
                           <Setter.Value>
                           <Style TargetType="{x:Type Polyline}">
                           <Setter Property="Stroke" Value="#FF828282"/>
                           <Setter Property="StrokeThickness" Value="2"/>
                           </Style>
                           </Setter.Value>
                           </Setter>
                           <Setter Property="DragZoomBorderStyle">
                           <Setter.Value>
                           <Style TargetType="{x:Type Border}">
                           <Setter Property="BorderBrush" Value="#FF828282"/>
                           <Setter Property="BorderThickness" Value="1"/>
                           <Setter Property="Background" Value="#40FFFFFF"/>
                           </Style>
                           </Setter.Value>
                           </Setter>
                  </Style>

Now when I move the mouse over the chart, the vertical tracker line doesn't appear until I move the mouse over the series line and then the trackerball information appears fine. What property do I need to set  to allow the trackerball vertical line to appear as it appears before overriding with this control template?
Tina Stancheva
Telerik team
 answered on 22 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?