Telerik Forums
UI for WPF Forum
1 answer
88 views
Hi team

Can we define styles and themes for all the WPF controls in one file and applying them to whole application like we have  CSS file in .aspx .
Hristo
Telerik team
 answered on 04 Mar 2010
3 answers
127 views
hi,

first let me complement your control, it looks good and it's easy to use and code.

i want to try and do something with it, and i don't really know where to begin.
when Collapsed i want the expander to look different and be a little bit shown and put some buttons on it with icons,
something like the example i've attached (in both pictures the expander is Expended but you get the idea i think)

i thought about using its' events (PreviewCollapsed?) or something like that but i wonder if there is a better way.

can you help in some info on how to accomplish this?

thanks in advance.

Lior.

Ivan
Telerik team
 answered on 04 Mar 2010
1 answer
207 views
Hi, im trying to bind a property to a templated datacolumn, but i dont get anything.

The radgridview is binding to a simple dataset.

<
Window x:Class="LogViewer.MainWindow" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Title="MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"   
        Drop="Window_Drop" AllowDrop="True" 
        xmlns:local="clr-namespace:LogViewer">  
    <Grid> 
        <Grid.Resources> 
            <Style x:Key="customCell" TargetType="telerik:GridViewCell">  
                <Setter Property="Template">  
                    <Setter.Value> 
                        <ControlTemplate TargetType="telerik:GridViewCell">  
                            <TextBlock Text="{Binding type1}" />
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
        </Grid.Resources> 
        <telerik:RadGridView Name="radGridView1" AutoGenerateColumns="True" telerik:StyleManager.Theme="Vista">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn Header="" TextAlignment="Center" 
                                            CellStyle="{StaticResource customCell}" IsSortable="False" Width="76" /> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
    </Grid> 
</Window> 
Rossen Hristov
Telerik team
 answered on 04 Mar 2010
3 answers
101 views
Hello,

Is it possible to show column footers for hierarchical data?

Thanks for advance,
Tatu
Vlad
Telerik team
 answered on 04 Mar 2010
9 answers
287 views
Whenever I change from a maximized tile with a scheduler in it to another tile, it freezes halfway through, the program becomes unresponsive and crashes.


  • Telerik WPF Trial: 2009.3.1314.35
  • Operating System: Windows 7 Ultimate 64-bit (6.1, Build 7600) (7600.win7_rtm.090713-1255)
  • Processor: Intel(R) Core(TM)2 Quad CPU    Q6700  @ 2.66GHz
  • Memory: 6144MB RAM
  • DirectX Version: DirectX 11
  • Card name: NVIDIA GeForce GTX 275

Example:
<Window 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
    xmlns:telerikAnimation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls" 
    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
    xmlns:telerikScheduler="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Scheduler" 
    x:Class="WpfApplication1.Window1" 
    Title="Test" 
    MinHeight="500" MinWidth="800" > 
    <telerikNavigation:RadTileView telerik:StyleManager.Theme="Windows7" MaximizeMode="One" FlowDirection="LeftToRight" MinimizedItemsPosition="Left"
        <telerikNavigation:RadTileViewItem telerik:StyleManager.Theme="Windows7"
            <telerikNavigation:RadTileViewItem.Header> 
                <StackPanel Orientation="Horizontal"
                    <TextBlock Text="Scheduler" Margin="5"/> 
                </StackPanel> 
            </telerikNavigation:RadTileViewItem.Header> 
            <telerik:RadFluidContentControl > 
                <telerik:RadFluidContentControl.SmallContent> 
                    <StackPanel> 
                        <TextBlock Margin="5,5,5,0"><Hyperlink><Run Text="Test"/></Hyperlink></TextBlock
                        <TextBlock Margin="5,5,5,0"><Hyperlink><Run Text="Test"/></Hyperlink></TextBlock
                        <TextBlock Margin="5"><Hyperlink><Run Text="Test"/></Hyperlink></TextBlock
                    </StackPanel> 
                </telerik:RadFluidContentControl.SmallContent> 
                <telerik:RadFluidContentControl.LargeContent> 
                    <Border> 
                        <telerikScheduler:RadScheduler telerik:StyleManager.Theme="Windows7"/> 
                    </Border> 
                </telerik:RadFluidContentControl.LargeContent> 
            </telerik:RadFluidContentControl> 
        </telerikNavigation:RadTileViewItem> 
        <telerikNavigation:RadTileViewItem telerik:StyleManager.Theme="Windows7" > 
            <telerikNavigation:RadTileViewItem.Header> 
                <StackPanel Orientation="Horizontal"
                    <TextBlock Text="Test" Margin="5"/> 
                </StackPanel> 
            </telerikNavigation:RadTileViewItem.Header> 
            <telerik:RadFluidContentControl telerikAnimation:AnimationManager.IsAnimationEnabled="True"
                <telerik:RadFluidContentControl.SmallContent> 
                    <StackPanel> 
                        <TextBlock Margin="5,5,5,0"><Hyperlink><Run Text="Test"/></Hyperlink></TextBlock
                        <TextBlock Margin="5"><Hyperlink><Run Text="Test"/></Hyperlink></TextBlock
                    </StackPanel> 
                </telerik:RadFluidContentControl.SmallContent> 
                <telerik:RadFluidContentControl.LargeContent> 
                    <Border x:Name="ContactsContentContainer" /> 
                </telerik:RadFluidContentControl.LargeContent> 
                <Border/> 
            </telerik:RadFluidContentControl> 
        </telerikNavigation:RadTileViewItem> 
        <telerikNavigation:RadTileViewItem telerik:StyleManager.Theme="Windows7"
            <telerikNavigation:RadTileViewItem.Header> 
                <StackPanel Orientation="Horizontal"
                    <TextBlock Text="Test" Margin="5"/> 
                </StackPanel> 
            </telerikNavigation:RadTileViewItem.Header> 
            <telerik:RadFluidContentControl telerikAnimation:AnimationManager.IsAnimationEnabled="True"
                <telerik:RadFluidContentControl.SmallContent> 
                    <StackPanel> 
                        <TextBlock Margin="5,5,5,0"><Hyperlink><Run Text="Test"/></Hyperlink></TextBlock
                        <TextBlock Margin="5"><Hyperlink><Run Text="Test"/></Hyperlink></TextBlock
                    </StackPanel> 
                </telerik:RadFluidContentControl.SmallContent> 
                <telerik:RadFluidContentControl.LargeContent> 
                    <Border /> 
                </telerik:RadFluidContentControl.LargeContent> 
                <Border/> 
            </telerik:RadFluidContentControl> 
        </telerikNavigation:RadTileViewItem> 
        <telerikNavigation:RadTileViewItem telerik:StyleManager.Theme="Windows7"
            <telerikNavigation:RadTileViewItem.Header> 
                <StackPanel Orientation="Horizontal"
                    <TextBlock Text="Test" Margin="5"/> 
                </StackPanel> 
            </telerikNavigation:RadTileViewItem.Header> 
            <telerik:RadFluidContentControl telerikAnimation:AnimationManager.IsAnimationEnabled="True"
                <telerik:RadFluidContentControl.SmallContent> 
                    <StackPanel> 
                        <TextBlock Margin="5"><Hyperlink><Run Text="Test"/></Hyperlink></TextBlock
                    </StackPanel> 
                </telerik:RadFluidContentControl.SmallContent> 
                <telerik:RadFluidContentControl.LargeContent> 
                    <Border /> 
                </telerik:RadFluidContentControl.LargeContent> 
                <Border/> 
            </telerik:RadFluidContentControl> 
        </telerikNavigation:RadTileViewItem> 
        <telerikNavigation:RadTileViewItem telerik:StyleManager.Theme="Windows7"
            <telerikNavigation:RadTileViewItem.Header> 
                <StackPanel Orientation="Horizontal"
                    <TextBlock Text="Test" Margin="5"/> 
                </StackPanel> 
            </telerikNavigation:RadTileViewItem.Header> 
            <telerik:RadFluidContentControl telerikAnimation:AnimationManager.IsAnimationEnabled="True"
                <telerik:RadFluidContentControl.SmallContent> 
                    <StackPanel> 
                        <TextBlock Margin="5"><Hyperlink><Run Text="Test"/></Hyperlink></TextBlock
                    </StackPanel> 
                </telerik:RadFluidContentControl.SmallContent> 
                <telerik:RadFluidContentControl.LargeContent> 
                    <Border /> 
                </telerik:RadFluidContentControl.LargeContent> 
                <Border/> 
            </telerik:RadFluidContentControl> 
        </telerikNavigation:RadTileViewItem> 
        <telerikNavigation:RadTileViewItem telerik:StyleManager.Theme="Windows7"
            <telerikNavigation:RadTileViewItem.Header> 
                <StackPanel Orientation="Horizontal"
                    <TextBlock Text="Test" Margin="5"/> 
                </StackPanel> 
            </telerikNavigation:RadTileViewItem.Header> 
            <telerik:RadFluidContentControl telerikAnimation:AnimationManager.IsAnimationEnabled="True"
                <telerik:RadFluidContentControl.SmallContent> 
                    <StackPanel> 
                        <TextBlock Margin="5,5,5,0"><Hyperlink><Run Text="Test"/></Hyperlink></TextBlock
                        <TextBlock Margin="5"><Hyperlink><Run Text="Test"/></Hyperlink></TextBlock
                    </StackPanel> 
                </telerik:RadFluidContentControl.SmallContent> 
                <telerik:RadFluidContentControl.LargeContent> 
                    <StackPanel/> 
                </telerik:RadFluidContentControl.LargeContent> 
            </telerik:RadFluidContentControl> 
        </telerikNavigation:RadTileViewItem> 
    </telerikNavigation:RadTileView> 
</Window> 
 

Tihomir Petkov
Telerik team
 answered on 03 Mar 2010
5 answers
82 views

 

 

Hi,

we are using telerik checkboxeditor in our project.
we are  adding  some text to checkboxeditor.
The background color of Checkboxeditor we are getting is orange.
When we change the back ground color of check box . Only the border of checkbox is getting changed.
 I want to change the back ground of text as well which is given to check box.....
Please reply me with a solution to solve this problem

Hristo
Telerik team
 answered on 03 Mar 2010
1 answer
127 views
What does the error mean, my grid is working fine. and when i click multiple clicks in a cell it throws error in IValue converter, Convertback function
here

 

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

 

{

 

 

throw new NotImplementedException();

 

}

how to resolve this.

 



System.NotImplementedException was unhandled
  Message="The method or operation is not implemented."
  Source="Grid Issue"
  StackTrace:
       at Grid_Issue.ConvertReportType.ConvertBack(Object value, Type targetType, Object parameter, CultureInfo culture) in D:\Grid Issue\Grid Issue\ConvertReportType.cs:line 109
       at System.Windows.Data.BindingExpression.ConvertProposedValue(Object value)
       at System.Windows.Data.BindingExpressionBase.UpdateValue()
       at Telerik.Windows.Controls.GridViewBoundColumnBase.UpdateBindingBaseSource(BindingExpression bindingBase, DependencyObject source) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewBoundColumnBase.cs:line 844
       at Telerik.Windows.Controls.GridViewBoundColumnBase.UpdateSourceWithEditorValue(GridViewCell gridViewCell) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewBoundColumnBase.cs:line 792
       at Telerik.Windows.Controls.GridView.GridViewCell.UpdateSourceWithEditorValue() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1223
       at Telerik.Windows.Controls.GridView.EditContext.ValidateCell(GridViewCell cell) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Editing\EditContext.cs:line 227
       at Telerik.Windows.Controls.GridView.EditContext.PerformCellValidation(GridViewCell cell) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Editing\EditContext.cs:line 211
       at Telerik.Windows.Controls.GridView.EditContext.CommitCellEdit(GridViewCell currentCell, Boolean isLeavingRow) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Editing\EditContext.cs:line 73
       at Telerik.Windows.Controls.GridView.EditContext.CanCellBecomeCurrent(GridViewCell cell) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Editing\EditContext.cs:line 333
       at Telerik.Windows.Controls.GridView.GridViewCell.CanCellBecomeCurrent() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 119
       at Telerik.Windows.Controls.GridView.GridViewCell.OnCoerceIsCurrent(DependencyObject target, Object baseValue) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 109
       at System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp, PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex, EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue, Object baseValue, CoerceValueCallback coerceValueCallback, Boolean coerceWithDeferredReference, Boolean skipBaseValueChecks)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Telerik.Windows.Controls.GridView.GridViewCell.set_IsCurrent(Boolean value) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 310
       at Telerik.Windows.Controls.GridView.EditContext.OnCellMouseDown(GridViewCell cell) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Editing\EditContext.cs:line 327
       at Telerik.Windows.Controls.GridView.GridViewCell.OnMouseLeftButtonDown(MouseButtonEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 429
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunInternal(Window window)
       at Grid_Issue.App.Main() in D:\Grid Issue\Grid Issue\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:
Milan
Telerik team
 answered on 03 Mar 2010
0 answers
148 views
Hi.. I have the following code.. but the LostFocus never fires. Any ideas ?  thanks

Does not fire on the Weight or Units DataColumns....   


 

 

<telerikPresentation:RadGridView AutoGenerateColumns="False" DataLoadMode="Asynchronous" CanUserInsertRows="True" FrozenColumnCount="1" Height="157" IsFilteringAllowed="False" IsReadOnly="False" Margin="6.5,6,104,6" Name="gridInv_det" ScrollMode="Deferred" telerikPresentation:StyleManager.Theme="Summer" Width="856" ShowGroupPanel="False" Grid.ColumnSpan="2">

 

 

 

<telerikPresentation:RadGridView.Effect>

 

 

 

<DropShadowEffect BlurRadius="0" ShadowDepth="2" />

 

 

 

</telerikPresentation:RadGridView.Effect>

 

 

 

<telerikPresentation:RadGridView.Columns>

 

 

 

<telerikPresentation:GridViewComboBoxColumn DisplayMemberPath="comm_name" SelectedValueMemberPath="comm_name" DataMemberBinding="{Binding comm_name, Mode=TwoWay}" Header="Commodity" Width="235" />

 

 

 

<telerikPresentation:GridViewDataColumn x:Name="weight" LostFocus="weight_LostFocus" DataMemberBinding="{Binding weight, Mode=TwoWay}" Header="Weight" Width="95" />

 

 

 

<telerikPresentation:GridViewDataColumn x:Name="units" LostFocus="units_LostFocus_1" DataMemberBinding="{Binding bale_cnt, Mode=TwoWay}" Header="Units" Width="95" />

 

 

 

<telerikPresentation:GridViewDataColumn DataMemberBinding="{Binding sale_pt, Mode=TwoWay}" Header="Sale P/T" Width="95" DataFormatString="{}{0:C}"/>

 

 

 

<telerikPresentation:GridViewDataColumn DataMemberBinding="{Binding purc_pt, Mode=TwoWay}" Header="Pur. P/T" Width="95" DataFormatString="{}{0:C}" />

 

 

 

<telerikPresentation:GridViewDataColumn DataMemberBinding="{Binding sale, Mode=TwoWay}" Background="Yellow" IsReadOnly="True" Header="Sale Tot." DataFormatString="{}{0:C}" Width="95" />

 

 

 

<telerikPresentation:GridViewDataColumn DataMemberBinding="{Binding cost, Mode=TwoWay}" Background="Yellow" IsReadOnly="True" Header="Pur. Tot." DataFormatString="{}{0:C}" Width="95" />

 

 

 

</telerikPresentation:RadGridView.Columns>

 

 

 

</telerikPresentation:RadGridView>

 

Jon
Top achievements
Rank 1
 asked on 03 Mar 2010
2 answers
128 views
hi!!!


i need to display  images in a column of the datagrid in code behind.
the images are store in the dataset in byte() format

have i to deserialize the image or what can i do???


Oscar Zapata
Top achievements
Rank 1
 answered on 02 Mar 2010
1 answer
91 views
Hi,

I have a simple application that show grid to the user and according to the user selection i refresh the grid.

when i refresh the grid i do the following:
1) create a new list with the new items
2) grid.ItemsSource = newlist;

if the new list has more than 1000 objects the refresh takes several seconds.

How can i improve the refresh time of the grid ?

I also tried to work with ObservableCollection and update it instead of binding a new list, but it still took several seconds.

Thanks you,
Ofer
Vlad
Telerik team
 answered on 02 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?