Telerik Forums
UI for WPF Forum
1 answer
105 views

Hello,

in a grid view with filter:

  1. Open a filter.
  2. Where the the filter display "Or", clic on the combo box and leave it open.
  3. Clic on another place in the application, the combo box is closed, but not the filter.
Yoan
Telerik team
 answered on 30 Oct 2015
3 answers
190 views
Just installed the latest WPF controls and the Demo app but the demo app isn't working.  The app is looking for Telerik.Windows.Control version 2015.3.930.40 and failing to find that version, but  I have 2015.3.930.45 installed locally.  Should this be working correctly or is something broken?  Thanks.
Stefan Nenchev
Telerik team
 answered on 29 Oct 2015
1 answer
154 views
Hi! I know how to set a custom style for the field of a property grid but I cant figure out how I am supposed to make that style bound to anything that is relative to the specific PropertyDefinition of that field.
 
The PropertyGridField's PropertyDefinition is the default source the style's binding. The binding path of the PropertyDefinition might be "Communication.Timeout" but I want to bind the FontWeight property to "Communication.TimeoutProperty.Mode". How can this be done? 

 

Do I have to create a subclass of PropertyDefinition with my own dependency properties on to be able to do this?  

<telerik:RadPropertyGrid
    Name="PropertyGrid"
    IsGrouped="True"
    Item="{Binding SelectedItem}"
    EditMode="Single"
    RenderMode="Flat"                                 
    FieldStyle="{DynamicResource PropertyGridFieldStyle}"
    AutoGeneratePropertyDefinitions="False">
    <telerik:RadPropertyGrid.Resources>               
        <Style x:Key="PropertyGridFieldStyle"
               TargetType="{x:Type telerik:PropertyGridField}"
               BasedOn="{StaticResource PropertyGridFieldStyle}">                   
                    <Setter Property="FontWeight" Value="{Binding Path=???}"/>
        </Style>
    </telerik:RadPropertyGrid.Resources>
</telerik:RadPropertyGrid>
Stefan
Telerik team
 answered on 29 Oct 2015
3 answers
166 views
Hi every one on Telerik :P
Im getting a Exception Which is unknown to me and apparently Microsoft

Sinse i'm new to templating in WPF i'm not really sure what is hapening, I get this Exception "Provide value on 'System.Windows.Baml2006.DeferredBinaryDeserializerExtension' threw an exception." and the inner exception "Token is not valid."

Is there any reason why i would get this? Please help.

Here is my Stack Trace and Source Code.

   at System.Windows.Markup.XamlReader.RewrapException(Exception e, Uri baseUri)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
   at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
   at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
   at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
   at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 1269

<Page x:Class="GridTest.Page1"
      mc:Ignorable="d" Title="SomePage"
      xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" xmlns:my="clr-namespace:GridTest" xmlns:gridview="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView">
    <Page.Resources>
        <my:NorthwindOADataSet x:Key="northwindOADataSet" />
        <CollectionViewSource x:Key="employeesViewSource" Source="{Binding Path=Employees, Source={StaticResource northwindOADataSet}}" />
         
        <ControlTemplate x:Key="ImageCellTemplate" TargetType="{x:Type telerik:GridViewCell}">
            <Rectangle RadiusX="5" RadiusY="100" Height="100">
                <Rectangle.Fill>
                    <ImageBrush x:Name="brush" ImageSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}"></ImageBrush>
                </Rectangle.Fill>
            </Rectangle
        </ControlTemplate>
         
        <ControlTemplate x:Key="MyCustomRowTemplate" TargetType="{x:Type telerik:GridViewRow}">
            <Border Background="Transparent" Name="selectedRow" Margin="0" Opacity="1" BorderThickness="0,1,0,1" VerticalAlignment="Center">
                <Grid Width="400">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="35"/>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="100"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border Height="Auto" HorizontalAlignment="Left" Background="#FF233052" Margin="2,1,0,0" Width="400" BorderBrush="#FFFFFFFF" CornerRadius="5,5,5,5" BorderThickness="1" Grid.ColumnSpan="4">
                    </Border>
                    <Border Height="Auto" Grid.Row="1" HorizontalAlignment="Left" Background="#FF5E78BA" Margin="2,1,0,0" Width="400" BorderBrush="#FFFFFFFF" CornerRadius="5,5,5,5" BorderThickness="1" Grid.ColumnSpan="4" Grid.RowSpan="4">
                    </Border>
                     
                    <gridview:GridViewCell Grid.Row="0" Grid.Column="1" Foreground="#FFFFFFFF" Width="200" Margin="0,5,0,0" HorizontalAlignment="Left" Name="FirstName" TextBlock.FontSize="16" VerticalAlignment="Center"/>
 
                    <gridview:GridViewCell Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" Foreground="#FFFFFFFF" Width="200" Margin="0,5,0,0" HorizontalAlignment="Left" Name="Title" TextBlock.FontSize="16" VerticalAlignment="Center" />
 
                    <gridview:GridViewCell Name="LastName" TextBlock.Foreground="#FFC4D2EF" Grid.Row="1" Grid.Column="0" Grid.RowSpan="3" Width="100" Margin="10,0,0,12">
                        <gridview:GridViewCell.LayoutTransform>
                            <TransformGroup>
                                <RotateTransform Angle="270"/>
                            </TransformGroup>
                        </gridview:GridViewCell.LayoutTransform>
                    </gridview:GridViewCell>
                     
                    <gridview:GridViewCell Name="Photo" HorizontalAlignment="Center" VerticalAlignment="Center" Template="{StaticResource ImageCellTemplate}" Margin="10,50,10,20" Grid.Column="1" Grid.Row="0" Grid.RowSpan="4"/>
                     
                    <Label Grid.Column="2" Foreground="FFC4D2EF" Grid.Row="1" Content="Street Address"/>
                    <Label Grid.Column="2" Foreground="FFC4D2EF" Grid.Row="2" Content="City:"/>
                    <Label Grid.Column="2" Foreground="FFC4D2EF" Grid.Row="3" Content="HomePhone:"/>
 
                    <gridview:GridViewCell Grid.Column="3" TextBlock.Foreground="#FFFFFFFF" Grid.Row="1" Name="Address">
                        <gridview:GridViewCell.Template>
                            <ControlTemplate>
                                <TextBlock TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Context}"/>
                            </ControlTemplate>
                        </gridview:GridViewCell.Template>
                    </gridview:GridViewCell>
 
                    <gridview:GridViewCell TextBlock.Foreground="#FFFFFFFF" Grid.Column="3" Grid.Row="2" Name="City"/>
                    <gridview:GridViewCell TextBlock.Foreground="#FFFFFFFF" Grid.Column="3" Grid.Row="3" Name="HomePhone"/>
                    <gridview:GridViewCell Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" TextBlock.Foreground="#FFFFFFFF" Name="Notes">
                        <gridview:GridViewCell.Template>
                            <ControlTemplate>
                                <TextBlock TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Context}" />
                            </ControlTemplate>
                        </gridview:GridViewCell.Template>
                    </gridview:GridViewCell>
                     
                </Grid>
            </Border>
        </ControlTemplate>
         
        <Style TargetType="{x:Type gridview:GridViewRow}">
            <Setter Property="telerik:GridViewRow.Template" Value="{StaticResource MyCustomRowTemplate}"/>
        </Style>
         
    </Page.Resources>
    <Grid DataContext="{StaticResource employeesViewSource}">
        <controls:RadGridView HorizontalAlignment="Left" Name="radGridView1" VerticalAlignment="Top" ScrollMode="RealTime" IsReadOnly="True" AutoGenerateColumns="False" ItemsSource="{Binding}">
            <controls:RadGridView.Columns>
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="EmployeeID" />
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="LastName" />
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="Photo" IsSortable="True" />
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="Title" />
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="City" />
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="HomePhone" />
            </controls:RadGridView.Columns>
        </controls:RadGridView>
    </Grid>
</Page>
 
Source Code is not much
 
public Page1()
        {
            InitializeComponent();
 
            var dbdata = new NorthwindOADataSetTableAdapters.EmployeesTableAdapter();
            radGridView1.DataContext = dbdata.GetData();
        }
Petya
Telerik team
 answered on 29 Oct 2015
5 answers
128 views

Hi,

in the ScheduleView control, I fill the control with appointments and SpecialSlots from 8AM to 4PM. Using the mousewheel cause that sometime, the SpecialSlots become not visible!!! When this occured, I need to force a refresh by scrolling a little bit then the SpecialSlots become visible...

 

Demo included (rename the JPG file to ZIP)...

 

Thank's

Alain

 

Christie Admin
Top achievements
Rank 1
 answered on 29 Oct 2015
2 answers
575 views
Hello team,

I want to set the background color of a single cell in my gridview.
The bound object contains a string with the hex value of the color. The property is BackcolorHex.

<telerik:RadGridView Grid.Row="11" Grid.Column="1" Grid.ColumnSpan="4"
                     AutoGenerateColumns="False"
                     ItemsSource="{Binding WorkflowView}"
                     RowHeight="25"
                     CanUserFreezeColumns="False"
                     telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled="True"
                     IsSynchronizedWithCurrentItem="True"
                     IsEnabled="{Binding ModelController.WorkflowHelper.IsWorkflowEditing,
                                 Converter={StaticResource InvertBoolConv}}">
    <telerik:RadGridView.Resources>
        <Style x:Key="CellBGStyle" TargetType="telerik:GridViewCell">
            <Setter Property="Background"
                    Value="{Binding Path=BackcolorHex,
                            Converter={StaticResource HexToColorConv}}">
            </Setter>
        </Style>
    </telerik:RadGridView.Resources>
 
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="Farbe"
                                    CellStyle="{StaticResource CellBGStyle}"
                                    DataMemberBinding="{Binding Path=BackcolorHex,
                                                        Converter={StaticResource HexToColorConv}}"
                                    IsReadOnly="True"/>
 
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

This is my converter function:

public object Convert(object value, Type targetType, object parameter,
                      CultureInfo culture)
{
    Brush retVal = new SolidColorBrush(Colors.White);
 
    if (value != null && value is ModelWorkflow)
    {
        myConverter conv = new myConverter();
        retVal = conv.ToBrush(((ModelWorkflow)value).BackcolorHex);
    }
 
    return retVal;           
}

The string is shown in the cell right. But the backcolor does not change. It's always white. Could you please tell me what i'm doing wrong?

Thank you very much.

Best regards from Germany!


Stefan
Telerik team
 answered on 29 Oct 2015
1 answer
230 views

Hi,

  I have a project using various Telerik controls.  The wizard set up my project so that the binaries are in the project tree like this:

<MyProjectPath>\lib\RCWPF\2015.1.401.45\

   I want to move this whole "2015.1.401.45" directory somewhere and point my references there.  That would allow me to have multiple projects reference the binaries without the need to have 83 MB of extra binaries in each project.

  If I move the files and re-point the references, I can no longer use the RadGridView.  Visual Studio 2013 just can't find it.

   Can I move the Telerik binaries and point references to the new location?  Are there any tricks involved in the process?

 

Thanks.

Yana
Telerik team
 answered on 29 Oct 2015
3 answers
66 views

Hi

This is probably a simple thing to achieve but I'm struggling to come up with the solution!

For tasks without children there is currently no expand/collapse image displayed in the tree cell as you would expect. However, for tasks without children at level 1 would it be possible to display an image - for example a simple bullet-point style image?

Many thanks

Adrian

Vladi
Telerik team
 answered on 29 Oct 2015
1 answer
309 views

I have the problem, that the filter in the Telerik RadGridView has a wrong formatting for date fields. In the grid it self they are drawn correctly. I use the format: dd.mm.yyyy

 Please take a look at the attached screenshot.

 I set the column culture like this:

GridViewBoundColumnBase column = new GridViewDataColumn();
column.Language = System.Windows.Markup.XmlLanguage.GetLanguage("de-DE");
this.IsLocalizationLanguageRespected = true; // this is the instance of the RadGridView

Thank you!

Stefan Nenchev
Telerik team
 answered on 29 Oct 2015
4 answers
1.1K+ views
Hi,
   Items listed in the RadComboBox need to be sorted Alphabetically.
   How to Alphabetically sort the RadComboBoxItems?

With Thanks,
Vinnarasi

Alan
Top achievements
Rank 1
 answered on 28 Oct 2015
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?