Telerik Forums
UI for WPF Forum
2 answers
299 views
Hi,
is it possible to hide the property grid row header (the first column, the one with the selection arrow)?

Thank you very much!

Enrico
Nicola Tramarin
Top achievements
Rank 1
 answered on 07 Nov 2013
3 answers
215 views
Hi,

we are doing standard validation using WPF INotifyDataErrorInfo and IDataErrorInfo interfaces on row values.
The validation messages display correctly, however are always duplicated (see attached pic). 

The column definition looks like this:

<telerik:GridViewDataColumn Header="Version" DataMemberBinding="{Binding Version}" IsReadOnly="True"/>

Any idea why this could be happening?

Note that the INotifyDataErrorInfo GetErrors() is only returning one item for the column

Regards,
Stevo

 

 

 

 

 

Yoan
Telerik team
 answered on 07 Nov 2013
1 answer
236 views
Hello!

On my RadPropertyGrid (having AutoGeneratePropertyDefinitions="True") I need to be able to show a context menu having a Reset 
menu item that will set the default value for the specific property definition selected.

To make things more complicated I cannot even see a simple ContextMenu for the entire property grid:

I tried to add a context menu to the whole RadPropertyGrid

<telerik:RadPropertyGrid.ContextMenu >
     <ContextMenu x:Name="menu">
            <MenuItem Header="Reset" Command="...."></MenuItem>
     </ContextMenu>
</telerik:RadPropertyGrid.ContextMenu>

But I cannot see that at all because the property grid is contained in the SettingsPaneView of a RadDiagram and no matter where in make the right click inside the PropertyGrid - I get the diagram's context menu

I badly need help!
R

Yoan
Telerik team
 answered on 07 Nov 2013
2 answers
177 views
Hello everyone,

We are encountering a little issue with spellchecking function of the richtextbox.

Let me explain the context : we are using Framework 3.5 and the runtime version of the Telerik library is v2.0.50727 for WPF.
Why 3.5? Because we also use Sharepoint 2010 and we have an application working with MVVM design pattern.

So here is our problem : we have a wpf page that creates dynamicly a table (rows and columns are dynamics) with a RichtextBox and each cell. Each cell has the right text and works fine. But whenever we try to use the spellcheck, it doesn't work. We investigated and realised that even if the spellcheck would see the wrong words on the control, you can't change it from the Right click context menu. We then realised that when we open up the context spell checking window, it automatically select the content of the first richtextbox object we have on the page. So even if the text content is the right one, it tries to replace it from the first RichtextBox of the table. Same goes for the Copy and paste functions.

First, we are not using the Telerik rich textbox by itself, we have another control that herits from it :
<UserControl x:Class="Eca.Assyst.Client.Common.RichTextEditor"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
             mc:Ignorable="d" 
             BorderBrush="Transparent" 
             Background="Transparent" 
             x:Name="thisUserControl"
             d:DesignHeight="300" 
             d:DesignWidth="300">
    <Grid>
        <telerik:HtmlDataProvider x:Name="htmlDataProvider"
                                  RichTextBox="{Binding ElementName=richTextBox}" 
                                  Html="{Binding Path=HtmlValue, ElementName=thisUserControl, Mode=TwoWay}">
            <telerik:HtmlDataProvider.FormatProvider>
                <telerik:HtmlFormatProvider>
                    <telerik:HtmlFormatProvider.ExportSettings>
                        <telerik:HtmlExportSettings DocumentExportLevel="Fragment" 
                                                    ExportStyleMetadata="False" 
                                                    StyleRepositoryExportMode="DontExportStyles" 
                                                    StylesExportMode="Inline"
                                                    ExportFontStylesAsTags="True" />
                    </telerik:HtmlFormatProvider.ExportSettings>
                </telerik:HtmlFormatProvider>
            </telerik:HtmlDataProvider.FormatProvider>
        </telerik:HtmlDataProvider>
        <telerik:RadRichTextBox x:Name="richTextBox" 
                                DocumentInheritsDefaultStyleSettings="True" 
                                BorderBrush="Transparent" 
                                Background="Transparent" 
                                AcceptsTab="False" />
    </Grid>
</UserControl>

Here is the control that is used for our table :
<UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="DataTemplates.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <StackPanel Margin="0,2,0,0"
                d:DataContext="{StaticResource ResourceKey=FindingEntryEditorViewModelMock}">
        <ContentControl x:Name="DropDownContainer"
                        Visibility="{Binding Path=DisplayStatusDropDown, Converter={StaticResource BooleanToVisibilityConverter}}">
            <telerik:RadComboBox x:Name="StatusComboBox"
                                SelectedValuePath="Value"
                                telerik:StyleManager.Theme="Metro"
                                ItemsSource="{Binding StatusItems, Converter={StaticResource EnumToListConverter}}" 
                                SelectedValue="{Binding Path=Entry.Status}">
                <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                        <Label Content="{Binding Path=Text}" Foreground="{Binding Path=Color}"></Label>
                    </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
            </telerik:RadComboBox>
        </ContentControl>
  
        <Common:RichTextEditor HtmlValue="{Binding Path=Entry.Text, Mode=TwoWay}"
                               GotFocus="richTextBox_GotFocus" 
                               LostFocus="richTextBox_LostFocus"></Common:RichTextEditor>
  
        <my:ReferencesEditor x:Name="referencesEditor" References="{Binding Path=Entry, Converter={StaticResource ResourceKey=ReferenceContainerConverter}}" />
    </StackPanel>

Here is the GridView table we use :
<ScrollViewer HorizontalScrollBarVisibility="Auto"
                                      VerticalScrollBarVisibility="Auto">
                            <StackPanel Orientation="Vertical">
                                <telerik:RadGridView x:Name="gridView"
                                                     RowIndicatorVisibility="Collapsed"
                                                     SelectedItem="{Binding SelectedItem}"
                                                     CanUserReorderColumns="False"
                                                     GridLinesVisibility="Horizontal"
                                                     ShowGroupPanel="False"
                                                     BorderThickness="0"
                                                     AutoGenerateColumns="False"
                                                     CanUserSortColumns="False"
                                                     CanUserFreezeColumns="False"
                                                     ColumnWidth="*"
                                                     BeginningEdit="GridView_OnBeginningEdit"
                                                     ItemsSource="{Binding Path=Finding.Items.List}"
                                                     EnableRowVirtualization="False"
                                                     EnableColumnVirtualization="False"
                                                     telerik:StyleManager.Theme="Windows7">
                                    <telerik:RadGridView.SortDescriptors>
                                        <telerik:SortDescriptor Member="SortOrder" SortDirection="Ascending"/>
                                    </telerik:RadGridView.SortDescriptors>
                                    <telerik:RadGridView.Columns>
                                        <telerik:GridViewDataColumn IsReadOnly="True"
                                                                    DataMemberBinding="{Binding Path=Code}"
                                                                    CellStyle="{StaticResource ResourceKey=CustomCellStyle}"
                                                                    Header="Type"
                                                                    Width="Auto" />
                                        <!-- More columns are added here dynamically by the code behind this file -->
                                    </telerik:RadGridView.Columns>
                                </telerik:RadGridView>
  
                                <AuditProgrammeEditor:FindingErrorSpecificationControl x:Name="ErrorSpecification"
                                                                                       Visibility="{Binding Path=DataContext.ShowAmountsTable, ElementName=MainContainer, Converter={StaticResource ResourceKey=BooleanToVisibilityConverter}}"
                                                                                       DataContext="{Binding MasterErrorEntry}"
                                                                                       IsEnabled="{Binding Path=DataContext.ReadOnly, ElementName=gridView, Converter={StaticResource ResourceKey=BooleanToInvertedBooleanConverter}}"
                                                                                       Margin="0,0,0,5"/>
                            </StackPanel>
                        </ScrollViewer>

And last but not least, this how we get our DataTemplate for each column :
public DataTemplate GetTemplate(int columnIndex, bool isEnabled)
        {
            var templateXaml = Properties.Resources.FindingTableEntryTemplate;
            templateXaml = templateXaml.Replace("{EntryIndex}", columnIndex.ToString(CultureInfo.InvariantCulture));
            templateXaml = templateXaml.Replace("{IsEnabled}", isEnabled.ToString(CultureInfo.InvariantCulture));
            var stream = new MemoryStream(Encoding.Default.GetBytes(templateXaml));
            return (DataTemplate)XamlReader.Load(stream);
        }

Thanks in advance !
ASSYST2 - CGI
Top achievements
Rank 1
 answered on 07 Nov 2013
4 answers
243 views

Hi,

 

I have a WPF application running inside Internet Explorer.  One of the dialogs attempts to open a RadWindow when the user presses a button.  However, the user will never see the RadWindow. I see the same problem with the RadScheduleView, which does not show the edit appointment dialog in a WPF application inside IE, so I'm guessing that it uses RadWindow for this dialog. 
When I call MyRadWindow.Show() it seems to create the instance, but the Owner property is null. Also, the following call does not detect any windows:

 

 

 

IList<WindowBase> windows = RadWindowManager.Current.GetWindows();

 

 

Just a note, the Silverlight version of RadWindow works fine in a Silverlight application running in Internet Explorer.

 

Thanks!

Chris
Top achievements
Rank 1
 answered on 06 Nov 2013
0 answers
88 views
Hello,

I have a RadGridView on a user control, which is switched in/out via a ContentControl. The view model behind the grid is a singleton instance, and will be reused.

When the Content property of the ContentControl is changed, a new view is created as it should, however the grid nulls out the SelectedItem property, which then changes the view model underneath when this view/view model goes out of scope. Why does this occur?

I would like to be able to switch this view back in and display the selected item when the user comes back to it, which should be possible, but the grid changes the view model when unbinding.
<UserControl x:Class="InventoryView"
 
 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 
             xmlns:tools="ViewModels.Tools;assembly=ViewModels"
 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
 
             xmlns:conv="clr-namespace:Views.Converters"
 
             xmlns:views="clr-namespace:Views"
 
             mc:Ignorable="d"
 
             d:DesignHeight="700" d:DesignWidth="1000">
 
      
 
    <Grid d:DataContext="{d:DesignInstance Type=tools:InventoryViewModel, IsDesignTimeCreatable=True}">
 
        <Grid.ColumnDefinitions>
 
            <ColumnDefinition />
 
            <ColumnDefinition Width="5"/>
 
            <ColumnDefinition Width="2*" />
 
        </Grid.ColumnDefinitions>
 
          
 
        <TabControl Grid.Column="0">
 
            <TabControl.Items>
 
                <TabItem Header="Networks">
 
                    <!--<DataGrid ItemsSource="{Binding Networks}" SelectedItem="{Binding SelectedNetwork}"></DataGrid>-->
 
                    <telerik:RadGridView
 
                        ItemsSource="{Binding Networks}"
 
                        AutoGenerateColumns="False"
 
                        AlternationCount="1"
 
                        GridLinesVisibility="None"
 
                        CanUserDeleteRows="False"
 
                        CanUserInsertRows="False"
 
                        RowIndicatorVisibility="Collapsed"
 
                        SelectedItem="{Binding SelectedNetwork}">
 
                          
 
                        <telerik:RadGridView.Columns>
 
                            <telerik:GridViewDataColumn
 
                                Header="Name"
 
                                UniqueName="Name"
 
                                Width="100"
 
                                DataMemberBinding="{Binding Name}"/>
 
                              
 
                            <telerik:GridViewDataColumn
 
                                Header="Type"
 
                                UniqueName="Type"
 
                                Width="100"
 
                                DataMemberBinding="{Binding IsPhysical, Converter={StaticResource NetworkTypeConverter} }"/>
 
                              
 
                            <telerik:GridViewDataColumn
 
                                Header="Owner"
 
                                UniqueName="Owner"
 
                                Width="100"
 
                                DataMemberBinding="{Binding ContactName}"/>
 
                        </telerik:RadGridView.Columns>
 
                    </telerik:RadGridView>
 
                </TabItem>
 
    </Grid>
 
</UserControl>

<!-- placeholder for main content area view -->
<ContentControl Grid.Row="1"
                Content="{Binding SelectedToolViewModel}"
                ContentTemplateSelector="{Binding Source={StaticResource SelectedToolTemplateSelector}}" />


Joe
Top achievements
Rank 1
 asked on 06 Nov 2013
1 answer
96 views
Hello Telerik,

I my application, i have around 20 RadGridViews in a single UserControl and its working fine. Here i just want to know, is there any possiblities to export all the Grid's data to a single excl sheet one below another one or else exporting as like in the UI.

Please let me know any solution.

Regards,
Ramesh
HCL Technologies
Ivan Ivanov
Telerik team
 answered on 06 Nov 2013
1 answer
210 views
Hi,

We have been developing a WPF dashboard application that uses extensions (class libraries) that use Telerik WPF controls like Charting.
Is it possible to somehow embed needed Telerik control assemblies to each extension DLL so that we would not have to add these control assemblies also to hosting application (dashboard)? We are using MEF and PRISM.

I've seen some information about setting "Embed interop" property to True on class libraries but I'm not sure if that would do the trick. We would like our Dashboard and its extensions to be as loosely coupled as possible.

One "solution" would be to copy all needed control DLLs to Dashboard's running directory but we would like our extensions to only have one class library.

Br,

Kalle
Yana
Telerik team
 answered on 06 Nov 2013
10 answers
191 views
Hi,
again my RadScheduler's CustomTheme stopped working after upgrading to the new version. Its just dark-grey. No appointments or anything. And no error!
The theme.xaml has 3200 lines of code and its very frustrating and time-consuming to make it work again without having a clue why it stopped working. I already did that a couple of times. Could you please post a working custom-theme (or the default theme) so I can find the differences? I can't post my theme.xaml because your website hangs when I try to paste it into the code-block.


Best Regards
Steffen
Yugank
Top achievements
Rank 1
 answered on 06 Nov 2013
5 answers
121 views
Hi,

I want to DisAllow dropping Floating window over TabHeader. 
Hereby I Attached a ScreenShot.
On dragging the Floating Window over the Mainwindow, that Yellow Region in Tabheader allows me to drop the Floating 
Window over there.
My application doesn't need this facility.


Thanks in Advance,
M.Vinnarasi


Vladi
Telerik team
 answered on 06 Nov 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?