Telerik Forums
UI for WPF Forum
1 answer
92 views

Hi,

I'm using "RadControls for WPF Q1 2010 SP2". I don't know whether it's because of my settings or it is a bug but when the window is initialized the tiles are shown in Minimized state with small content. If I maximize one of them and then minimize them all again the previously maximized tile is shown in Restore state but the others are stiil shown in Minimized state.

Below is the XAML and CS code:

<Window x:Class="TestApp.MainWindow" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
        xmlns:telerikAnimation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls" 
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
        Title="MainWindow" Height="350" Width="525" 
        WindowState="Maximized"
  <Grid> 
    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalAlignment="Stretch" 
            HorizontalAlignment="Stretch" VerticalScrollBarVisibility="Auto" Padding="0" 
            BorderThickness="0" > 
      <Border Margin="10" HorizontalAlignment="Center" VerticalAlignment="Center"
        <Border.Resources> 
          <Style TargetType="TextBlock" x:Key="HeaderTitle"
            <Setter Property="Foreground" Value="Black" /> 
            <Setter Property="FontSize" Value="12" /> 
            <Setter Property="FontWeight" Value="Bold" /> 
            <Setter Property="FontFamily" Value="Segoe UI" /> 
            <Setter Property="VerticalAlignment" Value="Center" /> 
            <Setter Property="Padding" Value="0" /> 
          </Style> 
          <Style TargetType="TextBlock" x:Key="SmallBox"
            <Setter Property="Foreground" Value="#0b4366" /> 
            <Setter Property="FontSize" Value="12" /> 
            <Setter Property="FontWeight" Value="Normal" /> 
            <Setter Property="FontFamily" Value="Segoe UI" /> 
            <Setter Property="VerticalAlignment" Value="Center" /> 
            <Setter Property="Padding" Value="10 0" /> 
          </Style> 
          <DataTemplate x:Key="Package"
            <Grid> 
              <Border Style="{StaticResource DetailBorder}"
                <Grid> 
                  <Grid.RowDefinitions> 
                    <RowDefinition /> 
                    <RowDefinition /> 
                  </Grid.RowDefinitions> 
 
                  <Grid.ColumnDefinitions> 
                    <ColumnDefinition Width="Auto" /> 
                    <ColumnDefinition Width="Auto" /> 
                    <ColumnDefinition Width="Auto" /> 
                    <ColumnDefinition Width="65" /> 
                  </Grid.ColumnDefinitions> 
 
                  <TextBlock Grid.Row="0" Grid.Column="0" Text="Kod:" /> 
                  <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Path=Code}" /> 
 
                  <TextBlock Grid.Row="0" Grid.Column="2" Text="Form Miktar:" /> 
                  <TextBox Grid.Row="0" Grid.Column="3" Text="{Binding Path=ChildQty}" /> 
 
                  <TextBlock Grid.Row="1" Grid.Column="0" Text="Tanım:" /> 
                  <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Descr}" /> 
 
                  <TextBlock Grid.Row="1" Grid.Column="2" Text="Satış Miktar:" /> 
                  <TextBox Grid.Row="1" Grid.Column="3" Text="{Binding Path=ParentQty}" /> 
                </Grid> 
              </Border> 
            </Grid> 
          </DataTemplate> 
        </Border.Resources> 
        <telerikNavigation:RadTileView x:Name="rtvTest" Width="950" Height="400" 
                                     Grid.Column="1" Grid.Row="1"  
                                     ItemsSource="{Binding Products}" 
                                     MaximizeMode="ZeroOrOne"
          <telerikNavigation:RadTileView.ItemTemplate> 
            <DataTemplate> 
              <TextBlock Text="{Binding Path=Descr}" Style="{StaticResource HeaderTitle}"/> 
            </DataTemplate> 
          </telerikNavigation:RadTileView.ItemTemplate> 
          <telerikNavigation:RadTileView.ContentTemplate> 
            <DataTemplate> 
              <telerik:RadFluidContentControl telerikAnimation:AnimationManager.IsAnimationEnabled="True" 
                                            SmallToNormalThreshold="280, 130" 
                                            NormalToSmallThreshold="280, 130" 
                                            NormalToLargeThreshold="730, 350" 
                                            LargeToNormalThreshold="730, 350" > 
                <telerik:RadFluidContentControl.SmallContent> 
                  <Border Height="30" Width="190" > 
                    <TextBlock Text="{Binding SmallCode}" Style="{StaticResource SmallBox}"/> 
                  </Border> 
                </telerik:RadFluidContentControl.SmallContent> 
                <telerik:RadFluidContentControl.Content> 
                  <Border Height="130" Width="280"
                    <TextBlock Text="{Binding Path=NormalCode}" Style="{StaticResource SmallBox}" FontWeight="Bold" FontSize="14"/> 
                  </Border> 
                </telerik:RadFluidContentControl.Content> 
                <telerik:RadFluidContentControl.LargeContent> 
                  <Border Margin="30,80,30,30" Height="350" Width="730" > 
                    <TextBlock Text="{Binding Path=LargeCode}" Style="{StaticResource SmallBox}" FontWeight="DemiBold" FontSize="18"/> 
                  </Border > 
                </telerik:RadFluidContentControl.LargeContent> 
              </telerik:RadFluidContentControl> 
            </DataTemplate> 
          </telerikNavigation:RadTileView.ContentTemplate> 
 
        </telerikNavigation:RadTileView> 
      </Border> 
 
    </ScrollViewer> 
 
  </Grid> 
</Window> 

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.Windows; 
using System.Windows.Controls; 
using System.Windows.Data; 
using System.Windows.Documents; 
using System.Windows.Input; 
using System.Windows.Media; 
using System.Windows.Media.Imaging; 
using System.Windows.Navigation; 
using System.Windows.Shapes; 
 
namespace TestApp { 
 
  public partial class MainWindow : Window { 
    public MainWindow() { 
      InitializeComponent(); 
 
      rtvTest.ItemsSource = TestEntity.GetSampleList(); 
    } 
  } 
 
  public class TestEntity { 
    public string SmallCode { getset; } 
    public string NormalCode { getset; } 
    public string LargeCode { getset; } 
 
    public TestEntity(string smallCode, string normalCode, string largeCode) { 
      SmallCode = smallCode; 
      NormalCode = normalCode; 
      LargeCode = largeCode; 
    } 
 
    public static List<TestEntity> GetSampleList() { 
      List<TestEntity> result = new List<TestEntity>(); 
      result.Add(new TestEntity("A1""A11""A111")); 
      result.Add(new TestEntity("B1""B11""B111")); 
      result.Add(new TestEntity("C1""C11""C111")); 
      result.Add(new TestEntity("D1""D11""D111")); 
      result.Add(new TestEntity("E1""E11""E111")); 
      result.Add(new TestEntity("K1""K11""K111")); 
      result.Add(new TestEntity("X1""X11""X111")); 
 
      return result; 
    } 
  } 
 

Thanks in advance

Kiril Stanoev
Telerik team
 answered on 07 Jul 2010
5 answers
226 views
My RadGrid has several instances where I use a Row Details Template to have a Grid within a grid (if that makes any sense...). I was hoping the rows of the inner grid would inherit the style of the parent grid, but this doesn't seem to be the case. Even if I define a row style in the XAML markup for my inner grid it still doesn't work. But there is no problme at all with the parent grid. All I want to be able to do is make the background of each row transparent. Does anyone have any suggestions on what I might be doing wrong?

<telerikGrid:RadGridView x:Name="partSearchInfoRadGridView" GridLinesVisibility="Horizontal" AutoGenerateColumns="False" SelectionMode="Multiple" ItemsSource="{Binding partInfoDT}" RowDetailsVisibilityChanged="partSearchInfoRadGridView_RowDetailsVisibilityChanged" 
RowDetailsVisibilityMode="VisibleWhenSelected" RowLoaded="partSearchInfoRadGridView_RowLoaded" ScrollViewer.HorizontalScrollBarVisibility="Hidden"  
Style="{DynamicResource RadGridViewStyleECP}" RowStyle="{DynamicResource GridViewRowStyle}"                                                          
IsSynchronizedWithCurrentItem="False"  SelectionChanged="partSearchInfoRadGridView_SelectionChanged"
 
<telerikGrid:RadGridView.Columns>.... 
 
 
 
 
 
<telerikGrid:RadGridView.RowDetailsTemplate> 
<DataTemplate> 
 
<telerikGrid:RadGridView x:Name="partSearchInfoInnerRadGridView" CanUserFreezeColumns="False" GridLinesVisibility="Horizontal" IsReadOnly="True"  
AutoGenerateColumns="False" Height="200" RowHeight="30" ScrollViewer.HorizontalScrollBarVisibility="Hidden"  
Style="{DynamicResource RadGridViewStyleECP}" RowStyle="{DynamicResource GridViewRowStyle}"  
IsSynchronizedWithCurrentItem="False" RowDetailsVisibilityMode="Collapsed" 
SelectionChanged="partSearchInfoInnerRadGridView_SelectionChanged" 
IsFilteringAllowed="False" ShowGroupPanel="False" > 
 
<telerikGrid:RadGridView.Columns>.... 

Mark
Top achievements
Rank 1
 answered on 07 Jul 2010
1 answer
106 views
I have a GridView with a bunch of DataColumns. I am filtering the grid programmatically, so... I want to filter based on the contents of a List.

Example: I have 3 types of equipment I can use: A, B, and C. I want to show only records where I used A, or A and C, etc.

I am using ColumnFilterDescriptors for moment - and for the rest of the columns, the DistinctFilters.DistinctValues work fine. Just not sure how to filter based on what's in the list.
Rossen Hristov
Telerik team
 answered on 07 Jul 2010
3 answers
128 views
Hi ,

I have been using Infragistics winform grid in my past projects, it had a wonderfull functionality of giving the user to choose in real time between the available aggregate functions in Grid's footer (just like the filtering option).
So basically, there was another icon next to the filtering icon, clicking on it provided pop up window with count, sum etc.. functions, choosing aggregate function showed the result in the footer of the Grid.

I need excatlly the same functionalitty in my application - How can this be implemented?
Could you please provide with example.

Thank you ahead,
Mark
Pavel Pavlov
Telerik team
 answered on 07 Jul 2010
3 answers
178 views
Hello,

How we can save grid filter value into database or any file? & load same setting when loading grid once again?

with search i found RadGridViewSettings.vb but error fired "Type 'DataContractSerializer' is not defined." even if i imported

 

System.Xml.Serialization. I am using VS2010, framework 4 with WPF Telerik controls.

Can i have some example for the same?

Snehal
Top achievements
Rank 1
 answered on 07 Jul 2010
3 answers
120 views
I need a checkbox column that has a checkbox control in the header that will mimic what the GridViewSelectColum does.  I cannot use the GridViewSelectColumn because I'm not looking to select all rows - I just want to check all rows - like mark all as read functionality.  To achieve this I simply put a CheckBox control in the header of my bool column and set the binding to a property in my VM called CheckAll.

<CheckBox IsChecked="{Binding CheckAll, diagnostics:PresentationTraceSources.TraceLevel=High}"></CheckBox>

The setter on my property is not being called and when I added the diagnostics the binding does not show up.  However, when I move the checkbox outside of the grid it works fine - so I'm thinking the reference is lost?

Thanks,

Greg


Pavel Pavlov
Telerik team
 answered on 07 Jul 2010
1 answer
119 views

Hi

Is someone known where is the sing of the plus (+) in the Row Details?

Best Regards

Ehud

Vlad
Telerik team
 answered on 07 Jul 2010
1 answer
101 views
We use the 2009 Q3 Rad control.  Also we use MVVM.  the SelectedItem is bound to prop in ViewModel.  When clicking on a GridViewdataColumn, the setter for SelectedItem is called and the row is highlighted, but for any CellTemplate is clicked,  the setter for SelectedItem is NOT called and the row is NOT highlighted.   Is any property I can set to make the row is selected when Clicking the cell?

Thanks!

Amy
Vlad
Telerik team
 answered on 07 Jul 2010
4 answers
77 views
Hello,
I am running into a problem with the RadTileView, and the RadFluidContentControl.  I am binding the ItemsSource to a list in my ViewModel, and in turn, I am using the ContentTemplate to render the items, I added a RadFluidContentControl, and use the SmallContentTemplate, MediumContentTemplate, and LargeContentTemplate but it never changes the content in the template,  The same xaml using hard coded content seems to work fine.  Is this a bug in the RadFluidContentControl,or am I using it wrong? 
Below is the Xaml that I am working with.  Rooms is a list of classes with a "DisplayName" property.

Thanks in advance for any help.
        <telerik:RadTileView Margin="8" MinimizedColumnWidth="220" ItemsSource="{Binding Rooms}" > 
            <telerik:RadTileView.ItemTemplate> 
                <DataTemplate> 
                    <TextBlock Text="{Binding DisplayName}">  
                    </TextBlock> 
                </DataTemplate> 
            </telerik:RadTileView.ItemTemplate> 
            <telerik:RadTileView.ContentTemplate> 
                <DataTemplate> 
                    <telerik:RadFluidContentControl BorderBrush="black" BorderThickness="2" SmallToNormalThreshold="190, 140" 
                                    NormalToSmallThreshold="190, 140" NormalToLargeThreshold="320, 320" 
                                    LargeToNormalThreshold="320, 320" ContentChangeMode="Automatic">  
                        <telerik:RadFluidContentControl.SmallContentTemplate> 
                            <DataTemplate> 
                                <Grid> 
                                    <TextBlock Text="{Binding DisplayName}"></TextBlock> 
                                    <TextBlock Text="small"></TextBlock> 
                                </Grid> 
                            </DataTemplate> 
                        </telerik:RadFluidContentControl.SmallContentTemplate> 
                        <telerik:RadFluidContentControl.ContentTemplate> 
                            <DataTemplate> 
                                <Grid> 
                                    <TextBlock Text="{Binding DisplayName}"></TextBlock> 
                                    <TextBlock Text="Medium"></TextBlock> 
                                </Grid> 
                            </DataTemplate> 
                        </telerik:RadFluidContentControl.ContentTemplate> 
                        <telerik:RadFluidContentControl.LargeContentTemplate> 
                            <DataTemplate> 
                                <local:RoomControl Margin="10" HorizontalAlignment="Left" VerticalAlignment="Top"  DataContext="{Binding}"/>  
                            </DataTemplate> 
                        </telerik:RadFluidContentControl.LargeContentTemplate> 
                    </telerik:RadFluidContentControl> 
                </DataTemplate> 
            </telerik:RadTileView.ContentTemplate> 
        </telerik:RadTileView> 
 
Lance
Top achievements
Rank 1
 answered on 06 Jul 2010
1 answer
188 views
I have set the ItemsSource of my combobox column to a list of custom objects.  This works fine and I am able to update my object with the selected item from the combobox.  The problem is that my users will need to be able to set this column to null, so I add a null to the list of objects.  I can see the null in the list fine, but whenever I select it, the property of the DataMember SalesRep does NOT get set at all.  I have to select a different item in the list.  I've put a break point on the Property set and it isn't firing at all on null.  Is this a bug, or is there a "better" way?

    <DataTemplate DataType="{x:Type lib:Security.UserInfo}">
        <TextBlock>
                <TextBlock.Text>
                    <MultiBinding StringFormat="{}{0}, {1}">
                        <Binding Path="LastName" />
                        <Binding Path="FirstName" />
                    </MultiBinding>
                </TextBlock.Text>
        </TextBlock>
    </DataTemplate>  
...
<telerik1:GridViewComboBoxColumn Name="SalesRepColumn" Header="Sales Rep" DataMemberBinding="{Binding SalesRep, ValidatesOnDataErrors=True,ValidatesOnExceptions=True,UpdateSourceTrigger=PropertyChanged}"/>
...
CollectionViewSource userInfoSource = this.FindResource("userInfoSource"as CollectionViewSource;
var ul = UserInfoList.GetUserInfoList().OrderBy(u => u.LastName).ToList();                        
ul.Insert(0, null);
userInfoSource.Source = ul;
SalesRepColumn.ItemsSource = userInfoSource.View;

...

public UserInfo SalesRep {
get { return GetProperty(SalesRepProperty); }
set { _salesRep = value; }
}


Pavel Pavlov
Telerik team
 answered on 06 Jul 2010
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?