Telerik Forums
UI for WPF Forum
1 answer
116 views
Hi,

is it possible to reset grid columns layout on demand, as if new data was just loaded? Sometimes the users resize/reorder columns and we would like to reset all those changes to original (auto size)

Thanks,
Stevo
Dimitrina
Telerik team
 answered on 27 Nov 2013
5 answers
355 views
Hello,

I am using the Q3 2013 Telerik release (2013.3.1016). I am doing a simple binding to the DefaultView of a DataTable. Due to the nature of the requirement, I need to have AutoGenerateColumns set to true, but I'm really not doing anything special otherwise.

What I'm noticing is that when bound to the DefaultView of a DataTable with just 200 rows and 4 columns, the scrolling performance is so bad as to be unusable. It's extremely jerky and very slow, again to the point of being completely unusable. When I bind directly to the same DataTable (without using the DefaultView), there is absolutely no problem with scrolling - it is smooth and seamless.

I've tried everything that I can think of to improve performance, including everything on your RadGridView "Performance Tips and Tricks" at:
http://www.telerik.com/help/wpf/radgridview-performance-tips-tricks.html. The reason that I need to use the DefaultView is for the data binding and error features implemented on the DataView but not the DataTable. I've tried all sorts of hacks with changing data in the DataTable from my ViewModel, firing an event that my codebehind subscribes to, and constantly calling Rebind() on the RadGridView, but I'm still left with issues that require no effort when simply bound to the DefaultView. There just has to be a way to achieve smooth scrolling with a meager 200 rows and 4 columns.

1: The RadGridView is in a Grid with the row height set to star and the column width set to star. There is no "infinity" based measurement going on.

2: I have EnableRowVirtualization set to "True", and I've confirmed that this is working using WPF Inspector (similar to Snoop). Furthermore, I've turned virtualization off, and although scrolling performance becomes perfectly smooth even with the DefaultView, memory usage becomes absurdly high. I will need to keep virtualization on.

3: Originally I had the property bound as part of the DataTable, like this: ItemsSource="{Binding MyDataTable.DefaultView}". After reading your tips and tricks regarding not using property paths to improve performance, I exposed the DefaultView directly on my ViewModel so that the binding became ItemsSource="{Binding MyDefaultView}". This did not improve performance at all.

4: I'm not using any custom styles or templates at all.

5: My WPF application is globally using the Windows8 Theme (StyleManager.ApplicationTheme = new Windows8Theme() is right before InitalizeComponent() on my MainWindow.xaml.cs, also per your documentation). According to your "Tips and Tricks", this uses "lightweight templates" that should improve performance, but again, testing with different themes produces the same terrible scrolling performance.

6: I've tried using ScrollMode="Deferred", but the behavior is not desirable, and even when letting go of the mouse to let the GridView render, there is a very long pause while the data renders.

7: Paging is not a viable solution here and can't be used for several reasons, the most important of which is that the users want to view this GridView like they would in Excel.

With all that in mind, here is the XAML for my RadGridView (note that ImportDataView is the DefaultView of my DataTable, exposed directly from the ViewModel):

<telerik:RadGridView
  Name="PreviewDataGridView"
  ItemsSource="{Binding ImportDataView}"
  EnableRowVirtualization="True"
  SelectionMode="Extended"
  SelectionUnit="Mixed"
  IsReadOnly="False"
  AutoGenerateColumns="True"
  ShowGroupPanel="False"
  ShowInsertRow="False"
  ReorderColumnsMode="None"
  CanUserInsertRows="False"
  CanUserDeleteRows="True"
  CanUserResizeRows="False"
  CanUserSelect="True"
  CanUserSortColumns="False"
  CanUserFreezeColumns="False"
  CanUserReorderColumns="False"
  IsFilteringAllowed="False"
  BorderBrush="Black"
  BorderThickness="1"
  Margin="4, 6, 4, 4"
  Grid.Row="2"
  Grid.Column="0">
 </telerik:RadGridView>

I've spent a ton of time trying to figure this out and could really use some help.

Thanks for your time,
Jon
Jon
Top achievements
Rank 1
 answered on 27 Nov 2013
0 answers
142 views

Hello,

I have a grid that displays two levels.

Applications
   Client Access
    Module Access

When you click the "+" to show the child rows it takes about 8-10 seconds to expand and show the two child tables.  Each table does not have more that 40 records.

1) How can I set the cursor to wait while it happening?
2) How can I speed it up?

Here is the relevant section of the markup.

<telerik:RadGridView.HierarchyChildTemplate>                               
   <DataTemplate>
       <StackPanel>                                       
              <telerik:RadGridView ItemsSource="{Binding ClientAccess}" AutoGenerateColumns="False">
                   <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn Header="" DataMemberBinding="{Binding IsSelected}"/>
                        <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding SecurityLevel}" Header="Security Level" />
                          <telerik:GridViewDataColumn Header="Identity"UniqueName="Identity"/>                                                                            
                    </telerik:RadGridView.Columns>
               </telerik:RadGridView>
 
 
<telerik:RadGridView ItemsSource="{Binding ToolModuleAccess}" AutoGenerateColumns="False">
        <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="" DataMemberBinding="{Binding IsSelected}"/>
        <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding SecurityLevel}" Width="100" Header="Security Level" />
         <telerik:GridViewDataColumn Header="Identity" UniqueName="Identity"/>                                           
        </telerik:RadGridView.Columns>
 </telerik:RadGridView>
</StackPanel>
 
</DataTemplate>                  
</telerik:RadGridView.HierarchyChildTemplate>



The viewmodel and all of it's data is set prior to the form's creation.

Any help would be greatly appreciated.

Thanks!
Reid






Reid
Top achievements
Rank 2
 asked on 27 Nov 2013
1 answer
105 views

How Can I Put The PointMark Above AxisY,Like The Attach Image.

I Can't Find A Property To Set.

Help Me,Please.

Pavel R. Pavlov
Telerik team
 answered on 27 Nov 2013
1 answer
244 views
Good Afternoon,

The experience I'd like to my user is to update a percentage value with 2 decimal places via the up/down buttons without the percentage sign disappearing and extra zeroes appearing at the end whilst the user is editing the value.

Basically I'd like for the display not to change whence the value is edited.

Is it possible to format the editing to look the same as when the box is not being edited?

For example, if the value displays as 5.00 % as the user presses the up directional button, I would like the editing to read "5.01 %" and then "5.02 %" etc. rather then "5.0100", "5.0200" etc.

I hope this makes sense.

Thank you in advance,

David
Vladi
Telerik team
 answered on 27 Nov 2013
3 answers
120 views
Hi,

If I have the DayStartTime set to 06:00 am and an appointment starting at 05:00 am and ending at 10:00 am ScrollIntoView does not work even though the appointment is mostly visible on the calendar.

I know my code is working in general because an appointment that starts after the DayStartTime scrolls into view perfectly.

The logic should be that if any of the appointment is visible it should be able to scroll into view.

Thanks
Anthony
Kalin
Telerik team
 answered on 27 Nov 2013
1 answer
47 views
Hi,

I have created my own custom ScheduleViewDragDropBehavior class and have overridden and used most of the methods successfully including DragDropCanceled which works as expected.

If I override ResizeCanceled the Appointment returned in the DragDropState is a new empty Appointment, NOT the appointment that was just being resized.

This should contain the Appointment that was being resized.

Thanks
Anthony
Kalin
Telerik team
 answered on 27 Nov 2013
7 answers
260 views
When I have a simple chartview that has a spike in it, the spike appears to go well above the value it is intended to represent.  I'm guessing this is because the line gets vertically fatter as the slope is increased, and the value is considered on the "centerpoint" of the line. However, this can lead to extremely misleading charts.

I have attached an example where the value is supposed to be "1" but more appears to be about 1.05.

Mike

 
Peshito
Telerik team
 answered on 27 Nov 2013
3 answers
150 views
I have derived a custom appointment that implements IAppointment called AppointmentViewModel. I have created a customized EditAppointmentView Dialog, by taking the provided RadSchedulView template XAML and adding a few RadComboBoxes (that are not resources), and assigning the template to the RadScheduleView's EditAppointmentDialogStyle. After a bit of work, all is working as planned except for one problem. In our LOB app, the schedule represents appointments in a auto repair shop. We need to provide the user with a list of predefined repair symptoms that they can choose from when creating or editing the appointment. I have successfully added a RadComboBox to allow them to choose from the list of symptoms. After making a selection in the RadComboBox, I call code on the SelectedItem's setter, that calls an internal method on my derived Appointment to concatenate the selected symptom text to the Body property of the Appointment. All works, the RadComboBox, the concatenation code, everything, except the Body TextBox will not show the value stored for the Body until the Appointment is closed and reopened. I am calling OnPropertyChanged(() => Body)  both in the method that appends the symptom to the Body and on the Body setter itself. All seem to be ignored. I know about having to BeginEdit and CommitEdit the RadScheduleView when updating appointments with code and need the ScheduleView to update, but shouldn't the IAppointment behind the EditAppointmentView Dialog be able to edit one of it's own properties and have it be reflected in the open Edit Dialog if it is a TwoWay binding? Originally I didn't have the Body overridden in my derived Appointment, but did so later just to confirm the firing of the OnPropertyChanged.

Once again, the desired work is taking place and upon close and reopen the Body shows the appended symptom as desired, but not live when you make the change.  Am I missing something?

XAML snippet from customized EditAppointmentTemplate for Body TexyBox;

<TextBox
   Grid.Row="1"
   HorizontalAlignment="Stretch
   Margin="8,11,12,8"
   VerticalAlignment="Stretch"
   TextWrapping="WrapWithOverflow"
   VerticalScrollBarVisibility="Auto"
   HorizontalScrollBarVisibility="Auto"
   SpellCheck.IsEnabled="True"
   Text="{Binding Occurrence.Appointment.Body, Mode=TwoWay}"
   AcceptsReturn="True"
   AcceptsTab="True"
   IsReadOnly="{Binding IsReadOnly}"
/>

Property in my derived IAppointment that the Body TextBox is bound too;
 public override string Body
 {
     get
     {
         return base.Body;
     }
     set
     {
         base.Body = value;
         OnPropertyChanged(() => Body);
     }
 }

For what it's worth, here's the little method that is called to concatenate a string to the Body property. Note that I have tried calling OnPropertyChanged(() => Body) in this method as well, but currently have to commented out. The OnPropertyChanged(() => Body) of the Body itself is being fired.

        internal void AppendSymptomToAppointmentNote()
        {
            if (SelectedSymptom == null)
                return;         

            if (Body == null)
            {
                Body = "* " + SelectedSymptom + "\r\n";
//                OnPropertyChanged(() => Body);
            }
            else
            {
                if (!Body.Contains(SelectedSymptom))
                {
                    Body = Body + "* " + SelectedSymptom + "\r\n";
//                    OnPropertyChanged(() => Body);
                }
            }
        }


Yana
Telerik team
 answered on 27 Nov 2013
2 answers
138 views
Hi,

I am trying to serialize Span Class Collection object to XMl, Binary and JSON format but while implementing this, StyleDefinition Class which is the property of the Span Class class and having nested structure ( same class type variable inside the class ) not allow to perform the serialization process.

I had tried also JSON serialization which allow to skip looping structure but that also not allow to serialize Span collection object.

so is there any way to serialize Span collection object to any serialization type so I will save this object as file on my system. ?




Thanks & Regards
Ajita


Ajita
Top achievements
Rank 1
 answered on 27 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?