Telerik Forums
UI for WPF Forum
2 answers
186 views

Greetings,

I have a problem with RadScheduleView (WPF). I am starting with it and I have read from you documentation that if I make double click on the schedule view then "create dialog" should appear but i does not. Edit dialog and Delete dialog for existing event will appear but create dialog never shows. I have very easy application. I just put RadScheduleView from toolbox and made binding.

You can see it at the bottom

Could you tell me what I am doing wrong?

Thanks

Dusan Hudecek

MainWindows.xaml:

<Window x:Class="SchedulerWPF2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
<Grid>
<telerik:RadScheduleView AppointmentsSource="{Binding Appointments}" HorizontalAlignment="Left" Margin="10,10,0,0" Name="radScheduleView1" VerticalAlignment="Top">
<telerik:RadScheduleView.ViewDefinitions>
<telerik:DayViewDefinition />
<telerik:WeekViewDefinition />
<telerik:MonthViewDefinition />
<telerik:TimelineViewDefinition />
</telerik:RadScheduleView.ViewDefinitions>
</telerik:RadScheduleView>
</Grid>
</Window>

MainWindow.xaml.cs:

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.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

using Telerik.Windows.Controls.ScheduleView;
using Telerik.Windows.Controls;
using Telerik.Windows.Data;

namespace SchedulerWPF2
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public DataContext dc = new DataContext();
public RadObservableCollection<IAppointment> Appointments { get { return dc.Appointments; } set { dc.Appointments = value; } }

public MainWindow()
{
InitializeComponent();

dc.Appointments = new RadObservableCollection<IAppointment>();
this.DataContext = dc;

Appointment a = new Appointment();
a.Start = DateTime.Now;
a.End = DateTime.Now.AddHours(1);
a.Subject = "test";

dc.Appointments.Add(a);
}
}

public class DataContext
{
public RadObservableCollection<IAppointment> Appointments { get; set; }
}
}

Dusan
Top achievements
Rank 1
 answered on 03 Sep 2012
3 answers
319 views
I'm already modifying the look of the GridViewHeaderCell using a Style resource in my WPF desktop application. I would now like to move the sorting arrow from its default position at the top of the header cell to the right of the header cell.  Can this be done by setting a property or two?  I'd prefer to stay away from Expression Blend.  Thanks.

        <Style TargetType="{x:Type telerik:GridViewHeaderCell}">
            <Setter Property="Foreground" Value="White" />
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,0.971" StartPoint="0.5,0.042">
                        <GradientStop Color="#26FFFFFF" Offset="0" />
                        <GradientStop Color="#00FFFFFF" Offset="1" />
                        <GradientStop Color="#26FFFFFF" Offset="0.467" />
                        <GradientStop Color="#00FFFFFF" Offset="0.475" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Width" Value="Auto" />
            <!-- Any setter properties I can put here to move the sorting arrow?  -->
        </Style>


Vanya Pavlova
Telerik team
 answered on 03 Sep 2012
4 answers
203 views
I had issues when trying to copy and paste custom annotations, where the first annotation being copied wouldn't copy its properties.
This was answered by Iva the telerik Admin in one of my support tickets, so I thought I would share the code so that others can benefit from it.


Please use this code in your semantic range start class if you need to copy custom annotations (you will need to change Product & Name to whatever suits your custom annotation properties). Leave CopyContentFromOverride empty.

protected override void CopyContentFromOverride(DocumentElement fromElement)
{
}
  
  
  
protected override void CopyPropertiesFromOverride(DocumentElement fromElement)
{
    base.CopyPropertiesFromOverride(fromElement);
 
    //Your properties to copy here
    this.Name = ((SemanticRangeStart)fromElement).Name;
    this.Product = ((SematicRangeStart)fromElement).Product;
}

I hope this helps you as it did me.

Thanks,

Rob

*** Sorry for the typo. The title should be custom not custome ***
Iva Toteva
Telerik team
 answered on 03 Sep 2012
0 answers
96 views
Hi Team,
        I inherit a usercontrol from Telerik:Control(TextBox). I want to set Partial DataBinding for MaskedText Property in my code (at UserControl definition). This code include Binding ValidationRule. Remaining Binding (DataBiniding like ElementName and Path) in Xaml Code. Is this possible. If yes can you please send me sampleCode??
Kamran
Top achievements
Rank 3
Iron
Iron
Veteran
 asked on 02 Sep 2012
0 answers
152 views
RadGridView.FrozenColumnCount is not a dependencyproperty so doesn't support databinding. Is there an event that is fired when FrozenColumnCount changes so I can create a workaround?
Erik
Top achievements
Rank 1
 asked on 02 Sep 2012
4 answers
159 views
Hi,

I haven't attempted this yet but, do you have any advice on the best way to highlight any text that is NOT contained within Custom Annotations?

i.e. what do you think is the most efficient check process to find and highlight all text not contained within annotations?

Thanks for your time, any advice is appreciated,

Rob 
Iva Toteva
Telerik team
 answered on 31 Aug 2012
0 answers
96 views
How Find Child controls in RadGridView once code behind class contructor executed InitializeComponent() method.
 
When I wanted to find Child controls in the RadGridView it returns null. I came to know that once I click on any button then I can find the child controls of the RadGridView but my requirement is find child controls after InitializeComponent() method executed and update their values as per business rules.

Please help me
Laxman

Laxman
Top achievements
Rank 1
 asked on 31 Aug 2012
0 answers
175 views

So I have a dynamic RadGridView using MVVM and Caliburn Micro. This means that I add Columns programmatically to the control. basically like this:

for (int i = 0; i < length; i++)
{
    Binding b = new Binding(string.Format("Collection[{0}].ValueIWant", i));
    binding.StringFormat = "{0:0.##}";
    GridViewDataColumn column = new GridViewDataColumn()
    {
        Header = HeaderFor(i),
        DataMemberBinding = b,
        DataType = typeof(double?)
    };

    Control.columns.Add(column);
}

Now I need to add new lines that show the percentage between line 1 and 22 and 3 and so on.

I've managed to do that but I'm not sure how I would manage to change the String.format specifically for those cells instead of the whole column.

CellTemplateSelector came to mind but I'm not sure that is a good idea as this might mean I have to set the binding again, not knowing the value of i and such. Also I only want to change the string.format on the binding.

As I'm manipulating the number as a double (0,5 is 50%, 50 is 5000%) I guess I have to mask the input as well. not sure if String.Format does that for me as well or if I should use RadMaskedInput

Ingólfur
Top achievements
Rank 1
 asked on 31 Aug 2012
6 answers
718 views
I am having a problem displaying the context menu RadContextMenu with Icon, I am using dynamic binding to observable collection, which contains context menu items (Text and Icon), I am following this tutorial "Dynamic Binding", following is my XAML.

<Style x:Key="MenuItemStyle" TargetType="{x:Type telerik:RadMenuItem}">
                <Setter Property="Icon">
                    <Setter.Value>
                        <Image Source="{Binding IconPath, Converter={StaticResource pathtoimage}}" />
                    </Setter.Value>
                </Setter>
            </Style>
 
            <HierarchicalDataTemplate x:Key="MenuItemTemplate">
                <telerik:RadButton Content="{Binding Title}" HorizontalContentAlignment="Left" Background="Transparent" BorderBrush="Transparent" />
            </HierarchicalDataTemplate>

and following is the XAML of RadGridView, on which context menu is placed.

<telerik:RadGridView x:Name="myGridView" AutoGenerateColumns="False" ItemsSource="{Binding GridData}" VerticalAlignment="Top">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Result}" Header="Result"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Category}" Header="Category"/>
            </telerik:RadGridView.Columns>
            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu ItemsSource="{Binding ContextMenuItems}" ItemContainerStyle="{StaticResource MenuItemStyle}" ItemTemplate="{StaticResource MenuItemTemplate}">                 
                </telerik:RadContextMenu>

View Model is as follows
class MainViewModel
    {
        private ObservableCollection<MenuItemObj> menuitems_;
        public ObservableCollection<MenuItemObj> ContextMenuItems
        {
            get
            {
                return menuitems_;
            }
            set
            {
                menuitems_ = value;
            }
        }
 
        private ObservableCollection<GridRowDataObj> griddata_;
        public ObservableCollection<GridRowDataObj> GridData
        {
            get
            {
                return griddata_;
            }
            set
            {
                griddata_ = value;
            }
        }
    }
 
    public class MenuItemObj
    {
        public string Title { get; set; }
        public string IconPath { get; set; }
    }
 
    public class GridRowDataObj
    {
        public string Result { set; get; }
        public string Category { set; get; }
    }

and setting DataContext as

//TODO
            ObservableCollection<GridRowDataObj> gd = new ObservableCollection<GridRowDataObj>();
            gd.Add(new GridRowDataObj() { Result = "Matric", Category = "SSC" });
            gd.Add(new GridRowDataObj() { Result = "FSc", Category = "HSSC" });
            gd.Add(new GridRowDataObj() { Result = "FA", Category = "HSSC" });
 
            //TODO
            ObservableCollection<MenuItemObj> mi = new ObservableCollection<MenuItemObj>();
            mi.Add(new MenuItemObj() { Title = "My Item 1", IconPath = "/Images/item1.png" });
            mi.Add(new MenuItemObj() { Title = "My Item 2", IconPath = "/Images/item2.png" });
            mi.Add(new MenuItemObj() { Title = "My Item 3", IconPath = "/Images/item3.png" });
 
            MainViewModel mvm = new MainViewModel();
            mvm.ContextMenuItems = mi;
            mvm.GridData = gd;
 
            this.DataContext = mvm;

What I am getting is like this as in attached file "Menu_Image.png"

I am not sure why the icons for first and second menu items are not displayed, I have checked that the icon is displayed for last menu item only. I have complete project replicating this scenario, I can send you if required, Please help me out?



Muhammad Ummar
Top achievements
Rank 1
 answered on 31 Aug 2012
1 answer
93 views
How   to  label   data  with  "radmap"???

Quetion  one:
     How   to  use  a  pins   which   has  a  tag   to    mark   information???


Quetion  two:

     How   to  mark   the    "Energy  consumption   data"    and    "Water    consumption   data"   on  every  building  of  the  map???   
     Such  as  the  picture  attechment...

    The  picture... 
Andrey
Telerik team
 answered on 31 Aug 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?