Telerik Forums
UI for WPF Forum
4 answers
442 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
89 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
129 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
93 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
82 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
140 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
193 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
6 answers
389 views

Hi,

I'm using ScheduleView to load custom appointments with the Load on demand features. The appointments load fine, but whenever I scroll backward or forward in time (e.g. previous/next week or month) the calendar scrolls back to the top, instead of staying at the time it was scrolled to before navigation.

This also occurs in the RadControls demo; just navigate to Controls -> Data -> Schedule View -> Features -> Load On Demand. Now click Week view. Scroll down to 18:00. Now click the right arrow to navigate to next week. The view scrolls back to the top at 0:00.

Any ideas on how to fix this? I found no method to manually get and set the scrolling position either.

Rosi
Telerik team
 answered on 05 May 2011
4 answers
336 views
I have been looking and trying for hours to print a telerik gridview. I succeeded in printing, in about the same way as described at http://blogs.telerik.com/vladimirenchev/posts/09-12-28/how_to_easy_print_and_print_preview_with_radgridview_for_wpf.aspx, but this causes the last row on each page to be splitted in half. The upper part of the row is at the end of page 1 and the lower part of that row is at the beginning of page 2. This is unacceptable.

How can I print the gridview in a decent way, without rows being splitted over two pages?
Ludwig
Top achievements
Rank 1
 answered on 05 May 2011
5 answers
127 views
 

Hello,


I don't speak English very well, but I have a question about the API WPF Telerik.


I would like to know if it's possible to draw on charts?


The user must be able to draw a rectangle on a scatter series using the mouse.


This rectangle will be modified in width. The height will be automatically adjusted based on the average of selected points in the rectangle.


We would like to know if this is feasible or not via the API WPF Telerik and if so using what events?


Best regards,

Mickael
Top achievements
Rank 1
 answered 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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?