Telerik Forums
UI for WPF Forum
2 answers
147 views
Hello, i have an application, with docking scenario created by code.

I need to khow how prevent some RadPanes show compass, when drag over some RaqdSplitcontainers or RadPanesgroup.

I read:
http://www.telerik.com/help/wpf/raddocking-how-to-implement-conditional-docking.html

But this solution is for all docking elements, i need a conditional docking for each item :P, for example a RadPane never can be docked in the same splitcontainer of my RadPaneToolBar

Thanks in advance.
Fernando
Top achievements
Rank 1
 answered on 25 Jan 2011
1 answer
62 views
Hi,
I just noticed that the LayoutChangeStarted event is not fired when I select a different RadPane if the RadPanes have CanFloat set to false.  As soon as I set CanFloat to true, selecting between the tabbed panes causes the event to be fired.  Is this by design?  Is there another way to track the current selected pane?

Thanks.
Miroslav Nedyalkov
Telerik team
 answered on 25 Jan 2011
3 answers
203 views

Hello i have a problem, trying to edit a oRadTreeViewItem

All tree is generated by code (not binding)

RadTreeViewItem oRadTreeViewItem = new RadTreeViewItem(); 
oRadTreeViewItem.Header = "Name"; 
oRadTreeViewItem.IsEditable = true; 
oRadTreeViewItem.PreviewEditStarted += radTreeView_PreviewEditStarted; 
oRadTreeViewItem.Edited += DataViewExplorerTree_Edited;  
oRadTreeViewItem.EditStarted += radTreeView_EditStarted; 
DataViewExplorerTree.Items.Add(oRadTreeViewItem);

I use a context menu to edit the name of tree node using GetItemByPath to find the node

 

 


 


RadTreeViewItem oRadTreeViewItem = DataViewExplorerTree.GetItemByPath("Path of the item");


The item put's in edit mode but loss the header content. it's turn in Edit mode with empty content.

I try to catch radTreeView_EditStarted and radTreeView_PreviewEditStarted in order to rewrite the original header text. But only DataViewExplorerTree_Edited is fired when edit ends. Also trying to set focus to the edit box, but without success (tree is inside a dockpane)

private void DataViewExplorerTree_Edited(object sender, Telerik.Windows.Controls.RadTreeViewItemEditedEventArgs e)
        {
            RadTreeViewItem targetItem = e.Source as RadTreeViewItem;
             
           // (e.Source as RadTreeViewItem).IsInEditMode = false;
           //(e.Source as RadTreeViewItem).Background = new SolidColorBrush(Colors.Red);
        }
  
        private void radTreeView_PreviewEditStarted(object sender, Telerik.Windows.Controls.RadTreeViewItemEditedEventArgs e)
        {
            RadTreeViewItem targetItem = e.Source as RadTreeViewItem;
        }
  
        private void radTreeView_EditStarted(object sender, Telerik.Windows.Controls.RadTreeViewItemEditedEventArgs e)
        {
            RadTreeViewItem targetItem = e.Source as RadTreeViewItem;
        }

I try to use

oRadTreeViewItem.IsInEditMode = true;
  
or
       
 oRadTreeViewItem.BeginEdit();  (ALWAYS return false)

to start to edit node only first runs, the second always return me false.

Any ideas?

Thanks in advance.

Fernando
Top achievements
Rank 1
 answered on 25 Jan 2011
1 answer
224 views

Hi,

I have have a 2 level Treeview say country and its state. I dont want to highlight the parent node that is country on mouseover.Please let me know how to remove that default highlighting

-Regards,
Prajin
Petar Mladenov
Telerik team
 answered on 25 Jan 2011
6 answers
794 views
I'm not getting any kind of resize grip in the bottom right corner of the window as the ResizeMode property description says:

ResizeMode.CanresizeWithGrip - "A window can be resized.  The Minimize and Maximize buttons are both shown and enabled.  A resize-grip appears in the bottom right corner of the window."

No such grip appears anywhere.

Here are my RadWindow settings:

                window.Content = myContent;
                window.Header = "myContent Header";
                window.CanMove = true;
                window.ResizeMode = ResizeMode.CanResizeWithGrip;
                window.CanClose = false;
                window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                window.Width = 400;
                window.Height = 300;
                window.Show();

My Telerik.Windows.Controls dll version is: 2010.1.603.35

Am I doing something wrong?
Boyan
Telerik team
 answered on 25 Jan 2011
1 answer
130 views
Hello,

I wonder if there is a possibility to get all objects of an information layer which are contained within a specified polygon (geo coordinates).
There is a method "InformationLayer.GetElementsInRectangle" wich is almost what we need.

best regards
Andrey
Telerik team
 answered on 25 Jan 2011
3 answers
334 views
Hi,

I'm trying to set a template and the Expression_Dark theme to a tileviewitem, but I don't understand how to set both of them. I thought setting the template theme and then set this template to the tileviewitem, but I guess I don't set the theme to the template correctly. What is the right way of doing this?
I'll appreciate if you could provide me the needed lines of code.

Thank you
Zarko
Telerik team
 answered on 24 Jan 2011
1 answer
108 views
I am using a RadPanelBar control, and when RadPanelBar expands and collapses, it run very fast. How to adjust the speed of RadPanelBar  expand and collapse?
Tina Stancheva
Telerik team
 answered on 24 Jan 2011
1 answer
177 views
I have a DataGrid that i have a TimePicker column in.  I manipulated the sample custom column to just include a TimePicker element.  It works fine except for when the element tries to validate the input selected.  I have bound it to a TimeSpan item, but it gives me the validation error "Object of System.DateTime cannot be converted to TimeSpan".  So im unsure where to bind the TimeSpan item to get the selected DateTime.TimeOfDay??

 

 

 

<telerik:RadGridView AutoGenerateColumns="False" NewRowStyle="{StaticResource NewRowStyle}" RowStyle="{StaticResource RowStyle}" Foreground="White" HorizontalGridLinesBrush="White" Margin="10,10,210,22" Name="groupGrid" SelectionMode="Single" SelectionUnit="FullRow" VerticalGridLinesBrush="White" SelectionChanged="groupGrid_SelectionChanged" CellEditEnded="groupGrid_CellEditEnding" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False" ShowInsertRow="True" RowEditEnded="groupGrid_RowEditEnded">

 

 

 

 

<telerik:RadGridView.Columns>

 

 

 

 

<telerik:GridViewDataColumn Header="Task Name: " DataMemberBinding="{Binding Name}" />

 

 

 

 

<telerik:GridViewDataColumn Header="Description: " DataMemberBinding="{Binding Description}" />

 

 

 

 

<telerik:GridViewDataColumn Header="Solution: " DataMemberBinding="{Binding Solution}" />

 

 

 

 

<my:TimePickerColumn DataMemberBinding="{Binding StartTime}" Header="Start Time" TimeInterval="0:30:0"/>

 

 

 

 

 

<telerik:GridViewDataColumn Header="End Time: " DataMemberBinding="{Binding EndTime}" />

 

 

 

 

<telerik:GridViewDataColumn Header="Elapsed:" UniqueName="Elapsed" DataMemberBinding="{Binding ElapsedTime}" />

 

 

 

 

 

</telerik:RadGridView.Columns>

 

 

 

 

</telerik:RadGridView>

 

public class TimePickerColumn : GridViewBoundColumnBase
    {
        public TimeSpan TimeInterval
        {
            get
            {
                return (TimeSpan)GetValue(TimeIntervalProperty);
            }
            set
            {
                SetValue(TimeIntervalProperty, value);
            }
        }
  
        public static readonly DependencyProperty TimeIntervalProperty =  DependencyProperty.Register("TimeInterval", typeof(TimeSpan), typeof(TimePickerColumn), new PropertyMetadata(TimeSpan.FromHours(1d)));
  
        public override FrameworkElement CreateCellEditElement(GridViewCell cell, object dataItem)
        {
            this.BindingTarget =  RadTimePicker.SelectedValueProperty;
  
            RadTimePicker picker = new RadTimePicker();
            picker.IsTooltipEnabled = false;
  
            picker.TimeInterval = this.TimeInterval;
             
            picker.SetBinding(this.BindingTarget, this.CreateValueBinding());
  
            return picker;
        }
  
        public override object GetNewValueFromEditor(object editor)
        {
            RadTimePicker picker = editor as RadTimePicker;
            if (picker != null)
            {
                picker.DateTimeText = picker.SelectedTime.Value.ToString();
            }
  
            return base.GetNewValueFromEditor(editor);
        }
  
        private Binding CreateValueBinding()
        {
            Binding valueBinding = new Binding();
            valueBinding.Mode = BindingMode.TwoWay;
            valueBinding.NotifyOnValidationError = true;
            valueBinding.ValidatesOnExceptions = true;
            valueBinding.UpdateSourceTrigger = UpdateSourceTrigger.Explicit;
            valueBinding.Path = new PropertyPath(this.DataMemberBinding.Path.Path);
  
            return valueBinding;
        }
    }

Vanya Pavlova
Telerik team
 answered on 24 Jan 2011
1 answer
491 views

Good day,

I am using RadGridView control using 2009 Q2 version of Telerik. And i have the following problem.

I am using bindings for having some control on some behavior into the Grid. My idea is, binding the column to a property, set unable and disable the checkbox we have in the column. For that i use RelativeSource FindAncestor

<telerik:GridViewDataColumn UniqueName="List" IsFilterable="False" Width="100">
    <telerik:GridViewColumn.HeaderCellStyle>
        <Style TargetType="telerik:GridViewHeaderCell">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:GridViewHeaderCell">
                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Edit" HorizontalAlignment="Center"></TextBlock>
                            <CheckBox x:Name="AllEdited" HorizontalAlignment="Center" VerticalAlignment="Center" Click="AllEdited_Click" Validation.ErrorTemplate="{x:Null}" IsEnabled="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=DataContext.EditMode}"></CheckBox>
                        </StackPanel>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </telerik:GridViewColumn.HeaderCellStyle>
    <telerik:GridViewColumn.CellStyle>
        <Style TargetType="telerikGridView:GridViewCell">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerikGridView:GridViewCell">
                        <CheckBox HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="{Binding CuestionarioVisible}" Validation.ErrorTemplate="{x:Null}" IsEnabled="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=DataContext.EditMode}"></CheckBox>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </telerik:GridViewColumn.CellStyle>
</telerik:GridViewDataColumn>

As you can see in the code, I have binding on "IsEnabled" property for allowing or not to check on the checkboxes which was edited or not.
The binding works great in the header but, it ignores in the cell!

Any ideas? Why is that happening? Any solution for making the cells work in the same way as the header?

Thanks in advance.

Regards,
Alvaro
Alvaro
Top achievements
Rank 1
 answered on 24 Jan 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?