Telerik Forums
UI for WPF Forum
1 answer
112 views
Hello Telerik,

I would be grateful if you could answer me on the following question: Does Coded UI recognize and fully support the following WPF Rad controls:
  1. RadDatePicker
  2. RadMaskedTextBox
  3. RadGridView
  4. RadTreeView
  5. RadTreeListView
  6. RadOutlookBar
  7. RadTimePicker
  8. RadComboBox
  9. RadBusyIndicator
  10. RadTileView
  11. RadChart
  12. RadCalendar
  13. RadColorPicker
  14. RadProgressBar

I look forward to hearing from you at your earliest convenience.

Thank you.

Stas.
Yordanka
Telerik team
 answered on 03 Jul 2012
6 answers
353 views
I have a scenario where one column in the table is a timestamp (date + time). I have my grid column configured as follows:

<telerik:GridViewDataColumn
        UniqueName="Timestamp"
        DataMemberBinding="{Binding Timestamp}"
        Header="Timestamp"
        DataFormatString="{} {0:MM/dd/yyyy HH:mm:ss}"
        IsFilterable="False" />

The property is coded as:
public DateTime? Timestamp
{
    get
    {
        ... returns either NULL or datetime object
    }
    set
    {
        _timestamp = value;
    }
}

The display part is working fine: an example of the value displayed is:  12/20/2020 18:40:00

The problem I have is when adding a new row or editing an existing row. When adding a new row, the grid displays an empty row, and if I type in "12/20/2020 18:40:00" and tab out of the column to go to the next column, the timestamp column value is set to NULL (when putting a breakpoint on setter) and the timestamp I entered is wiped out. If I just type the date part (12/20/2020) and tab out, things work fine: the value is set correctly and the column displays "12/20/2020 00:00:00".  I observe similar behavior when trying to edit a row. Do I need to specify a mask, a converter, or something else to get the column to properly accept the timestamp?

Thanks

Andrey
Eric
Top achievements
Rank 1
 answered on 03 Jul 2012
1 answer
99 views
I have a gantt chart wherein the time is measured in days, at the finest level.  So time is not necessary for me.

I am using RadDateTimePicker controls for start/end, and I can control their behavior (limit to days input) by setting the attribute:

 InputMode="DatePicker"

So, basically, if CustomResizeBehavior|CustomDragDropBehavior is turned on, I would like the resizing or dragging of a gantt task to lock to days, and not fall to times in between days.  Is there any way to accomplish this behavior?
Ventzi
Telerik team
 answered on 03 Jul 2012
0 answers
182 views
I'm seeing the following behavior with the DateTimePicker when InputMode=TimePicker.

  1. With cursor in textbox, hit down arrow to open time picker popup.
  2. Then hit tab key to move focus to list of selectable times
  3. Keep hitting tab until focus is on the time you would like to select
  4. Hit enter.  Popup closes but time was NOT selected.  Appears that only a mouse click will select a time.  Is there a setting that will enable selecting a time with the keyboard?

Also,

  1. With cursor in textbox, hit down arrow to open time picker popup.
  2. Then hit tab key to move focus to list of selectable times
  3. Keep hitting tab until focus is on the time you would like to select
  4. Hit enter and popup closes.
  5. Hit down arrow to open time picker.  
  6. Hit tab key to move focus to a selectable time.  Focus does not move to list of times.  How can I get the focus back into the popup to select a time with the keyboard?

Thanks in advance!



Ed
Top achievements
Rank 1
 asked on 03 Jul 2012
1 answer
152 views
Hi

I would like to drag-and-drop an Appointment from ScheduleView to a ListView. The (visual) effect should be that it drags a copy of it, leaving the item in ScheduleView intact. I've followed the example for ScheduleView Drag-and-Drop, and everything works except the item being removed from ScheduleView. How do you recommend I go about this?
-- 
Sincerely, 
Christian
Konstantina
Telerik team
 answered on 03 Jul 2012
2 answers
751 views
I am using Radgridview which has AutoGenerateColumns= "true" and binding it to a Datatable. Now based on conditions I have to add a border around the entire column red/green/blue. Different columns can have different colored border. Can you please suggest an approach to it.
Minal
Top achievements
Rank 1
 answered on 03 Jul 2012
1 answer
188 views
I am using RadDateTimePicker controls for Start/End columns in the RadGanttView:

            <telerik:RadGanttView.Columns>
                <telerik:TreeColumnDefinition Header="Title" />
                <telerik:ColumnDefinition MemberBinding="{Binding MyFormattedStart}" Header="Start" ColumnWidth="100" >
                    <telerik:ColumnDefinition.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadDateTimePicker SelectedValue="{Binding Start, Mode=TwoWay}" 
                                                       InputMode="DatePicker" />
                        </DataTemplate>
                    </telerik:ColumnDefinition.CellEditTemplate>

and the same for End...I have to click two times in the cell before the DropDown control displays so that I may use the control to change the value. 

I would like to click only once.  It is not intuitive to have to click again.

I did notice if I do this on the same row, e.g., changed the Start date with the DropDown, I can then go to the End column and just click one time to use the DropDown for that cell.

So, I guess the first click is required to select the row, and then once the row is selected, another click to display the DropDown.

Is there any way to configure the control/cell such that a single click in a Start or End cell selects the row *and* displays the DropDown?

Thanks, nelson
Miroslav Nedyalkov
Telerik team
 answered on 03 Jul 2012
4 answers
115 views
I have the following issue:

I am binding a radgridview to a viewmodel and am currently not using the code behind and taking care of all the logic in the VM.

There is an "Apply" button bound to an IsDirty property being set once data changes in any of the bound items in the radgridview - this
is done via propertychanged events etc.

If I edit a value and click "apply" without clicking anywhere else, the edited value isn't commited to the bound model and apply doesn't
take the latest/most up to date value.

The closest thing I could find in forums is: http://www.telerik.com/community/forums/winforms/gridview/rowstate-question.aspx
but that didn't really help me.

Do you have any suggestions how I can get this to work, without breaking my design pattern.
Dimitrina
Telerik team
 answered on 03 Jul 2012
4 answers
154 views
Hello,
I am trying to setup a data drill down simiar to the provided example. But I am facing the problem that the ItemToolTipOpening event is not fired when I place the mouse on a chart point.
Here is the code that I am using:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
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.Shapes; 
using Telerik.Windows.Controls.Charting; 
using AppointmentScheduler; 
using Telerik.Windows.Data; 
using System.Globalization; 
using Telerik.Windows.Controls; 
 
namespace AppointmentSchedulerUI 
    /// <summary> 
    /// Interaction logic for ChartWorkingHours.xaml 
    /// </summary> 
    public partial class ChartWorkingHours : Window 
    { 
        private AppointmentScheduler.AppointmentScheduler m_AppointmentScheduler; 
        private Dictionary<string, Employee> m_Employees; 
 
 
        public ChartWorkingHours(Dictionary<string, Employee> employees, AppointmentScheduler.AppointmentScheduler appointmentScheduler) 
        { 
            m_AppointmentScheduler = appointmentScheduler; 
            m_Employees = employees; 
 
            InitializeComponent(); 
            CountriesBox.ItemsSource = employees.Values; 
 
            m_CB_Year.ItemsSource = new int[]{2009, 2010, 2011, 2012};             
             
            List<string> monthNames = new List<string>(); 
            monthNames.Add("Komplettes Jahr"); 
            for (int i=1; i<=12; i++) 
                monthNames.Add(CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(i)); 
            m_CB_Month.ItemsSource = monthNames;             
 
            m_RadChart.DefaultView.ChartLegend.Header = ""
            m_RadChart.DefaultView.ChartLegendPosition = Dock.Bottom; 
 
            SeriesMapping seriesMapping1 = new SeriesMapping(); 
            seriesMapping1.LegendLabel = "Abgerechnete Arbeitsstunden"
            seriesMapping1.SeriesDefinition = new BarSeriesDefinition(); 
            ItemMapping itemMapping1 = new ItemMapping(); 
            itemMapping1.DataPointMember = DataPointMember.YValue; 
            itemMapping1.FieldName = "WorkedHours"
            ItemMapping itemMapping2 = new ItemMapping(); 
            itemMapping2.DataPointMember = DataPointMember.XCategory; 
            itemMapping2.FieldName = "ShortName"
            seriesMapping1.ItemMappings.Add(itemMapping1); 
            seriesMapping1.ItemMappings.Add(itemMapping2); 
            m_RadChart.SeriesMappings.Add(seriesMapping1);                   
                         
            SeriesMapping seriesMapping2= new SeriesMapping(); 
            seriesMapping2.LegendLabel = "Bezahlte Arbeitsstunden"
            seriesMapping2.SeriesDefinition = new BarSeriesDefinition(); 
            ItemMapping itemMapping3 = new ItemMapping(); 
            itemMapping3.DataPointMember = DataPointMember.YValue; 
            itemMapping3.FieldName = "PaidHours"
            ItemMapping itemMapping4 = new ItemMapping(); 
            itemMapping4.DataPointMember = DataPointMember.XCategory; 
            itemMapping4.FieldName = "ShortName"
            seriesMapping2.ItemMappings.Add(itemMapping3); 
            seriesMapping2.ItemMappings.Add(itemMapping4); 
            m_RadChart.SeriesMappings.Add(seriesMapping2); 
             
            m_CB_Year.SelectedItem = DateTime.Now.Year; 
            m_CB_Month.SelectedIndex = 0; 
            m_CB_Year.SelectionChanged +=new SelectionChangedEventHandler(TimeSpanModified); 
            m_CB_Month.SelectionChanged += new SelectionChangedEventHandler(TimeSpanModified); 
 
            m_RadChart.DefaultView.ChartArea.ItemToolTipOpening += this.ChartItemToolTipOpening; 
 
            UpdateData(); 
        } 
 
 
 
 
 
        private void ChartItemToolTipOpening(ItemToolTip2D tooltip, ItemToolTipEventArgs args) 
        { 
            RadChart chart = new RadChart(); 
            chart.Height = 200; 
            chart.Width = 300; 
 
            chart.DefaultView.ChartLegend.Visibility = System.Windows.Visibility.Collapsed; 
            chart.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Inside; 
            string axisItemLabel = m_RadChart.DefaultView.ChartArea.AxisX.TickPoints[args.ItemIndex].Label; 
            chart.DefaultView.ChartTitle.Content = string.Format("Quarterly Preview: {0}", axisItemLabel); 
 
            chart.DefaultView.ChartArea.AxisY.DefaultLabelFormat = "C"
 
            DataSeries series = new DataSeries(); 
            series.Definition = new LineSeriesDefinition(); 
            series.Definition.ShowItemLabels = false
            //SeriesExtensions.FillWithSampleData(series, 4, (int)args.DataPoint.YValue); 
 
            string[] quarters = new string[] { "Q1""Q2""Q3""Q4" }; 
 
            for (int i = 0; i < chart.DefaultView.ChartArea.AxisX.TickPoints.Count; i++) 
                series[i].XCategory = quarters[i]; 
 
            //for (int i = 0; i < series.Count; i++) 
            //    quarterlyRevenues[i] = series[i].YValue; 
 
            chart.DefaultView.ChartArea.DataSeries.Add(series); 
 
            tooltip.Content = chart; 
        } 
 
 
 
 
 
        private void UpdateData() 
        { 
            int selectedYear = (int)m_CB_Year.SelectedItem; 
            string selectedMonthString = (string)m_CB_Month.SelectedItem; 
            bool wholeYear = false
            int selectedMonth = 0; 
            if (selectedMonthString == "Komplettes Jahr"
                wholeYear = true
            else 
                selectedMonth = DateTime.ParseExact(selectedMonthString, "MMMM", CultureInfo.CurrentCulture).Month; 
 
            DateTime startTime; 
            DateTime endTime; 
            if (wholeYear) 
            { 
                startTime = new DateTime(selectedYear, 1, 1); 
                endTime = new DateTime(selectedYear + 1, 1, 1); 
            } 
            else 
            { 
                startTime = new DateTime(selectedYear, selectedMonth, 1); 
                endTime = new DateTime(selectedYear, selectedMonth, 1).AddMonths(1); 
            } 
 
            List<ChartData> chartData = new List<ChartData>(); 
            foreach (Employee emp in m_Employees.Values) 
            { 
                double workedHours = m_AppointmentScheduler.GetWorkedHours(startTime, endTime, emp); 
                double paidHours = m_AppointmentScheduler.GetPaidHours(startTime, endTime, emp); 
                chartData.Add(new ChartData(emp.FirstName, emp.LastName, workedHours, paidHours)); 
            } 
 
            m_RadChart.ItemsSource = chartData; 
        } 
 
        private void CheckBox_Checked(object sender, RoutedEventArgs e) 
        { 
            CheckBox sourceCheckbox = e.OriginalSource as CheckBox; 
            Queue<ChartFilterDescriptor> filtersToRemove = new Queue<ChartFilterDescriptor>(); 
 
            foreach (ChartFilterDescriptor descriptor in m_RadChart.FilterDescriptors) 
            { 
                if (descriptor.Value.Equals(sourceCheckbox.Content)) 
                    filtersToRemove.Enqueue(descriptor); 
            } 
 
            foreach (ChartFilterDescriptor descriptor in filtersToRemove) 
                m_RadChart.FilterDescriptors.Remove(descriptor); 
 
        } 
 
        private void CheckBox_Unchecked(object sender, RoutedEventArgs e) 
        { 
            CheckBox sourceCheckbox = e.OriginalSource as CheckBox; 
            m_RadChart.FilterDescriptors.Add(new ChartFilterDescriptor("FullName"typeof(string), FilterOperator.IsNotEqualTo, sourceCheckbox.Content)); 
        } 
 
        private void TimeSpanModified(object sender, SelectionChangedEventArgs e) 
        { 
            UpdateData(); 
        } 
    } 

I am custom classes which are connected via SeriesMapping.

Best regards,
Markus Demmler
Anitha
Top achievements
Rank 1
 answered on 03 Jul 2012
0 answers
100 views
I'm trying to sum a column using the sum aggregate function. What is the maximum value that I can have up to. I seem to be getting an overflow problem.
Oliver
Top achievements
Rank 1
 asked on 03 Jul 2012
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?