Telerik Forums
UI for WPF Forum
1 answer
200 views
Hi,

We have a problem with getting the SelectedItem of the RadTreeView
when we right clicking it to show it's ContextMenu.

the solutions that are presented in the posts are both written in the code behind
and involve an explicit casting to a RadTreeView / RadTreeViewItem in order to
get the SelectedItem.

We are looking for a solution where there is no need to use this code in the code-behind:
http://www.telerik.com/community/forums/wpf/treeview/right-click-to-select-item.aspx
as in Syncfusion there is a property: IsSelectOnRightMouseClick that does that.

We are also looking into avoiding mentioning 3rd-party controls in our ViewModel,
in our Syncfusion mockup we are able to produce this handler:

       void OurTree_MouseRightButtonDown(object sender, System.Windows.RoutedPropertyChangedEventArgs<object> e)
        {
            SelectedItem = e.NewValue as OurSpecificObject;
        }

is it possible to do this with telerik?

thank you.
Tina Stancheva
Telerik team
 answered on 06 May 2011
3 answers
450 views
Hi

I need to bind the images in combobox at load . I using MVVM Pattern for my development.
 
Can anyone suggest me what should I do.

Regards
Yana
Telerik team
 answered on 06 May 2011
1 answer
79 views
hey guys,

not sure if this belongs on this forum OR the RadRibbon forum, but its the RichTextBox that i'm most interested in, basically the problem we have, is i have a list of 0 - N controls we call these ActivityControls, each Activity has a TWO RichTextBox controls,

So I have a Ribbon control to control my list of controls, with a Contextual Tab for the Text and Table Controls (taken from the telerik demo)

Is it possible for this singular set of controls to control potentially hundreds of RichText Controls?

If you have a demo of this functionality that'd be brilliant!

Cheers
Regards
Kevin.

Iva Toteva
Telerik team
 answered on 06 May 2011
4 answers
414 views
When displaying "Name" from button collection, selected item is not displayed.
It looks pretty straight forward but I can't think of why it won't work.. hmm..
Is this a telerik bug?
The following code shows two different methods, "DataTemplate" and "DisplayMemberPath"
I appreciate for your help.
-chris


<Window x:Class="RadComboBoxExample.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid x:Name="grid">
        <Grid.Resources>
            <DataTemplate x:Key="comboTemplate">
                <TextBlock Text="{Binding Name}" />
            </DataTemplate>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
          
        <StackPanel Grid.Column="0" Orientation="Vertical">
            <TextBlock Text="Use ItemTemplate" Margin="10" FontSize="15" HorizontalAlignment="Center" />
            <telerik:RadComboBox x:Name="comboBox1" Width="100" Height="30"  
                                 ItemsSource="{Binding ButtonCollection1}" 
                                 SelectedItem="{Binding SelectedButton1}" 
                                 ItemTemplate="{StaticResource comboTemplate}"/>
        </StackPanel>
  
        <StackPanel Grid.Column="1" Orientation="Vertical">
            <TextBlock Text="Use DisplayMemberPath" Margin="10" FontSize="15" HorizontalAlignment="Center" />
            <telerik:RadComboBox x:Name="comboBox2" Width="100" Height="30" 
                                 Grid.Column="1"
                                 ItemsSource="{Binding ButtonCollection2}" 
                                 SelectedItem="{Binding SelectedButton2}" 
                                 DisplayMemberPath="Name"/>
        </StackPanel>
    </Grid>
</Window>

using System.Collections.ObjectModel;
using System.Windows;
using Telerik.Windows.Controls;
  
namespace RadComboBoxExample
{
    public partial class MainWindow : Window
    {
        public ObservableCollection<RadButton> ButtonCollection1 { get; set; }
        public ObservableCollection<RadButton> ButtonCollection2 { get; set; }
        public RadButton SelectedButton1 { get; set; }
        public RadButton SelectedButton2 { get; set; }
  
        public MainWindow()
        {
            InitializeComponent();
  
            ButtonCollection1 = new ObservableCollection<RadButton>();
            ButtonCollection2 = new ObservableCollection<RadButton>();
  
            for (int i = 0; i < 10; i++)
            {
                RadButton button1 = new RadButton();
                button1.Name = "Button1_Item" + i;
                ButtonCollection1.Add(button1);
  
                RadButton button2 = new RadButton();
                button2.Name = "Button2_Item" + i;
                ButtonCollection2.Add(button2);
            }
  
            grid.DataContext = this;
        }
    }
}

Chris
Top achievements
Rank 1
 answered on 06 May 2011
1 answer
65 views
How the heck does one get to owner Chart instance from ItemToolTipOpening event? And why on the earth didn't you use normal event definition - sender instead of tooltip - you could pass tooltip instance within ItemToolTipEventArgs ?
Ves
Telerik team
 answered on 06 May 2011
1 answer
107 views
I'm trying to get a skinny Carousel working, about 30-or-so pixels high. I tried wrapping RadCarouselPanel in a ListView, but found I had no easy way of accessing SelectedItems.

I'm back to mucking with a RadCarousel to house it all, but those buttons are driving me crazy. Is there an example of using the RadCarousel that does not have the four buttons (page up, moveby, etc)? The only examples I see without the buttons are simply not using the RadCarousel.

Any help would be greatly appreciated
Milan
Telerik team
 answered on 06 May 2011
1 answer
79 views
Hi,

I have been using 2 level Hierarchical RadGrid (ver 2010.2.0924) for my application. On running the automation tool (like UI Spy), tool does not able to detect the 2nd level of Grid. It only detects the first level of Grid. I have given the AutomationId for both the 1st level as well as for the 2nd level. Here is the xaml of the defined 2 level hierarchical grid.

 

 


<
telerik:RadGridView Name="EntitlementGrid" AutomationProperties.Name="EntitlementGrid"

 

 

IsReadOnly="True" ColumnWidth="*"

 

 

telerik:StyleManager.Theme="Windows7"

 

 

 

ItemsSource="{Binding EntitlementsVM.SelectedEntitlements}"

 

 

 

IsFilteringAllowed="{Binding EnableFilters}"

 

 

ScrollViewer.VerticalScrollBarVisibility="Visible" SelectionMode="Extended">

 

 

 

<telerik:RadGridView.ChildTableDefinitions>

 

 

 

<telerik:GridViewTableDefinition />

 

 

 

</telerik:RadGridView.ChildTableDefinitions>

 

 

 

<telerik:RadGridView.Columns>

 

 

 

<telerik:GridViewDataColumn MaxWidth="30" Header="" IsFilterable="False" >

 

 

 

<telerik:GridViewColumn.CellTemplate>

 

 

 

<DataTemplate>

 

 

 

<CheckBox HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="{Binding IsChecked, Mode=TwoWay}"

 

 

ClipToBounds="True" Padding="1"/>

 

 

 

</DataTemplate>

 

 

 

</telerik:GridViewColumn.CellTemplate>

 

 

 

</telerik:GridViewDataColumn>

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="Entitlement Id" UniqueName="EntitlementId" />

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="PO" UniqueName="PO" />

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="SO" UniqueName="SO" />

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="Type" UniqueName="Type" />

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="Total" UniqueName="TotalCount" ToolTip="Total Count" />

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="Available" UniqueName="AvailableCount" ToolTip="Available Count" />

 

 

 

<telerik:GridViewDataColumn IsFilterable="False" DataType="{x:Null}" Header="Requested" UniqueName="RequestedCount" ToolTip="Requested Count" />

 

 

 

<telerik:GridViewDataColumn IsFilterable="False" DataType="{x:Null}" Header="Remaining" UniqueName="RemainingCount" ToolTip="Remaining Count" />

 

 

 

</telerik:RadGridView.Columns>

 

 

 

<telerik:RadGridView.HierarchyChildTemplate>

 

 

 

<DataTemplate>

 

 

 

<telerik:RadGridView Name="EntitlementFeaturesGrid" AutomationProperties.Name="EntitlementFeaturesGrid"

 

 

IsReadOnly="True" RowIndicatorVisibility="Collapsed"

 

 

 

IsFilteringAllowed="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}, AncestorLevel=1}, Path=IsFilteringAllowed}"

 

 

ItemsSource="{Binding EntitlementItems}"

 

 

 

telerik:StyleManager.Theme="Windows7"

 

 

 

ColumnWidth="Auto">

 

 

 

<telerik:RadGridView.Columns>

 

 

 

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

 

 

 

<telerik:GridViewDataColumn Header="Feature Desc" DataMemberBinding="{Binding ProductDescription}" />

 

 

 

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

 

 

 

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

 

 

 

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

 

 

 

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

 

 

 

</telerik:RadGridView.Columns>

 

 

 

</telerik:RadGridView>

 

 

 

</DataTemplate>

 

 

 

</telerik:RadGridView.HierarchyChildTemplate>

 

 

 

</telerik:RadGridView>

 


Also, i downloaded the trial version of RadGrid (ver 2011.1.0419.35) but this too displays the same behavior. Is there some settings taht I am missing to get the 2nd level of gird detected in the automation tool ?

Appreciate response.

Mustansir.
Yordanka
Telerik team
 answered on 06 May 2011
1 answer
73 views

Hi,
I'm working with RadControls for WPF Q1 2010, released on 22 April 2010.
I have a Spline chart bound to a list of objects with a DateTime and an Int value. The Values are plotted correctly using LineSeries, however I ran into a problem using SplineSeries.

If there is no data point for a long time, the chart shows unexpected behavior at the ends of long period as highlighted in the attached illustration. This is unwanted as the X axis represents Time and as it is impossible for time to get back this misrepresents the data. It seems to be a bug from Telerik Chart in such conditions.

I'd like to find out if there is a setting or later release that prevent this behavior. I hope someone can tell me what is wrong!

SplineUnexpectedBehavior.png
Yavor
Telerik team
 answered on 06 May 2011
2 answers
122 views
Hello,

I am just now using the Telerik controls in a WPF project and I tried to use the TreeView control, but it throws an error that says a XamlParseException occurred.  I have tried a couple of different controls, and none of them appear to work.

Generally, I get the following error: xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">

Am I forgetting a using somewhere?

Thank You,

Ron
Tina Stancheva
Telerik team
 answered on 05 May 2011
0 answers
180 views
Hello,

I have a list as a datasource for my Combobox. Whenever the DataSource has an empty value my data trigger inserts the template seen in XAML below. This works perfectly and inserts my separator and radbutton into the combolist as a comboboxitem.

<ComboBox Name="cmbo_NewSME" SelectedValue="You can begin typing the name here..." Height="25" Width="300" Margin="5,6,5,0" Loaded="cmbo_NewSME_Loaded" SelectionChanged="cmbo_NewSME_SelectionChanged">
    <ComboBox.ItemContainerStyle>
        <Style TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
            <EventSetter Event="PreviewMouseLeftButtonDown" Handler="PreviewMouseLeftButtonDown" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding Path=AD_FullName}" Value="">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                                <StackPanel Name="FullUsrListWrap" Visibility="Visible" Width="300">
                                    <Separator Name="FullList" Margin="0,10,0,5" Height="10" Width="300"/>
                                    <telerik:RadButton Name="ShowAllUsrs" Width="220" Height="20" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,5" Content="Show All Authorize-IT Users..." />
                                </StackPanel>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </ComboBox.ItemContainerStyle>
</ComboBox>

The problem is that I am unable to handle any RadButton events. As you can see above the EventSetter is at the combobox level and while this works I have to first decipher if the person actually selected a username or the "Show More..." button. So I experimented and thought about an EventSetter at the Radbutton level but I keep getting an error.
Everything is same as above except:
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
   <StackPanel Name="FullUsrListWrap" Visibility="Visible" Width="300">
      <Separator Name="FullList" Margin="0,10,0,5" Height="10" Width="300"/>
         <telerik:RadButton Name="ShowAllUsrs" Width="220" Height="20" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,5" Content="Show All Authorize-IT Users...">
            <Style>
               <EventSetter Event="Click" Handler="Click" />
            </Style>
         </telerik:RadButton>
   </StackPanel>
</ControlTemplate>

I keep getting the property Content is set more than once.....but it isn't or I'm overlooking something VERY obvious.

So the error aside what I am after is handling the button click event which may or may not be possible cause it's "disguised" as a ComboboxItem....??

Thanks
JB
Ramjet
Top achievements
Rank 1
 asked on 05 May 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?