Telerik Forums
UI for WPF Forum
2 answers
80 views
I have a class that extends Appointment like so:
public class AppointmentTaskVm : Appointment
{
  private int _appointmentTaskId;
  private bool _isBasketItem;
  private int _position;
  private int? _taskId;
  public int AppointmentTaskId
  {
    get { return _appointmentTaskId; }
    set
    {
      _appointmentTaskId = value;
      OnPropertyChanged("AppointmentTaskId");
    }
  }
  public bool IsBasketItem
  {
    get { return _isBasketItem; }
    set
    {
      _isBasketItem = value;
      OnPropertyChanged("IsBasketItem");
    }
  }
  public int Position
  {
    get { return _position; }
    set
    {
      _position = value;
      OnPropertyChanged("Position");
    }
  }
  public int? TaskId
  {
    get { return _taskId; }
    set
    {
      _taskId = value;
      OnPropertyChanged("TaskId");
    }
  }
  public override IAppointment Copy()
  {
    var newAppointment = new AppointmentTaskVm();
    newAppointment.CopyFrom(this);
    return newAppointment;
  }
  public override void CopyFrom(IAppointment other)
  {
    var task = other as AppointmentTaskVm;
    if (task != null)
    {
      AppointmentTaskId = task.AppointmentTaskId;
      IsBasketItem = task.IsBasketItem;
      Position = task.Position;
      TaskId = task.TaskId;
    }
    base.CopyFrom(other);
  }
}

Dragging the AppointmentTaskVm from a ListBox to the ScheduleView causes the Copy and CopyFrom to fire multiple times. This results in the additional properties in the AppointmentTaskVm to loose thier values.

Subscribing to the AppointmentCreated event of the ScheduleView shows that the new AppointmentTaskVm additional properties are initialised with default values (instead of copying the values from the original AppointmentTaskVm).


David
Top achievements
Rank 1
 answered on 16 Apr 2011
6 answers
330 views

Hi,

I am trying to select values from a bounded combobox inside a GridView.
But after a select it and try to select other the previous selected value is not visible.

below is code in xaml :-
 

<telerik:RadGridView Margin="5,0,0,0" Grid.Row="4" Grid.ColumnSpan="2" Name="gvGISMapFields" Width="610" ShowColumnHeaders="True" ShowGroupPanel="False" Height="250">
<telerik:RadGridView.Columns>
<telerik:GridViewComboBoxColumn Name="MatchingField" DisplayMemberPath="MatchingField" UniqueName="MatchingField" HeaderText="Target Field"  IsFilterable="False" IsGroupable="False" IsReorderable="False" IsSortable="False" TextAlignment="Center" Width="250"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>

below is code in xaml.cs :-

GridViewComboBoxColumn matchingField = (GridViewComboBoxColumn)gvMapFields.Columns[1];
matchingField.ItemsSource = matchingGISFields;

Helio
Top achievements
Rank 2
 answered on 15 Apr 2011
3 answers
724 views
Hello,
    I have a checkbox column in my grid but it appears left justified. I want to center it but have not found the command or event where to do this.
Any help would be appreciated.
Thanks

Vanya Pavlova
Telerik team
 answered on 15 Apr 2011
1 answer
122 views
I am just starting out, and trying to use data binding to display a parent child relationship.

I need to first have the user select in a ComboBox my List of "Currency" objects and display in a Grid the related "CurrencyRates" collection of the selected currency object

I can see the list of currencies in the combo when I bind the ItemsSource property to the DataContext
<telerik:RadComboBox ItemsSource="{Binding}" DisplayMemberPath="Name" x:Name="cboCurrencyList"  />


I am not sure how to get a Grid to show the child collection CurrencyRates.... I've tried the code below but didn't work
Source="{Binding ElementName=cboCurrencyList, Path=SelectedValue}"/>

I am using EF4

Valeri Hristov
Telerik team
 answered on 15 Apr 2011
1 answer
58 views
Hi,

I'm trying to show a radgridview into a radtreelistview item.
Now i bind the treelistview with "Capitulos" Items and i have the next structure:

                 Capitulo 1
                        Capitulo 1.1
                               Capitulo 1.1.1
                 Capitulo 2
                 Capitulo 3


I need to show this one:

                    Capitulo 1
                        Capitulo 1.1
                            Product c
                            Product d
                            Product e
                                Capitulo 1.1.1
                                        Product a
                                        Product b
                    Capitulo 2
                    Capitulo 3
                        

        
Ivan Ivanov
Telerik team
 answered on 15 Apr 2011
2 answers
176 views
Hi Telerik,

I've had a somewhat similar thread sometime ago, but here is what I need to do:

Basically what I want to achieve is to add some custom object to the CalendarButtonContent for my DataTemplate to access.

I have created a template selector and finding that the given date is a Holiday, then returning my HolidayTemplate.

public class CalendarButtonTemplateSelector : DataTemplateSelector
{
    public override DataTemplate SelectTemplate(object item, DependencyObject container)
    {
        CalendarButtonContent content = item as CalendarButtonContent;
        if (content != null && content.ButtonType == CalendarButtonType.Date)
        {
            if (CentralCalendarWindow.CalendarViewItems != null && CentralCalendarWindow.CalendarViewItems.Exists(c => c.Date == content.Date))
            {
                CalendarViewItem calendarViewItem = CentralCalendarWindow.CalendarViewItems.Find(c => c.Date == content.Date);
                if (calendarViewItem.IsHoliday)
                {
                    return HolidayTemplate;
                }
            }
        }
    }
}

In XAML I would like my template to achieve something like the following (where CustomText is the object somehow added to the CalendarButtonContent or otherwise referenced):

<DataTemplate>
    <StackPanel>
        <TextBlock Text="{Binding Text}" />
        <TextBlock Text="{Binding CustomText}" />
    </StackPanel>
</DataTemplate>

I would be happy if I could somehow from my template just access some custom data outside the scope of the CalendarButtonContent, i.e. some static public data, if this would somehow be possible, but I guess that has not really anything to do with your Calendar control :)

Thanks in advance!
Best regards,
Kasper Schou
Kasper Schou
Top achievements
Rank 1
 answered on 15 Apr 2011
4 answers
118 views
Hi Telerik,

This is somewhat a spinoff of my previous thread.

My question here is whether or not it is possible to inherit from the CalendarButtonContent and having RadCalendar use this instead?, i.e. adding a Color property that could be set in code behind when selecting template, then binding to this Color property in the template definition in xaml?

Again, this is a simple example and my real case scenario contains many properties, hence having different templates for each combination of custom properties is not a desired approach.

Any advice what be appriciated :)

Best regards,
Kasper Schou
Kasper Schou
Top achievements
Rank 1
 answered on 15 Apr 2011
2 answers
105 views

Hi,

I've created a button column (using the example in the GridView help file, GridViewColumn & CellTemplace) but I would like to alter the tab navigation behaviour.

Right now it's "Previous Cell -> Button Cell -> Button in button Cell -> Next Cell" and I want "Previous Cell -> Button in button Cell -> Next Cell".

Also when using shift-tab to go backward it's "Next Cell -> Button Cell -> Previous Cell" and I want "Next Cell -> Button in button Cell -> Previous Cell".

Is there any way to do this because it makes keyboard navigation more confusing especially if you want to activate the button by pressing space?

I can't seem to find a way to make this work. I hope you can help me.

Thanks

Ivan Ivanov
Telerik team
 answered on 15 Apr 2011
1 answer
96 views
Hi,

  I want that the date should be displayed as mm-dd-yyyy instead of mm/dd/yyyy. In simple words I can say I want to display '-' instead of '/'. Please let me know how to achieve this. If I need to use a culture can u tell me the culture name for this.

Thanks.
Boyan
Telerik team
 answered on 15 Apr 2011
1 answer
139 views

Hi,

I really love working with the telerik toolkit but I stumbled upon a problem. When I try to select a datapoint via c#, the code executes but nothing happens.

The code I use:

chartarea.SelectItem(index);

When I debug my application, I can see all the necessary data is in my chart but after executing this statement, the SelectedItems property hasn't changed and neither did the chart itself.

Are there any suggestions to do this anyway?

Kind regards,

Michiel

Missing User
 answered on 15 Apr 2011
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?