Telerik Forums
UI for WPF Forum
1 answer
108 views
Hello,

My problem is when I undock a RadPane and then I lose my transparent background of the PaneGroup and instead get a white(defualt) background of the floating container that I also want to be transparent.
I wanted to know if there is an event that is fired when a RadPane is being undocked (and the other way around). If there is I could find the floating container and set in code its backgorund to transparent.

Thank you
Konstantina
Telerik team
 answered on 20 Dec 2010
1 answer
76 views
Hi everybody,

I am using the RadTileView with the RadFluidContentControl. When I have many items in Restored mode, the TileViewItem shrinks itself hiding the content even if I put a fixed Height and Width and I cannot setup the scroll bars in this mode. Is this an issue? How can I do to enable the scroolbars and setup the minimum size for the TileViewItem in Restored mode?
Thanks in advance!

Christian

BTW: I am using the trial version of WPF RadControls Q3.
Zarko
Telerik team
 answered on 20 Dec 2010
1 answer
84 views

I create my chart by inserting data points like so:

1.Chart.DefaultView.ChartArea.DataSeries.Clear();
2.var series = new DataSeries { Definition = new SplineAreaSeriesDefinition() };
3.foreach (var point in dataPoints) series.Add(point);
4.Chart.DefaultView.ChartArea.DataSeries.Add(series);

The points themselves are created thusly. I explicitly specify types for your convenience.

1.var dataPoints = /*[...]*/.Select( (x, y) => new DataPoint((int)x, (double)y).ToArray()

When I call the add method, I obtain the graph (supplied) "mychartnormal.png". I'm happy with this graph.

When I do the following manipulation of the graph, I obtain a new figure (supplied) "mychartweird.png". The number formatting of the highlighted values shows unnecessary precision. 

1.var series = OverviewChart.DefaultView.ChartArea.DataSeries.FirstOrDefault();
2.if (ColorPicker.SelectedItem != null && series != null)
3.    series.Definition.Appearance.Fill = new SolidColorBrush((Color) ColorPicker.SelectedItem);
4.OverviewChart.DefaultView.ChartArea.DataSeries.Clear();
5.OverviewChart.DefaultView.ChartArea.DataSeries.Add(series);

You may wonder at this point why I am not manipulating the Definition.Appearance.Fill property of the series that I pick out on line one directly. Well, the reason being is that I want to the drawing animation to restart, and I didn't find another way in the API do that. As such I am open to two possible solutions.

Firstly there's the obvious rewrite that solves the problem, but I find it in bad taste to have to recreate the series, since I may need to modify other properties separately, and the copying on line 3 can easily become unwieldy.

1.var series = OverviewChart.DefaultView.ChartArea.DataSeries.FirstOrDefault();
2.if (ColorPicker.SelectedItem == null || series == null) return;
3.var nseries = new DataSeries() {Definition = series.Definition};
4.nseries.AddRange( series.Select(datapoint => new DataPoint(datapoint.XValue, datapoint.YValue)));
5.nseries.Definition.Appearance.Fill = new SolidColorBrush((Color) ColorPicker.SelectedItem);
6.OverviewChart.DefaultView.ChartArea.DataSeries.Clear();
7.OverviewChart.DefaultView.ChartArea.DataSeries.Add(nseries);

Secondly all I really need is to restart the animation. I only found one relevant post, which said to use Chart.ResetTheme(), which didn't work for me.

Evgeni "Zammy" Petrov
Telerik team
 answered on 20 Dec 2010
1 answer
199 views
Hey Telerik!

I have been playing around with optimizing my xaml code for my controls and have ran into a question about performance.

Are both of these ways considered the same?  If the bottom is faster, how do I get my row height=60 in the Template to show below the list instead of below the first added item.

<Style x:Key="ccTemplate" TargetType="{x:Type ContentControl}">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type ContentControl}" >
                <Grid x:Name="listBoxGrid" TextOptions.TextFormattingMode="Display">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="200*"/>
                        <RowDefinition Height="60" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid Grid.ColumnSpan="6" >
                        <ContentPresenter />
                    </Grid>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
 
<Style x:Key="{x:Type control:ListBoxControl}" TargetType="{x:Type control:ListBoxControl}">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate>
                <ContentControl Style="{StaticResource ccTemplate}" x:Name="cc">
                    <telerikNavigation:RadTreeView
                            Name="mainList"
                            ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ItemsSource}"
                            ItemTemplate="{DynamicResource MainDataTemplate}"
                            ItemContainerStyle="{DynamicResource MainStyle}"
                            MinWidth="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MinWidth}"
                            ScrollViewer.HorizontalScrollBarVisibility="Auto"
                            BorderBrush="#FF00569F"
                            Background="{DynamicResource ListItemBackground}"
                            BorderThickness="1"
                            SelectionMode="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectionMode, FallbackValue=Single}"
                            IsDragDropEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsDragDropEnabled, FallbackValue=False}"
                            IsDropPreviewLineEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsDropPreviewLineEnabled, FallbackValue=True}"
                            AllowDrop="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=AllowDrop, FallbackValue=True}"
                            >
                    </telerikNavigation:RadTreeView>
                </ContentControl>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

Vs.

<Style x:Key="{x:Type control:ListBoxControl}" TargetType="{x:Type control:ListBoxControl}">
       <Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ItemsSource}" />
       <Setter Property="ItemTemplate" Value="{DynamicResource MainDataTemplate}"/>
       <Setter Property="ItemContainerStyle" Value="{DynamicResource MainStyle}"/>
       <Setter Property="BorderBrush" Value="#FF00569F"/>
       <Setter Property="Background" Value="{DynamicResource ListItemBackground}"/>
       <Setter Property="IsLineEnabled" Value="True"/>
       <Setter Property="IsRootLinesEnabled" Value="False"/>
       <Setter Property="BorderThickness" Value="1"/>
       <Setter Property="IsExpandOnSingleClickEnabled" Value="True" />
       <Setter Property="Validation.ErrorTemplate" Value="{DynamicResource ValidationTemplate}" />
       <Setter Property="SelectionMode" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectionMode, FallbackValue=Single}" />
       <Setter Property="IsDragDropEnabled" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsDragDropEnabled, FallbackValue=False}" />
       <Setter Property="IsDropPreviewLineEnabled" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsDropPreviewLineEnabled, FallbackValue=True}" />
       <Setter Property="AllowDrop" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=AllowDrop, FallbackValue=True}" />
   </Style>

And adding the grid to the RadTreeTemplate

 <ControlTemplate x:Key="RadTreeViewMainItemControlTemplate" TargetType="{x:Type telerikNavigation:RadTreeViewItem}">
        <Grid x:Name="listBoxGrid" TextOptions.TextFormattingMode="Display">
            <Grid.RowDefinitions>
                <RowDefinition Height="200*"/>
                <RowDefinition Height="60" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80" />
                <ColumnDefinition Width="80" />
                <ColumnDefinition Width="80" />
                <ColumnDefinition Width="80" />
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid Grid.ColumnSpan="6" >
                <Grid x:Name="RootElement" MinWidth="300" Cursor="Hand">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid x:Name="HeaderRow" MinHeight="{TemplateBinding MinHeight}" SnapsToDevicePixels="True" Background="Transparent">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Border Grid.ColumnSpan="6" Background="{TemplateBinding Background}" BorderBrush="Transparent" BorderThickness="0" />
                        <Border x:Name="MouseOverVisual" Opacity="0"  Grid.ColumnSpan="6" Background="{DynamicResource ListItemMouseOver}" BorderBrush="{DynamicResource ListItemMouseOverBorder}" BorderThickness="0" />

                        <Border x:Name="SelectionUnfocusedVisual" Visibility="Collapsed" Grid.ColumnSpan="6" BorderBrush="Transparent" Background="{DynamicResource ListItemUnSelect}" BorderThickness="0" />

                        <Border x:Name="SelectionVisual" Visibility="Collapsed" Grid.ColumnSpan="6" BorderBrush="{DynamicResource ListItemSelectBorder}" Background="{DynamicResource ListItemSelect}" BorderThickness="0" />

                        <StackPanel x:Name="IndentContainer" Orientation="Horizontal">
                            <Rectangle x:Name="IndentFirstVerticalLine" />
                        </StackPanel>
                        <Grid x:Name="ListRootContainer" HorizontalAlignment="Center" MinWidth="20" Grid.Column="1">
                            <ToggleButton Name="MainToggle" Style="{DynamicResource ExpanderStyle}" IsTabStop="False" IsChecked="{TemplateBinding IsExpanded}"/>
                            <Grid x:Name="LoadingVisual" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Visibility="Collapsed">
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
                                    </TransformGroup>
                                </Grid.RenderTransform>
                                <Path Stretch="Fill" Stroke="{TemplateBinding Foreground}" StrokeStartLineCap="Round" StrokeThickness="1" Width="10" Height="10" Data="M1,0A1,1,90,1,1,0,-1"/>
                                <Path Fill="{TemplateBinding Foreground}" Stretch="Fill" StrokeThickness="1" HorizontalAlignment="Left" Margin="5,-1.5,0,0" VerticalAlignment="Top" Width="4" Height="4" Data="M0,-1.1L0.1,-1 0,-0.9"/>
                            </Grid>
                        </Grid>
                        <CheckBox x:Name="CheckBoxElement" Margin="5,0,0,0" VerticalAlignment="Center" IsTabStop="False" Visibility="Collapsed" Grid.Column="2">
                        </CheckBox>
                        <RadioButton x:Name="RadioButtonElement" Margin="5,0,0,0" VerticalAlignment="Center" IsTabStop="False" Visibility="Collapsed" Grid.Column="2">
                        </RadioButton>
                        <Image x:Name="Image" HorizontalAlignment="Center" Margin="2" MaxHeight="16" MaxWidth="16" VerticalAlignment="Center" Grid.Column="3" Source="{TemplateBinding DefaultImageSrc}"/>
                        <Rectangle x:Name="FocusVisual"/>
                        <Grid Grid.Column="4" Grid.ColumnSpan="2">
                            <ContentPresenter x:Name="Header"
                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                      Margin="{TemplateBinding Padding}"
                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                      ContentSource="Header"/>
                            <ContentPresenter x:Name="EditHeaderElement" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed" ContentTemplate="{TemplateBinding HeaderEditTemplate}"/>
                        </Grid>
                    </Grid>
                    <Border BorderThickness="0 0 0 2" BorderBrush="{DynamicResource BottomListItem}" />
                    <ItemsPresenter x:Name="ItemsHost" Visibility="Collapsed" Grid.Row="1" DataContext="{Binding}" />
                    <Border BorderThickness="0 0 0 2" BorderBrush="{DynamicResource BottomListItem}" />

                </Grid>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsInEditMode" Value="True">
                <Setter Property="Visibility" TargetName="Header" Value="Collapsed"/>
                <Setter Property="Visibility" TargetName="EditHeaderElement" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="Visibility" TargetName="SelectionVisual" Value="Visible"/>
                <Setter Property="BorderThickness" Value="1" />
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
                <Setter Property="Visibility" TargetName="FocusVisual" Value="Visible"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsSelected" Value="True"/>
                    <Condition Property="IsSelectionActive" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter Property="Opacity" TargetName="SelectionVisual" Value="1"/>
                <Setter Property="Visibility" TargetName="SelectionUnfocusedVisual" Value="Visible"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Opacity" TargetName="Header" Value="0.5"/>
            </Trigger>
            <Trigger Property="IsExpanded" Value="True">
                <Setter Property="Visibility" TargetName="ItemsHost" Value="Visible"/>
            </Trigger>
            <Trigger Property="HasItems" Value="False">
                <Setter Property="Visibility" TargetName="MainToggle" Value="Collapsed" />
            </Trigger>
            <Trigger Property="IsLoadingOnDemand" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Duration="00:00:01" RepeatBehavior="Forever" Storyboard.TargetName="LoadingVisualAngleTransform" Storyboard.TargetProperty="Angle" From="0" To="359"/>
                        </Storyboard>
                    </BeginStoryboard>
                </Trigger.EnterActions>
                <Setter Property="Visibility" TargetName="LoadingVisual" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsDragOver" Value="True">
                <Setter Property="Opacity" TargetName="MouseOverVisual" Value="1"/>
            </Trigger>
            <Trigger Property="IsMouseOver" SourceName="HeaderRow" Value="True">
                <Setter Property="Opacity" TargetName="MouseOverVisual" Value="1"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
<ControlTemplate x:Key="RadTreeViewMainItemControlTemplate" TargetType="{x:Type telerikNavigation:RadTreeViewItem}">
       <Grid x:Name="listBoxGrid" TextOptions.TextFormattingMode="Display">
           <Grid.RowDefinitions>
               <RowDefinition Height="200*"/>
               <RowDefinition Height="60" />
           </Grid.RowDefinitions>
           <Grid.ColumnDefinitions>
               <ColumnDefinition Width="80" />
               <ColumnDefinition Width="80" />
               <ColumnDefinition Width="80" />
               <ColumnDefinition Width="80" />
               <ColumnDefinition/>
           </Grid.ColumnDefinitions>
           <Grid Grid.ColumnSpan="6" >
               <Grid x:Name="RootElement" MinWidth="300" Cursor="Hand">
                   <Grid.RowDefinitions>
                       <RowDefinition Height="Auto"/>
                       <RowDefinition/>
                   </Grid.RowDefinitions>
                   <Grid x:Name="HeaderRow" MinHeight="{TemplateBinding MinHeight}" SnapsToDevicePixels="True" Background="Transparent">
                       <Grid.ColumnDefinitions>
                           <ColumnDefinition Width="Auto"/>
                           <ColumnDefinition Width="Auto"/>
                           <ColumnDefinition Width="Auto"/>
                           <ColumnDefinition Width="Auto"/>
                           <ColumnDefinition Width="Auto"/>
                           <ColumnDefinition Width="*"/>
                       </Grid.ColumnDefinitions>
                       <Border Grid.ColumnSpan="6" Background="{TemplateBinding Background}" BorderBrush="Transparent" BorderThickness="0" />
                       <Border x:Name="MouseOverVisual" Opacity="0"  Grid.ColumnSpan="6" Background="{DynamicResource ListItemMouseOver}" BorderBrush="{DynamicResource ListItemMouseOverBorder}" BorderThickness="0" />
 
                       <Border x:Name="SelectionUnfocusedVisual" Visibility="Collapsed" Grid.ColumnSpan="6" BorderBrush="Transparent" Background="{DynamicResource ListItemUnSelect}" BorderThickness="0" />
 
                       <Border x:Name="SelectionVisual" Visibility="Collapsed" Grid.ColumnSpan="6" BorderBrush="{DynamicResource ListItemSelectBorder}" Background="{DynamicResource ListItemSelect}" BorderThickness="0" />
 
                       <StackPanel x:Name="IndentContainer" Orientation="Horizontal">
                           <Rectangle x:Name="IndentFirstVerticalLine" />
                       </StackPanel>
                       <Grid x:Name="ListRootContainer" HorizontalAlignment="Center" MinWidth="20" Grid.Column="1">
                           <ToggleButton Name="MainToggle" Style="{DynamicResource ExpanderStyle}" IsTabStop="False" IsChecked="{TemplateBinding IsExpanded}"/>
                           <Grid x:Name="LoadingVisual" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Visibility="Collapsed">
                               <Grid.RenderTransform>
                                   <TransformGroup>
                                       <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
                                   </TransformGroup>
                               </Grid.RenderTransform>
                               <Path Stretch="Fill" Stroke="{TemplateBinding Foreground}" StrokeStartLineCap="Round" StrokeThickness="1" Width="10" Height="10" Data="M1,0A1,1,90,1,1,0,-1"/>
                               <Path Fill="{TemplateBinding Foreground}" Stretch="Fill" StrokeThickness="1" HorizontalAlignment="Left" Margin="5,-1.5,0,0" VerticalAlignment="Top" Width="4" Height="4" Data="M0,-1.1L0.1,-1 0,-0.9"/>
                           </Grid>
                       </Grid>
                       <CheckBox x:Name="CheckBoxElement" Margin="5,0,0,0" VerticalAlignment="Center" IsTabStop="False" Visibility="Collapsed" Grid.Column="2">
                       </CheckBox>
                       <RadioButton x:Name="RadioButtonElement" Margin="5,0,0,0" VerticalAlignment="Center" IsTabStop="False" Visibility="Collapsed" Grid.Column="2">
                       </RadioButton>
                       <Image x:Name="Image" HorizontalAlignment="Center" Margin="2" MaxHeight="16" MaxWidth="16" VerticalAlignment="Center" Grid.Column="3" Source="{TemplateBinding DefaultImageSrc}"/>
                       <Rectangle x:Name="FocusVisual"/>
                       <Grid Grid.Column="4" Grid.ColumnSpan="2">
                           <ContentPresenter x:Name="Header"
                                     HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                     Margin="{TemplateBinding Padding}"
                                     VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                     ContentSource="Header"/>
                           <ContentPresenter x:Name="EditHeaderElement" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed" ContentTemplate="{TemplateBinding HeaderEditTemplate}"/>
                       </Grid>
                   </Grid>
                   <Border BorderThickness="0 0 0 2" BorderBrush="{DynamicResource BottomListItem}" />
                   <ItemsPresenter x:Name="ItemsHost" Visibility="Collapsed" Grid.Row="1" DataContext="{Binding}" />
                   <Border BorderThickness="0 0 0 2" BorderBrush="{DynamicResource BottomListItem}" />
 
               </Grid>
           </Grid>
       </Grid>
       <ControlTemplate.Triggers>
           <Trigger Property="IsInEditMode" Value="True">
               <Setter Property="Visibility" TargetName="Header" Value="Collapsed"/>
               <Setter Property="Visibility" TargetName="EditHeaderElement" Value="Visible"/>
           </Trigger>
           <Trigger Property="IsSelected" Value="True">
               <Setter Property="Visibility" TargetName="SelectionVisual" Value="Visible"/>
               <Setter Property="BorderThickness" Value="1" />
           </Trigger>
           <Trigger Property="IsFocused" Value="True">
               <Setter Property="Visibility" TargetName="FocusVisual" Value="Visible"/>
           </Trigger>
           <MultiTrigger>
               <MultiTrigger.Conditions>
                   <Condition Property="IsSelected" Value="True"/>
                   <Condition Property="IsSelectionActive" Value="False"/>
               </MultiTrigger.Conditions>
               <Setter Property="Opacity" TargetName="SelectionVisual" Value="1"/>
               <Setter Property="Visibility" TargetName="SelectionUnfocusedVisual" Value="Visible"/>
           </MultiTrigger>
           <Trigger Property="IsEnabled" Value="False">
               <Setter Property="Opacity" TargetName="Header" Value="0.5"/>
           </Trigger>
           <Trigger Property="IsExpanded" Value="True">
               <Setter Property="Visibility" TargetName="ItemsHost" Value="Visible"/>
           </Trigger>
           <Trigger Property="HasItems" Value="False">
               <Setter Property="Visibility" TargetName="MainToggle" Value="Collapsed" />
           </Trigger>
           <Trigger Property="IsLoadingOnDemand" Value="True">
               <Trigger.EnterActions>
                   <BeginStoryboard>
                       <Storyboard>
                           <DoubleAnimation Duration="00:00:01" RepeatBehavior="Forever" Storyboard.TargetName="LoadingVisualAngleTransform" Storyboard.TargetProperty="Angle" From="0" To="359"/>
                       </Storyboard>
                   </BeginStoryboard>
               </Trigger.EnterActions>
               <Setter Property="Visibility" TargetName="LoadingVisual" Value="Visible"/>
           </Trigger>
           <Trigger Property="IsDragOver" Value="True">
               <Setter Property="Opacity" TargetName="MouseOverVisual" Value="1"/>
           </Trigger>
           <Trigger Property="IsMouseOver" SourceName="HeaderRow" Value="True">
               <Setter Property="Opacity" TargetName="MouseOverVisual" Value="1"/>
           </Trigger>
       </ControlTemplate.Triggers>
   </ControlTemplate>


Petar Mladenov
Telerik team
 answered on 20 Dec 2010
2 answers
48 views
I'm changing the default behaviour of the RadGridView so that pressing delete does not delete the row but instead clears the selected cells content (excel style behaviour), i've also remapped delete to shift+delete. Everything is working fine, except for the fact that i can't seem to be able to clear the current cell programmatically. Here is the code in my custom command (simple 1.st ver):

        private void ClearCurrentCell(object obj)
        {
            if (_grid.CurrentCell == null)
                return;

            bool wasInEditMode = _grid.CurrentCell.IsInEditMode;

            if (!wasInEditMode)
                _grid.CurrentCell.BeginEdit();

            _grid.CurrentCell.Value = null;

            if (!wasInEditMode && _grid.CurrentCell.IsValid)
                _grid.CurrentCell.CommitEdit();
        }

But the cell revers to the bound value upon commit. How can I achieve this effect? Remember that I don't know the type of datasource bound to the cell.
Marius
Top achievements
Rank 1
 answered on 20 Dec 2010
1 answer
245 views
hello,

I would like to be able to change header text at runtime in a gridview

1- is it possible to edit headers ?
2- I would like to open a dialog window when the user clicks on a header. how can i get the click event on a header cell ?

best regards
thibaut
Vanya Pavlova
Telerik team
 answered on 20 Dec 2010
1 answer
136 views
Hi Telerik Team,

I have added telerik TreeListView control in my application. Now I need to edit some columns while application is running. How I can achieve this functionality? I need to edit as well as get that edited data back for further processing. How can I do this?

Thanks
Vanya Pavlova
Telerik team
 answered on 20 Dec 2010
3 answers
182 views
Hi I am using AddingNewDataItem event for radgrid view ,
    But i am unable to delete the selected row.
   also suggest me how to get and set a GridRow.
 
Thanks,
Swathi.
Maya
Telerik team
 answered on 20 Dec 2010
7 answers
120 views
What are the future plans for validation with GridView?  Do you plan to support multiple levels of validation, such as errors/warnings/information?  I have a situation where my customers want to be warned of a value differential, but still want to be able to save their data.
Nedyalko Nikolov
Telerik team
 answered on 20 Dec 2010
1 answer
114 views
I am currently defining the ChildTableDefinition item source to a List ("Children").  The number of items in the list is editable on the parent item and can cause large updates (which is why I am using a List and not an Observable collection).  When the user modifies the number of child elements we regenerate the List and then issue a property change notification for the Children property.  

When the user transitions the number of children from a non-zero to a 0 the expander control remains (although trying to expand it does not show any children).  Alternatively transitioning from a 0 to a non-zero does not create an expander control.

Is there a way to update the expander control to reflect transition to having children aside from using an ObservableCollection (it worked when I was using one but the performance was not desirable)?

Thanks
Vlad
Telerik team
 answered on 20 Dec 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?