Telerik Forums
UI for WPF Forum
1 answer
359 views
I have a column that is stored in SQL as a bigint and represents a Timespan duration (ticks). How do I format it to show hours, minutes and seconds.

Thanks
Dimitrina
Telerik team
 answered on 04 Sep 2012
8 answers
277 views
Hi,

I have window with a RadGrid, bound to a collection of products. The Product domain object implements INotifyPropertyChanged and IDataErrorInfo(all my validation rules resides within my domain objects).

Problem : When I change a field and tab out, the validation rule fails. This works fine, but my radgridcell renders multiple red borders(adorners) within the cell.

I looked at the online sample code. When I remove the IDataErrorInfo from my domain object, and implement the CellValiding event on my window code behind, this issue seems to be resolved. I dont like this option, because I want my validation logic in my domain.

How do I solve the above mentioned issues. Is it possible to style my gridrow, gridcells to hide some of the inner borders?

Regards
Kumar
Top achievements
Rank 1
 answered on 04 Sep 2012
1 answer
738 views
Hello!
How to set RadGridView RowStyle property programmatically, from code behind?

My case is to change style of all grid rows, even after conect new data source, to new style, dynamicly while using my application.
Kind regards,
Nick
Telerik team
 answered on 04 Sep 2012
1 answer
173 views
Hi,

i would like to realize a scenario with multiple levels of hierarchy as shown in the little sketch in the attachment.
Some facts:
 - multiple levels of hierarchy possible (but not the same depth for all categories)
 - ColumnHeaders (of item) only once at the top of the grid
 - Category-Rows should show some aggregated values
 
I tried the nested grid feature but it has some major drawbacks:
 - ColumnHeader of categories
 - New ColumnHeader for every child grid

Furthermore i tried the grouping feature, but this didn't work as well, AFAIK because:
 - Grouping has to be explicit for all items and not "recursive" as needed in my scenario

Is there any possiblity I could achieve the structure in the attachment with the GridView or any other control (maybe TreeListView!?)

Many thanks in advance,

René 
Nick
Telerik team
 answered on 04 Sep 2012
2 answers
140 views
Hi,

I've created a new object that derives from Appointment (named RequestAppointment) and overrides the "End" property (I've made sure to include OnPropertyChange("End") in it's set accessor). When I change this value I would expect the appointment on my ScheduleView to update, and when I breakpoint the code it steps through the set accessor then the get accessor is called and the "End" property value being returned is what I expect, yet it does not reflect in my ScheduleView.

I am bound to a collection of RequestAppointment objects in a viewmodel (xaml: AppointmentsSource="{Binding Appointments}"). Can I check with you that the end date of an appointment in ScheduleView is indeed bound to the "End" property of the appointment object and if I change "End" and raise property-changed on it I should expect the ScheduleView to update?

Thanks
Peter
Top achievements
Rank 1
 answered on 04 Sep 2012
3 answers
74 views
I have been given a task to make a control for project that needs to function like a movie editor control. I need to be able to do the following:
  1. Add events to the timeline via drag and drop. Events being added will be of a specified type.
  2. Adjust the time that the event is ongoing for
  3. Detect when an event overlaps and move it to the next line where applicable
  4. Click on an event and open a editor
  5. Shade portions of the timeline to correspond to portions of a scenario. I would like for the user to be able to adjust the durations of the phase via click and drag.

My first thought was to use the gnatt control and adjust the axis and have each task be the type of event that the user can do.Unfortunately the gnatt chart does not support multiple items for a single task so that will not work. Are there any controls in the suite that could support most of this functionality?

Thanks!
Ivo
Telerik team
 answered on 03 Sep 2012
5 answers
133 views
I'm building a timesheet application.  The timesheet periods are variable in length.  If the timesheet is for the first half of the month (1st through the 15th), then there are 15 date columns.  If it's for the second half of the month, then there could be 13 - 16 date columns, depending on what month it is and if it is a leap year.

Because the column header's are kind of complex, I'm choosing to pre-populate the GridView's columns with 16 date columns in xaml, then depending on what month it is etc., I delete n columns.  

The problem is that when I delete a column, it messes up my footer for the last column which is a total column.

It's probably easiest to understand if you see it in action.  To that end, I've created a very simplified version, with the code pasted below.  Just load it up, then press the Delete Column button.  You'll see what I mean.

xaml:
<Window x:Class="NMTimesheetUI.GridTest"
        Title="GridTest" Height="300" Width="600">
    <StackPanel Margin="10">
        <Button HorizontalAlignment="Right" Content="Delete Column" x:Name="btnDeleteColumn" Margin="0,0,0,10" Click="btnDeleteColumn_Click" />
        <telerik:RadGridView x:Name="gvTest" CanUserSortColumns="False" ShowColumnFooters="True" RowIndicatorVisibility="Visible" IsFilteringAllowed="False"
                             CanUserFreezeColumns="False" ShowInsertRow="False" AllowDrop="False" AutoGenerateColumns="False" CanUserDeleteRows="True" CanUserInsertRows="False"
                             CanUserResizeColumns="True" CanUserReorderColumns="False" GridLinesVisibility="Both" ShowGroupPanel="False" ShowColumnHeaders="True">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding jobName}" Width="110*" HeaderTextAlignment="Center" />
 
                <telerik:GridViewDataColumn Header="Mon" DataMemberBinding="{Binding hours1, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" Width="40" HeaderTextAlignment="Center">
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction Caption="" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>
 
                <telerik:GridViewDataColumn Header="Tue" DataMemberBinding="{Binding hours2, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" Width="40" HeaderTextAlignment="Center">
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction Caption="" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>
 
                <telerik:GridViewDataColumn Header="Wed" DataMemberBinding="{Binding hours3, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" Width="40" HeaderTextAlignment="Center">
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction Caption="" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>
 
                <telerik:GridViewDataColumn Header="Thu" DataMemberBinding="{Binding hours4, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" Width="40" HeaderTextAlignment="Center">
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction Caption="" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>
 
                <telerik:GridViewDataColumn Header="Fri" DataMemberBinding="{Binding hours5, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" Width="40" HeaderTextAlignment="Center">
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction Caption="" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>
 
                <telerik:GridViewDataColumn Header="Sat" DataMemberBinding="{Binding hours6, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" Width="40" HeaderTextAlignment="Center">
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction Caption="" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>
 
                <telerik:GridViewDataColumn Header="Sun" DataMemberBinding="{Binding hours7, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" Width="40" HeaderTextAlignment="Center">
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction Caption="" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>
 
                <telerik:GridViewDataColumn Header="Total" DataMemberBinding="{Binding totalHours, Mode=OneWay}">
                 
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction Caption="" SourceField="totalHours" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
 
 
                </telerik:GridViewDataColumn>
                 
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </StackPanel>
</Window>

code:
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;
 
namespace NMTimesheetUI
{
    /// <summary>
    /// Interaction logic for GridTest.xaml
    /// </summary>
    public partial class GridTest : Window
    {
        public GridTest()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(GridTest_Loaded);
        }
 
        void GridTest_Loaded(object sender, RoutedEventArgs e)
        {
            List<GridEntry> entries = GridEntry.getEntries();
            gvTest.ItemsSource = entries;
        }
 
        private void btnDeleteColumn_Click(object sender, RoutedEventArgs e)
        {
            int lastColumnIndex = gvTest.Columns.Count - 2;
            gvTest.Columns.RemoveAt(lastColumnIndex);
        }
    }
 
    public class GridEntry
    {
        #region Members
 
        public string jobName { get; set; }
        public decimal hours1 { get; set; }
        public decimal hours2 { get; set; }
        public decimal hours3 { get; set; }
        public decimal hours4 { get; set; }
        public decimal hours5 { get; set; }
        public decimal hours6 { get; set; }
        public decimal hours7 { get; set; }
 
        public decimal totalHours
        {
            get
            {
                return hours1 + hours2 + hours3 + hours4 + hours5 + hours6 + hours7;
            }
        }
 
        #endregion
 
        #region static Members
 
        public static List<GridEntry> getEntries()
        {
            List<GridEntry> entries = new List<GridEntry>();
            GridEntry john = new GridEntry {
                jobName = "John Lennon",
                hours1 = 1, hours2 = 2, hours3 = 3, hours4 = 4, hours5 = 5, hours6 = 0, hours7 = 0
            };
            entries.Add(john);
 
            GridEntry george = new GridEntry
            {
                jobName = "George Harrison",
                hours1 = 1,
                hours2 = 2,
                hours3 = 3,
                hours4 = 4,
                hours5 = 5,
                hours6 = 0,
                hours7 = 0
            };
            entries.Add(george);
 
 
            GridEntry paul = new GridEntry
            {
                jobName = "Paul McCartney",
                hours1 = 1,
                hours2 = 2,
                hours3 = 3,
                hours4 = 4,
                hours5 = 5,
                hours6 = 0,
                hours7 = 0
            };
            entries.Add(paul);
 
            GridEntry ringo = new GridEntry
            {
                jobName = "Ringo Starr",
                hours1 = 1,
                hours2 = 2,
                hours3 = 3,
                hours4 = 4,
                hours5 = 5,
                hours6 = 0,
                hours7 = 0
            };
            entries.Add(ringo);
 
 
            return entries;
        }
 
        #endregion
 
 
    }
}

Thanks!

Aaron
Yoan
Telerik team
 answered on 03 Sep 2012
5 answers
395 views
Hi,
I have a Grid nested inside another one using RadGridView.ChildTableDefinitions. I cannot make the nested grid to fit it's columns to the width of the parent so that I don't have scroll bars (please see screenshot). I tried setting ColumnWidth to "Auto" for both grids but this didn't help.
Yoan
Telerik team
 answered on 03 Sep 2012
3 answers
176 views
Hi

I have an application where I need to have nesting levels of RadDocking currently I have to set the AllowUnsafeMode to true in the inner RadDocking in order to be able to use it without an exception.

I am using RadControls 0422 is this problem solve in the latest 0521 internal build?

Thanks

Ariel
Yana
Telerik team
 answered on 03 Sep 2012
3 answers
54 views
Hi, I would like to upgrade our scheduler product to the latest version, is there any step by step documentation? Is it backward compatible? I'm using RadSchedulerView Thanks
Vladi
Telerik team
 answered on 03 Sep 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
DataPager
PersistenceFramework
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?