Telerik Forums
UI for WPF Forum
1 answer
219 views
Hi all,

I'm trying the combo box control for WPF.

How to attach a command at the selectionchange event ?

Thanks
Valeri Hristov
Telerik team
 answered on 23 Jul 2009
3 answers
156 views
Hello,

I am trying to create a totals row using code.
I saw the Totals example using XAML and also found the following post:
http://www.telerik.com/community/forums/wpf/gridview/2q2-9-radgridview-footer-row-sample-question.aspx
however I got stuck. No value is displayed in the Totals row.

Thanks,

Erez


<Window x:Class="TestTelerikQ2.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    Title="Window1" Height="378" Width="536">
    <Grid>
        <StackPanel Orientation="Vertical">
            <telerik:RadGridView Margin="12,20,-12,-20"
                                Name="radGridView1"
                                Loaded="radGridView1_Loaded"
    ShowColumnFooters="True" AutoGenerateColumns="False" >
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn  UniqueName="Number"
       DataMemberBinding="{Binding Number}">
                    </telerik:GridViewDataColumn>
                </telerik:RadGridView.Columns>
               
            </telerik:RadGridView>
        </StackPanel>
    </Grid>
</Window>



using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.GridView;
using Telerik.Windows.Data;

namespace TestTelerikQ2
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            try
            {
                InitializeComponent();

                GridViewFooterCell g;
               
                GridViewFooterRow footerRow = new GridViewFooterRow();

                Telerik.Windows.Data.SumFunction sum = new SumFunction();

                sum.Caption = "sum: ";

 

                sum.ResultFormatString = "{}{0:c}";

                sum.SourceField = "Number";

                Telerik.Windows.Controls.GridViewDataColumn column =
                        (Telerik.Windows.Controls.GridViewDataColumn)radGridView1.Columns["Number"];

               

                //column.Footer = footerRow;

                DataTable dt = new DataTable();
                DataView dv;

                dt.Columns.Add("Display", typeof(string));
                dt.Columns.Add("Number", typeof(int));

                dt.Rows.Add("show", 1);
                dt.Rows.Add("show", 2);
                dt.Rows.Add("hide", 3);

                dv = new DataView(dt);

 

                radGridView1.ItemsSource = dv;

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }

                       
        }

    }
}

Stefan Dobrev
Telerik team
 answered on 23 Jul 2009
3 answers
123 views
Hello,

I have a small issue with a dataview and selecting a row while being in edit mode in a cell.

Below is the code-
If I start the below app, double click into one of the visible cells and than press on the
"ClickMe" button, the RowFilter is changed by code, the last line become visible, however
it is not selected even due I try to do so.

If I press again on the button,  the row is then selected.

Any ideas ?

Thanks,

Erez

P.S: "RadControls for WPF Q1 2009 SP2"




<Window x:Class="WpfToTelerikForum.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="333" Width="639" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <StackPanel Orientation="Vertical">
        <telerik:RadGridView Margin="12,20,-12,-20"
                             Name="radGridView1"
                             Loaded="radGridView1_Loaded" />
        <Button Margin="8" Height="50" Width="50" Content="ClickMe" Click="Button_Click"/>
    </StackPanel>
</Window>

 

 

using System;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.GridView;
using Telerik.Windows.Data;

namespace WpfToTelerikForum
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
        }

        private void radGridView1_Loaded(object sender, RoutedEventArgs e)
        {
            DataTable dt = new DataTable();
            DataView dv;

            dt.Columns.Add("Display", typeof(string));
            dt.Columns.Add("Number", typeof(int));

            dt.Rows.Add("show", 1);
            dt.Rows.Add("show", 2);
            dt.Rows.Add("hide", 3);

            dv = new DataView(dt);

            dv.RowFilter = "Display = 'show'";

            radGridView1.ItemsSource = dv;

        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            DataTable dt;
            DataView dv;

            dv = ((DataView)radGridView1.ItemsSource);
            dt = dv.Table;

            dt.Rows[dt.Rows.Count-1]["Display"] = "show";

            radGridView1.Records[radGridView1.Records.Count-1].IsSelected = true;
        }
    }
}

 

 

Rossen Hristov
Telerik team
 answered on 23 Jul 2009
5 answers
343 views
Hello,
I tried different binding method with you gridview and i was able to make it work.
I'd like to see a sample project(wpf web project) using this scenario:
objectdataprovider using as datacontext a linqtosql class with the ability to update , delete and insert.

Thanks
Regards
Stefan Dobrev
Telerik team
 answered on 23 Jul 2009
1 answer
97 views
Hi,

Is there a way to rotate the 3D chart x-axis labels?

This works for a 2D chart, but does not rotate the 3D charts...

chart.DefaultView.ChartArea.AxisX.LabelRotationAngle = 90;


Thanks,
Pauly
Vladimir Milev
Telerik team
 answered on 22 Jul 2009
1 answer
122 views
    public class Subclass : RadTreeViewItem 
    { 
    } 
<telerik:RadTreeView> 
        <local:Subclass Header="Group -1"/> 
</telerik:RadTreeView> 
Everything compiles, runs, I just see no Item in the TreeView...I shouldn't have to override the metadata for the DefaultStyleKey should I; it should just inherit by default. 
Bobi
Telerik team
 answered on 21 Jul 2009
8 answers
164 views
Not sure if this is supposed to happen but....

I have set the validation mode to "row" and created the even handler for grdviewRas_RowEditEnded

everything seems fine as I create a new row and begin entering data however one of the columns is a date. When I click on the date picker and select a date the RowEditEnded event fire even though I still need to enter more data.

Is this something I am doing wrong?

Cheers,
Kevin. 
Rossen Hristov
Telerik team
 answered on 21 Jul 2009
4 answers
101 views
Hi

I bound a RadPanelBar to a object structure like this:
- MyObject1.1 
    - MyObject2.1 
    - MyObject2.2 
- MyObject1.2 
- MyObject1.3 
    - MyObject2.3 
    - MyObject2.4 

it seems now, that empty PanelBarItems does not expand out of the box. so if I click on the header of the item "MyObject1.2" it does not expand nor the currently expanded one does collapse. I already figured out that i can catch the event "Selected" of the RadPanelBar to expand the item by myself:
private void RadPanelBar_Selected(object sender, RadRoutedEventArgs e) { 
    RadPanelBarItem selItem = e.OriginalSource as RadPanelBarItem; 
 
    if (selItem.Items.Count == 0) 
        selItem.IsExpanded = true

this works quite well, except that I am not able to collapse the last selected item. So my questions are:
- is there a better way to expand empty items?
- how can i collapse the items manually?

thanks
Simon
Simon Stahl
Top achievements
Rank 1
 answered on 20 Jul 2009
3 answers
69 views
Do the WPF controls support UI Automation? I see mention of it for Silverlight, but not WPF. Thanks.

Greg
Greg
Top achievements
Rank 1
 answered on 20 Jul 2009
1 answer
116 views


do you have any samples of wpf charts where the data comes from a sql data using linq ?

thanks,

martin
Vladimir Milev
Telerik team
 answered on 20 Jul 2009
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
Security
VirtualKeyboard
HighlightTextBlock
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?