Telerik Forums
UI for WPF Forum
1 answer
163 views
Hello everyone,

I'm using ChartView control and getting a wierd out of memory exception when messing with minimum of DateTimeContinuousAxis on the chart view control. I'm not sure whether I'm doing something wrong here or is this a bug so I'm asking for second opinion.  I've prepared a small project and attached it to this post for reproducing this issue. It creates a small graph with 5 DateTimes from 2012/12/3 10:00 - 2012/12/3 10:40. Axis minimum is set to DateTime.MinValue and maximum to DateTime.MaxValue. When I set new minimum in same hour ie. 2012/12/3 10:59:59, everything is ok. When you set minimum to 2012/12/3 11:00:00 it will cause OutOfMemory exception (not very nice in production environment). :)
Solution: http://dl.dropbox.com/u/2085626/TelerikException.rar
I've also attached a stack trace where it breaks.
Petar Kirov
Telerik team
 answered on 06 Dec 2012
6 answers
268 views

Hi,
I am using RadScheduleView for Calendar type implementation.
I  implemented filter that works fine for all ViewDefinitions except the ViewDefinition which is first on the NavigationHeader or in other words the ViewDefinition at Index=0 is not performing Filter.

Example:-
Below is the definition of RadSchedulerView that I am using.

      <telerik:RadScheduleView  Name="xRadScheduleView" 
                                AppointmentsSource="{Binding Appointments}"
                                ResourceTypesSource="{Binding ResourceTypeCollection, Mode=TwoWay}" 
                                GroupDescriptionsSource="{Binding GroupDescriptions}"
                                MinAppointmentHeight="60" 
                                NavigationHeaderVisibility="Visible" 
                                SpecialSlotStyleSelector="{StaticResource SpecialSlotStyleSelector}"
                                SpecialSlotsSource="{Binding SpecialSlots}"
                                ShowCurrentTimeIndicator="True"
                                CurrentTimeIndicatorStyle="{StaticResource CurrentTimeIndicatorStyleCustom}"
                                CurrentDate="{Binding CurrentDate, Mode=TwoWay}"
                                Grid.Row="1" 
                                VerticalScrollBarVisibility="Auto"
                                VerticalAlignment="Stretch" 
                                SelectedSlot="{Binding SelectedSlot, Mode=TwoWay}"
                                SelectedAppointment="{Binding SelectedAppointment, Mode=TwoWay}"
                                HorizontalScrollBarVisibility="Visible" >
<telerik:RadScheduleView.DragDropBehavior>
          <Helper:AppointmentDragDropConditionalBehavior/>
</telerik:RadScheduleView.DragDropBehavior>
<telerik:RadScheduleView.ViewDefinitions>
          <telerik:TimelineViewDefinition AppointmentFilter="{Binding FilterValue}"/>
          <telerik:MonthViewDefinition AppointmentFilter="{Binding FilterValue}"/>
          <telerik:WeekViewDefinition AppointmentFilter="{Binding FilterValue}"/>
          <telerik:DayViewDefinition AppointmentFilter="{Binding FilterValue}" />
        </telerik:RadScheduleView.ViewDefinitions>
</telerik:RadScheduleView>


Below are the view definitions .

<telerik:RadScheduleView.ViewDefinitions>
          <telerik:TimelineViewDefinition AppointmentFilter="{Binding FilterValue}"/>
          <telerik:MonthViewDefinition AppointmentFilter="{Binding FilterValue}"/>
          <telerik:WeekViewDefinition AppointmentFilter="{Binding FilterValue}"/>
          <telerik:DayViewDefinition AppointmentFilter="{Binding FilterValue}" />
</telerik:RadScheduleView.ViewDefinitions>

The FilterValue is a property in my ViewModel. Some terminology to understand code.
  1. AppointmentBase is Custom Appointment derived from Appointment class as suggested in your Help website.
  2. Process is Resource derived from Resource class as suggested in your Help website.
  3. CheckedProcesses is the local property which is List of Process ( Resource)

public Predicate<IAppointment> FilterValue
{
  get
  {
    return Filter;
  }
}
public bool Filter(IAppointment appt)
{
  if (SelectedProcess == null && !SelectAllProcesses)
    return false;
  if (SelectAllProcesses)
    return true;
  AppointmentBase app = appt as AppointmentBase; //Custom Appointment
  return app != null && FilterByProcess(app);
}
public bool FilterByProcess(DZNEAppointmentBase app)
{
  bool isFiltered = false;
  isFiltered = this.CheckedProcesses.Where(s => s.ProcessID.Equals(app.Process.ProcessID)).FirstOrDefault() != null;
  return isFiltered;
}

Filtering Scenario:

  1. When all Resources are checked we need to show all Appointment associated with each checked Resource. 
  2. When user uncheck a Resource, all Appointment associated with that Resource should get disappear from Calendar.


Above scenario works well for all ViewDefinitions  such as Day, Week, Month, Timeline and other Custom View definitions if an only if the ActiveViewDefinitionIndex is not ZERO.

So, for above view definition list in code snippet, filter is not working for very first view definition i.e. “TimelineViewDefinition”.

 


I just want to know what setting I am missing or if there are other ways to implement filter.
Any input will be highly appreciated.

Elgan
Top achievements
Rank 1
 answered on 06 Dec 2012
6 answers
702 views
Hello,

I am using GridViewRowDetails to display information regarding a row in a GridView.  I am using the GridViewToggleRowDetailsColumn to toggle the information off and on.  I am developing with the MVVM pattern and extensive databinding.  I want to be able to hide the plus sign on a per row basis using binding.  In addition I would like to be able to toggle the button in my ViewModel code as needed.  Do you have any suggestions on how this can be accomplished using MVVM and binding?

Thanks,

Jason
Rob Ainscough
Top achievements
Rank 1
 answered on 06 Dec 2012
2 answers
161 views
One of your Diagram samples contains a nice RadDiagramToolbox that I would like to use. However, the "Code" section merely contains a stripped Example.xaml...?

How can I make the RadDiagramToolbox look like in the attached image?
Kristoffer
Top achievements
Rank 1
 answered on 06 Dec 2012
3 answers
230 views
Hi,

I'm having problems with binding my items within a gridview controltemplate. I've already followed the WPF examples of it (GridView Examples - Appearence - Custom Row Layout), but whatever I try, binding isn't working when the RowStyle/ControlTemplate is active.

Below a simplified code snippet from the example, but with my own binding names:
<Grid>
        <Grid.Resources>
            <ControlTemplate x:Key="MyCustomRowTemplate" TargetType="telerik:GridViewRow">
                <Border x:Name="rowsContainer" BorderThickness="0,0,0,1">
                    <Grid Width="Auto" HorizontalAlignment="Stretch">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="20"/>
                            <RowDefinition Height="20"/>
                            <RowDefinition Height="20"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="150" />
                        </Grid.ColumnDefinitions>
 
                        <TextBlock Text="Data1: " Margin="5,0,0,0" FontWeight="Bold" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left"  />
                        <TextBlock Text="{Binding Data1}" Margin="5,0,0,0" Grid.Row="0" Grid.Column="1"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
                        <TextBlock Text="Data2: " Margin="5,0,0,0" FontWeight="Bold" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"  />
                        <TextBlock Text="{Binding Data2}" Margin="5,0,0,0" Grid.Row="1" Grid.Column="1"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
                        <TextBlock Text="Data3: " Margin="5,0,0,0" FontWeight="Bold" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"  />
                        <TextBlock Text="{Binding Data3}" Margin="5,0,0,0" Grid.Row="2" Grid.Column="1"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
                    </Grid>
                </Border>
            </ControlTemplate>
            <Style x:Key="rowStyle" TargetType="telerik:GridViewRow">
                <Setter Property="Template" Value="{StaticResource MyCustomRowTemplate}" />
            </Style>
        </Grid.Resources>
 
        <telerik:RadGridView RowStyle="{StaticResource rowStyle}" ItemsSource="{Binding Contacts}" ShowGroupPanel="False"
             BorderThickness="0" IsFilteringAllowed="False" AutoGenerateColumns="False" CanUserFreezeColumns="False" >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Data1" DataMemberBinding="{Binding Data1}"/>
                <telerik:GridViewDataColumn Header="Data2" DataMemberBinding="{Binding Data2}"/>
                <telerik:GridViewDataColumn Header="Data3" DataMemberBinding="{Binding Data3}"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>

You see the bindings to Data1, Data2, Data3, but as soon as I run it, those field stay empty, see screenshot 1

However, when I remove the RowStyle="{StaticResource rowStyle}" in my RadGridView then the Data is displayed correctly in the row, see screenshot 2

I've already tried binding with Path=, or CurrentItem.Data1 and several other options, but none of it works, while it works in de example.

I'm problably missing something, but if I compare my code with the example, I don't see any difference in binding, so any help would be appreciated.

Thanks in advance
Rutger Kars
Top achievements
Rank 1
 answered on 06 Dec 2012
4 answers
175 views
Hi,
    I am relatively new to WPF and Telerik RadGridView. I have a requirement to validate my cell column in heiarchical gridview in WPF. Means suppose when the user clicks on the column and enters a value, we should be able to check the db and validate whether the data entered is right or wrong and show proper messages. I am using WPF with MVVM and EF. Can you please suggest me the best possible way to achieve this functionality.

Thanks & Regards
Somasekharan Thampi S
Somasekharan
Top achievements
Rank 1
 answered on 06 Dec 2012
3 answers
652 views
I have some data that is coming from a Stored procedure which i have been able to display in a non-Telerik DataGrid.  using the following code.

CBFdataDataContext conn = new CBFdataDataContext();
List<spTotalRevByZipResult> sptotalrevbyzipresult = (from s in conn.spTotalRevByZip()
select s).ToList();
ZipGrid.ItemsSource = sptotalrevbyzipresult;

But with using the radCartesianChart, It says that there is no ItemSource.
<telerik:RadCartesianChart HorizontalAlignment="Left" Margin="10,104,0,0" Grid.Row="1" VerticalAlignment="Top" Width="723" Height="218" Name="ZipGrid">
           <telerik:RadCartesianChart.VerticalAxis>
               <telerik:LinearAxis/>
           </telerik:RadCartesianChart.VerticalAxis>
           <telerik:RadCartesianChart.HorizontalAxis>
               <telerik:CategoricalAxis/>
           </telerik:RadCartesianChart.HorizontalAxis>
           <telerik:RadCartesianChart.Series>
               <telerik:BarSeries CategoryBinding="subTotal"
                                  ValueBinding="custzip"
                                  ItemsSource="{Binding}"/>
           </telerik:RadCartesianChart.Series>
       </telerik:RadCartesianChart>
So How do i load the chart with Data?
CBFsqldataDataContext conn = new  CBFsqldataDataContext();
            List<spTotalRevByZipResult> sptotalrevbyzipresult = (from s in conn.spTotalRevByZip()
                                                                 select s).ToList();
             
            ZipGrid????????? = sptotalrevbyzipresult;











Petar Kirov
Telerik team
 answered on 06 Dec 2012
1 answer
112 views
I created a test project and used the Metro style resource dictionary provided with the WPF tools to create the look for our project's scheduler.  However, moving the style over to the main project, none of the visuals are working--Drag & Drop time markers don't appear, nor does a mouse-over for the cells indicating which cell you are on.  Resizing appointments also lacks visuals.  It's like the scheduler is completely static in terms of visual cues.  Unfortunately I haven't been able to reproduce this in a sample project, and our main project's code isn't practical to post.  I'm hoping someone has encountered this and can offer some suggestions. I've attached a screen grab showing the setup of our day view just to add a little context.
Vladi
Telerik team
 answered on 06 Dec 2012
3 answers
214 views
Hi,

I have stantard MVVM scenario, when I exposed ReadOnlyObservableCollection as a public property on my ViewModel. I add or remove items by commands, because it involves additional domain logic. I dont want to make the source collection public to ensure consistency of my model.

In treeview I solved it nicely with PreviewDragEnded="RadTreeView_PreviewDragEnded"
How to do it with RadListBox?

Thanks.
Daniel 
Vladi
Telerik team
 answered on 06 Dec 2012
5 answers
653 views
Hi,

Im trying to use RadRichTextBox together with the Ribbon control to get a Word-like text editor in my application.

So far I've initialized the editor with some content, which can be either plain text, RTF of HTML, so I used the different format providers and its working like a charm.

Now I want to be able to insert content at the caret position. For inserting plain text, I'm using the Insert method, and its working fine, but how do I insert RTF and HTML? On top of that, the inserted RTF or HTML should keep its original formatting and style.

/giereck


Stefan
Telerik team
 answered on 06 Dec 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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?