Telerik Forums
UI for WPF Forum
1 answer
755 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
188 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
145 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
80 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
137 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
407 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
184 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
4 answers
159 views
I'm trying out my WPF app on the tablet I received at the last MS Build conference with the Windows 8 Consumer Preview.

The one big usability enhancement I noticed that works very well in all the windows controls / applications is the finger can be used to scroll the contents up and down (like windows explorer, anything with a scroll-able list).

I noticed my Telerik controls do not do this -- they always fire selection events and don't scroll up and down.

Is there any particular events I should be or should not be capturing for the GridView to act as expected?

Thanks -- Chad

p.s. you can see the same behavior here: http://demos.telerik.com/silverlight/#GridView/UIVirtualization 
Pavel Pavlov
Telerik team
 answered on 03 Sep 2012
3 answers
117 views
I want to split my xaml on 2 seperate screens and when i'm trying to add two raddocking controls to one xaml i got exception. is there any option to do that?
Yana
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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?