Telerik Forums
UI for WPF Forum
1 answer
63 views
Hi

I want to know, How can capture the Event and the ColumnHeader Name while clicking on ColumnHeader.  I am trying to achieving multicolumn sorting through programming in which server interaction also their.
Shinu
Top achievements
Rank 2
 answered on 28 Jan 2011
1 answer
423 views
I'm trying to apply a style to an image inside a DataTemplate, but it doesn't seem to work. It works fine if the style is applied to an image outside the RadGridView.

Here's the xaml for the RadGridView, and I'm refering to Style="{StaticResource ico16}" in the code below:

<telerik:RadGridView Grid.Column="1"
                     Grid.Row="1"
                     AutoGenerateColumns="False"
                     DataContext="{Binding Grid}"
                     ItemsSource="{Binding XPath=/Collection}"
                     RowIndicatorVisibility="Collapsed"
                     ShowGroupPanel="False"
                     GridLinesVisibility="Horizontal"
                     telerik:StyleManager.Theme="Windows7">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Width="*">
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Top" >
                        <Image Source="{Binding XPath=@Icon}" ToolTip="{Binding XPath=@Tooltip}" Style="{StaticResource ico16}" />
                        <TextBlock Text="{Binding XPath=@Key}" Foreground="Black" />
                    </StackPanel>
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

On the same VIEW where the code above resides, there's a link to a resource dictionary where the style is defined:

<UserControl.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/MyAssemblyNameHere;component/Resources/MyResourceDictionary.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</UserControl.Resources>

The style is defined on a ResourceDictionary as follows:

                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  
    <Style x:Key="ico16" TargetType="Image">
        <Setter Property="Margin" Value="0 0 5 0" />
        <Setter Property="Width" Value="16"/>
        <Setter Property="Height" Value="16"/>
        <Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality"/>
        <Setter Property="Stretch" Value="UniformToFill"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
    </Style>
  
</ResourceDictionary>

Any help is greatly appreciated.
YYZRichard
Top achievements
Rank 2
 answered on 28 Jan 2011
4 answers
322 views
I have two columns in my grid that are calculated using other columns.  Because I need the totals for my database update, I decided to do the calculations in my view model and set the property as changed when these values are updated.  This works perfectly in edit mode.  If I modify my price, the new value gets updated and displays in the grid correctly.  However, I am getting different results for a new record.  If I leave the value column as read only, the display never gets updated even though the value field in my view model is correctly updated.  If I take off the read only setting on the value column, the display does update but only if I give that column focus.  I don't have to do this in Edit mode so I am not sure how to fix this for insert mode.

thanks!
Koren
Top achievements
Rank 1
 answered on 27 Jan 2011
3 answers
173 views
Hi,
I am using the carousel control to implement a media center like menu for my application. The main menu items should scroll vertically with the current item in the centre and the sub items should then appear below it and be chooseable. The priority is on easy keyboard navigation.

The problems I am facing are:

1) Styling the carousel seems to be incredibly difficult. Just having the main menu item description with a list of sub items is even difficult to do. Adding additional elements to the data template seems to stop the sub items from rendering.

2) Keyboard navigation does not work correctly. I'd like the main menu to scroll on Up / Down and the sub menu to scroll on Left / Right. Unfortunately, only the currently focused carousel panel will scroll and it then scrolls on all arrow key presses.

The control seems to have such a steep learning curve that I'm tempted to ditch it and write my own custom control - albeit without some of the nice scrolling effects that your control brings.

I've attached my attempt below, it is based on a sample I saw on this site. Any help would be appreciated.

    <UserControl.Resources>
        <Path
          x:Key="horizontalPath"
          Stretch="None"
          Opacity="1"
          Data="M0,0 C0,0 0,800 0,800"
          Stroke="#FFB4B4B4"
          StrokeThickness="4">
        </Path>
        <DataTemplate DataType="{x:Type local:Message}">
                <telerik:CarouselScrollViewer CanContentScroll="True" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
<!-- putting in a header here stops the child panel from rendering correctly -->
                    <telerik:RadCarouselPanel Loaded="RadCarouselPanel_Loaded" CanVerticallyScroll="False" TopContainerChanged="RadCarouselPanel_TopContainerChanged_1">
                        <Button Content="menu1"/>
                        <Button Content="menu2"/>
                        <Button Content="menu3"/>
                        <Button Content="menu4"/>
                        <Button Content="menu5"/>
                        <Button Content="menu6"/>
                    </telerik:RadCarouselPanel>
            </telerik:CarouselScrollViewer>
        </DataTemplate>
        <Style TargetType="{x:Type telerik:CarouselItem}">
            <Setter Property="MaxHeight" Value="1000"/>
            <Setter Property="MaxWidth" Value="1000"/>
            <Setter Property="Height" Value="200"/>
            <Setter Property="Width" Value="400"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:CarouselItem">
                        <Border x:Name="mainBorder">
                            <Border Opacity="1" BorderBrush="#3F000000" BorderThickness="1,1,1,1" CornerRadius="5,5,5,5" Margin="10,10,10,10" x:Name="CarouselItemInnerBorder" SnapsToDevicePixels="True">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="101,462" StartPoint="101,13" MappingMode="Absolute">
                                        <GradientStop Color="#FF2C3A68" Offset="0"/>
                                        <GradientStop Color="#FF000000" Offset="1"/>
                                        <GradientStop Color="#FF0F224C" Offset="0.045"/>
                                        <GradientStop Color="#FF000000" Offset="0.0451"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                                <ContentPresenter IsHitTestVisible="True" />
                            </Border>
                        </Border>
                        <ControlTemplate.Triggers>
<!-- IsSelected does not appear to fire -->
                            <Trigger Property="IsSelected" Value="True" >
                                <Setter TargetName="CarouselItemInnerBorder" Property="Background">
                                    <Setter.Value>
                                        <LinearGradientBrush EndPoint="108,472" StartPoint="108,23" MappingMode="Absolute">
                                            <GradientStop Color="#FF344B97" Offset="0"/>
                                            <GradientStop Color="#FF000000" Offset="1"/>
                                            <GradientStop Color="#FF233F7E" Offset="0.045"/>
                                            <GradientStop Color="#FF000000" Offset="0.0451"/>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
        <telerik:RadCarousel x:Name="radCarousel" AutoGenerateDataPresenters="False" Loaded="radCarousel_Loaded" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
            <telerik:RadCarousel.ItemsPanel>               
                <ItemsPanelTemplate>
                    <telerik:RadCarouselPanel x:Name="radCarouselPanel" IsScalingEnabled="True" IsOpacityEnabled="False" CanHorizontallyScroll="False" TopContainerChanged="RadCarouselPanel_TopContainerChanged" >                       
                    </telerik:RadCarouselPanel>
                </ItemsPanelTemplate>
            </telerik:RadCarousel.ItemsPanel>
        </telerik:RadCarousel>
    </Grid>
</UserControl>
Milan
Telerik team
 answered on 27 Jan 2011
2 answers
286 views
Is it possible to have the predefined prompt window default focus to the input textbox? If so could you please give an example I have tryed looking into the Opened event and finding a property or looking at the UIElements without success finding the particular control that captures input.
Patrick VADEL
Top achievements
Rank 1
 answered on 27 Jan 2011
2 answers
467 views
Hello,
I am trying to recreate the performance "Live Data" example that is provided in the demos application. I am working with VS2010 .net 4.0 in VB.

My problem is in compiling the application i get the following error.

Error 1 Unknown build error, 'Cannot resolve dependency to assembly 'Telerik.Windows.Data, Version=2010.3.1314.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Line 16 Position 50.'  C:\Users\Paul Wheeler\documents\visual studio 2010\Projects\Telerik Chart Live Data\Telerik Chart Live Data\Example.xaml 16 50 Telerik Chart Live Data.

is there a simple VB example that is available.
I looked at the VB example that came with the download but it is in C#.

Thanks

Paul
Top achievements
Rank 1
 answered on 27 Jan 2011
5 answers
121 views
I have a gridview in my application and I get the following error

System.InvalidOperationException was unhandled
Message: Root AdornerLayer Not Found. Please make sure that your root visual is Window or other element that has an adorner layer. Alternatively, wrap your root panel in an <AdornerDecorator> element.

The structure of the application is as follows

UserControl
-DockPanle
--Grid
---GridView

The user control is loaded in
RadRibbonWindow
-DockPanl
--The Usercontrol

Do I need to changes something in the structure to be able to do the drag and drop?
Tsvyatko
Telerik team
 answered on 27 Jan 2011
4 answers
161 views
Hi there,

is there any way to select a whole column by clicking the column-header?
I can not find any option to do that.

Greetings
Andi
Top achievements
Rank 2
 answered on 27 Jan 2011
1 answer
47 views
Hi

I am having an Error message : "GridViewDataControl_ColumnDisplayIndexOutOfRange Sales Use
Parameter name: displayIndex"
foreach (ColumnSetting setting in Settings.ColumnSettings)
                    {
                        GridViewDataColumn column = new GridViewDataColumn();
                        column.UniqueName = setting.UniqueName;
                        column.Header = setting.Header;
                        column.DisplayIndex = setting.DisplayIndex;
                        if (setting.Width != null)
                        {
                            column.Width = new GridViewLength(setting.Width.Value);
                              
                        }
  
                        grid.Columns.Add(column);
                    }


Maya
Telerik team
 answered on 27 Jan 2011
2 answers
146 views
Hi,

Does anyone know how to create multiple instances of radwindow? I need to create an MDI window (but not a docking).

thanks
George
Telerik team
 answered on 27 Jan 2011
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?