Telerik Forums
UI for WPF Forum
3 answers
183 views
    public partial class MainWindow : Window 
    { 
        public MainWindow() 
        { 
            InitializeComponent(); 
            (Resources["DataSource"as RadTreeViewSampleData).SelectedItem = (radTreeView.ItemsSource as IEnumerable<League>).LastOrDefault(); 
        } 
    } 
    public class League : DependencyObject 
    { 
        public League(string name) 
        { 
            this.Name = name; 
            this.Leagues = new List<League>(); 
        } 
 
        public string Name 
        { 
            get
            set
        } 
 
        public List<League> Leagues 
        { 
            get
            set
        } 
    } 
 
    public class RadTreeViewSampleData : DependencyObject 
    { 
        /// <summary> 
        /// Identifies the SelectedItem dependency property. 
        /// </summary> 
        public static readonly DependencyProperty SelectedItemProperty = DependencyProperty.Register("SelectedItem"typeof(League), typeof(RadTreeViewSampleData)); 
 
        /// <summary> 
        /// Gets or sets SelectedItem.  This is a dependency property. 
        /// </summary> 
        public League SelectedItem 
        { 
            get { return (League)GetValue(SelectedItemProperty); } 
            set { SetValue(SelectedItemProperty, value); } 
        } 
 
        public RadTreeViewSampleData() 
        { 
            this.InitializeLeaguesDataSource(); 
        } 
 
        public List<League> LeaguesDataSource 
        { 
            get
            set
        } 
 
        private void InitializeLeaguesDataSource() 
        { 
            this.LeaguesDataSource = new List<League>(); 
            League l; 
            League d; 
            this.LeaguesDataSource.Add(l = new League("League A")); 
        } 
    } 
<Window.Resources> 
        <local:RadTreeViewSampleData x:Key="DataSource"/> 
    </Window.Resources> 
    <telerik:RadTreeView x:Name="radTreeView" ItemsSource="{Binding Path=LeaguesDataSource, Source={StaticResource DataSource}}" SelectedItem="{Binding Path=SelectedItem, Source={StaticResource DataSource}, Mode=TwoWay}"
        <telerik:RadTreeView.ItemTemplate> 
            <HierarchicalDataTemplate ItemsSource="{Binding Path=Leagues}"
                <TextBlock Text="{Binding Path=Name}" /> 
            </HierarchicalDataTemplate> 
        </telerik:RadTreeView.ItemTemplate> 
    </telerik:RadTreeView> 
The SelectedItem is set properly but does not have the selection brush applied appropriately to its container.
Bobi
Telerik team
 answered on 17 Feb 2010
4 answers
484 views
Hi,

I like to add some copy/paste functionality to the grid.
In the grid contextmenu, I need a applicationcommands.copy and a applicationcommands.paste.
The problem is that the copy command is handled by the grid (for clipboard copy I suppose) and the copy canexecute is not fired in my program. Do you have a solution for this?

Thanks in advance,
Thomas.
Thomas
Top achievements
Rank 1
 answered on 17 Feb 2010
5 answers
206 views
Hi All,

Are there any built in transition effects in the WPF suite? In the demo, there is a transition between categories of demo's.. the panel pulls back and rotates. Are there any existing control like that available with a choice of transition effects?

Thanks
harold

Valeri Hristov
Telerik team
 answered on 17 Feb 2010
1 answer
148 views
Hi,
I've some questions about Doughnut customization. I've created in viewmodel a colection with this 3 properties

Color
Item Title
Item Value

I need to set  that properties in the view (xaml) without using code behind. I would like to put Item Title and Item Value in the item tooltip and color in item background.

I attach the code



<telerik:RadChart Background="Transparent" ItemsSource="{Binding PhoneResultBox}" HorizontalAlignment="Stretch" MaxHeight="230">
     
                <telerik:RadChart.SeriesMappings>
                    <telerik:SeriesMapping>
                       
                        <telerik:SeriesMapping.SeriesDefinition>
 
                        </telerik:SeriesMapping.SeriesDefinition>
              
                    <telerik:SeriesMapping.ItemMappings>
                           <telerik:ItemMapping DataPointMember="YValue" FieldName="ItemsCount"> </telerik:ItemMapping>
                 
                            

                        </telerik:SeriesMapping.ItemMappings>
                        
                      </telerik:SeriesMapping>
                    </telerik:RadChart.SeriesMappings>
           
                <telerik:RadChart.DefaultView>
                    <telerik:ChartDefaultView>
                        <telerik:ChartDefaultView.ChartLegend>
                            <telerik:ChartLegend Visibility="Collapsed" />
                        </telerik:ChartDefaultView.ChartLegend>
                        <telerik:ChartDefaultView.ChartTitle>
                            <telerik:ChartTitle Content="Esiti Telefonici"></telerik:ChartTitle>
                        </telerik:ChartDefaultView.ChartTitle>
                        <telerik:ChartDefaultView.ChartArea>
                            <telerik:ChartArea>
                         
                            </telerik:ChartArea>
                        </telerik:ChartDefaultView.ChartArea>
                    </telerik:ChartDefaultView>
                    
                   
                </telerik:RadChart.DefaultView>

             
            </telerik:RadChart>
Velin
Telerik team
 answered on 17 Feb 2010
10 answers
594 views
Hello

I have a three level hierarchy grid
and I want to open all the expand buttons at once (by a button click)
If I use 

RadGridview1.ExpandAllHierarchyItems()
it opens only the first level
how can I open the second level?
I tried to do this

 

RadGridview1.ChildrenOfType<

RadGridView>().FirstOrDefault().ExpandAllHierarchyItems();
but only the children of the first child are open.

Thanks

 

Pavel Pavlov
Telerik team
 answered on 17 Feb 2010
3 answers
280 views
I have a GridView hierarchy with two child tables, of which I want to show only a few chosen columns .

In Q2, it worked fine with the following code.
 

 

GridViewTableDefinition tdPayment = new GridViewTableDefinition();  
GridViewTableDefinition tdDetail = new GridViewTableDefinition();  
 
tdPayment.DataSource = MySalePayments = GetSalePaymentsData();  
tdPayment.AutoGenerateFieldDescriptors = false;  
 
TableRelation tr = new TableRelation();  
tr.FieldNames.Add(new FieldDescriptorNamePair("Receipt""Receipt"));  
tdPayment.Relation = tr;  
 
GridViewDataColumn paymentType = new GridViewDataColumn();  
paymentType.UniqueName = "SalePaymentType";  
paymentType.Header = "PaymentType";  
paymentType.DataType = typeof(short);  
GridViewDataColumn amount = new GridViewDataColumn();  
amount.UniqueName = "Amount";  
amount.Header = "Amount";  
amount.DataType = typeof(decimal);  
 
tdPayment.FieldDescriptors.Add(paymentType);  
tdPayment.FieldDescriptors.Add(amount);  
           
tdDetail.AutoGenerateFieldDescriptors = false;           
tdDetail.DataSource = MySaleDetails = GetSaleDetailData();  
 
tdDetail.Relation = tr;  
GridViewDataColumn itemId = new GridViewDataColumn();  
itemId.UniqueName = "ItemId";  
itemId.Header = "ItemId";  
itemId.DataType = typeof(string);  
GridViewDataColumn saleQty = new GridViewDataColumn();  
saleQty.UniqueName = "SaleQuantity";  
saleQty.Header = "Sale Qty";  
saleQty.DataType = typeof(short);  
GridViewDataColumn unitPrice = new GridViewDataColumn();  
unitPrice.UniqueName = "UnitPrice";  
unitPrice.Header = "Price";  
unitPrice.DataType = typeof(decimal);  
GridViewDataColumn discount = new GridViewDataColumn();  
discount.UniqueName = "Discount";  
discount.Header = "Discount";  
discount.DataType = typeof(decimal);  
GridViewDataColumn individualDiscount = new GridViewDataColumn();  
individualDiscount.UniqueName = "IndividualDiscount";  
individualDiscount.Header = "Ind.Discount";  
individualDiscount.DataType = typeof(decimal);  
 
tdDetail.FieldDescriptors.Add(itemId);  
tdDetail.FieldDescriptors.Add(saleQty);  
tdDetail.FieldDescriptors.Add(unitPrice);  
tdDetail.FieldDescriptors.Add(discount);  
tdDetail.FieldDescriptors.Add(individualDiscount);  
 
radGridViewSalesList.TableDefinition.ChildTableDefinitions.Add(tdPayment);  
radGridViewSalesList.TableDefinition.ChildTableDefinitions.Add(tdDetail);  
 

 

When Run in Q3, AutoGenerateFieldDescriptors was simply ignored showing all columns.

In Q3, it was suggested that I use AutoGenerateColumns of GridViewDataControl .
I was able to do it with single child table using DataLoading handler as shown in the demo source code.
But I don't know how to do it with two child tables.

gureumi
Top achievements
Rank 1
 answered on 16 Feb 2010
5 answers
160 views
I have implemented a similar search/filter as the scenario found at http://demos.telerik.com/wpf/?GridView/Search , the same behaviour occurs in my own implementation and in the demo itself.

The search while you type works perfectly when a grid row is not selected, however if a row is selected, and a search is started, the row receives the focus.

This occurs only when a matching letter is found within the selected row. The textbox looses focus, which means only the first letter is searched on.

If a match isn't found, the focus remains in the search textbox and more letters can be added to the search.

On a side note, is there any way to ensure the search textbox has the focus when the filter is removed? Eg. When a user deletes his search, the grid immediatly takes focus from the textbox.

Thank you,

A Marshall

Hristo
Telerik team
 answered on 16 Feb 2010
1 answer
128 views
Hi!

I would like to have all my minimized items in a single column (but multiple rows) under the maximized item.

Right now if i configure the TileView to show the minimized items below the maximized item it will do the opposite; that is put all minimized items in a single row.

Is this possible with the TileView?

Thanks // David
Tihomir Petkov
Telerik team
 answered on 16 Feb 2010
2 answers
81 views
Hi All,

Whlist I love the style and functionallity of the WPF Telerik components the 1 thing that I like the most is the zoom in - out and slide animation that occurs between pages... How can I replicate this, is this a Telerik component or just some very clever code?

Thanks!

Xavier.
Xavier Hutchinson
Top achievements
Rank 2
 answered on 16 Feb 2010
5 answers
233 views
Hi,

We're trying to do a simple two-level grouping in a RadGridView:

            // Add grouping according to device, then parameter category 
            MainGrid.GroupDescriptors.Add( 
                new GroupDescriptor() 
                { 
                    Member = "OwnerContainer"
                    SortDirection = ListSortDirection.Ascending 
                }); 
            MainGrid.GroupDescriptors.Add( 
                new GroupDescriptor() 
                { 
                    Member = "ParameterCategory"
                    SortDirection = ListSortDirection.Ascending 
                }); 

This has worked great in Q3 2009. Now that we've moved over to Q3 SP2, we're getting an exception when the grid loads:
"Specified method is not supported"

This appears to be associated with a call to a Reset function on a LINQ wrapper to our CollectionView. The CollectionView itself hasn't changed.

Any idea what causes this and how to overcome it?

Thanks,
yonadav
Hristo
Telerik team
 answered on 15 Feb 2010
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?