Telerik Forums
UI for WPF Forum
2 answers
260 views
Hi,

I have a gridview and the gridview has as SelectionMode="Multiple" and SelectionUnit="Cell".
My problem is now that the selection of the cells disappears after sorting or filtering the grid.  But I want that the selected cells stay selected also after sorting the grid.
If I use SelectionUnit="FullRow", then the selection of the rows don't disappear.

Why does the gridview act like this? Do I have to set some properties or do You know an easy way to implement this functionality on my own?

Thanks
Walter
Walter
Top achievements
Rank 1
 answered on 07 Oct 2011
3 answers
67 views
I want to set the Start visibility Indicator for the appointment as visible when the current date of the timelinecontrol  is greater than the start date of the appointment. Which means the start date of the appointment is not in the visible region of the timeline control, i want to see the indicators. Is it possible to achieve this?

The indicators work as I desire when there are no resources. I mean the status indicators are visible. Refer to the screenshot.Here there are no resources and we can see the indicators.




In the following screenshot we have resources but no continuation indicators

Boyan
Telerik team
 answered on 07 Oct 2011
1 answer
190 views
Hi,

I am using Self Referencing GridView. In that in have a problem that if I am selecting new cells (in parent and also in child) by holding the control key. Now if I click particular cell without holding the control key, then all the selected cells should be deselected. But its happening only the corresponding child/parent grid.

Also by holding the mouse left button how to select the parent and child grid columns without holding control keys.

Thanks,
Ramasamy
Maya
Telerik team
 answered on 07 Oct 2011
5 answers
305 views
Hi all,

I am facing some performance issues and am a bit puzzled. I am sure I am missing something and would appreciate any suggestions.
I am using telerik WPF dlls with version 2009.2.0813.35.

The scenario is I am loading around 2000 objects. It takes almost 30 seconds to render. I assume by default it is using the virtualizing panel and looking at the profiler that seems to be the case. 

I am pasting the profiler output here. The problem seems to be the UpdateRowHeight call in the GridViewVirtualizingPanel where it seems to go through all the records even though the UI is virtualized.

61.08 % MeasureOverride - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.BaseVirtualizingPanel.MeasureOverride(Size)
  61.08 % UpdateRowHeight - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.UpdateRowHeight(IRowItem)
    61.08 % OnRefreshScrollExtent - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.OnRefreshScrollExtent()
      61.08 % RefreshItemsPhysicalHeightsCache - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.PhysicalHeightsCache.RefreshItemsPhysicalHeightsCache()
        61.08 % CreateDataRecordsHeightsCache - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.PhysicalHeightsCache.CreateDataRecordsHeightsCache(IList<Record>, Double, Int32, Int32)
          61.08 % InsertItem - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.RadKeyedCollection<TKey, TItem>.InsertItem(Int32, TItem)
            61.08 % AddKey - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.RadKeyedCollection<TKey, TItem>.AddKey(TKey, Int32)
              30.93 % System.Collections.Generic.Dictionary<TKey, TValue>.FindEntry... - 9484 ms - 0 calls
              30.15 % System.Collections.Generic.Dictionary<TKey, TValue>.Insert... - 9245 ms - 0 calls

-------------------------------------------------------------------------------------------------------------------------------

Is this a known thing or am I doing something wrong? The xaml fragment is below:

<telerik:RadGridView Name="OfficerGrid" AutoGenerateColumns="False" IsReadOnly="True"
                                 MultipleSelect="False" ShowGroupPanel="False"
                                 IsFilteringAllowed="False"
                                 SelectionChanged="OnSelectionChanged" DataLoadMode="Asynchronous"
                                 GridLinesVisibility="None"
                                 MouseDoubleClick="OfficerGrid_MouseDoubleClick">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Path=Name, Mode=OneWay}"/>
                    <telerik:GridViewDataColumn Header="Office" DataMemberBinding="{Binding Path=Office, Mode=OneWay}"/>
                    <telerik:GridViewDataColumn Header="Job Title" DataMemberBinding="{Binding Path=JobTitle, Mode=OneWay}"/>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>

Thanks for any help,
Kashi





Vlad
Telerik team
 answered on 07 Oct 2011
1 answer
91 views
I have a GridView's itemsource bound to a dataset with a table "xyz" as it's DataMember. When I add a new row to a .net listview bound to the same table, the GridView does not display the new row. However, when I click on the filter icon on the first column of the GridView, I can see the new row value. Any ideas?
Rod
Vlad
Telerik team
 answered on 07 Oct 2011
3 answers
111 views
I am supporting some Telerik code that has a GridView with 30 columns of GridViewDataColumn type.  As part of the GridView, there is a RadGridView.RowDetailsTemplate that includes a UserControl that is basically an editor of the columns of the GridView. 

Bindings seems to be refreshing the GridView columns just fine when the columns of the GridView are visible to the user.  Since this GridView has about 30 columns, only about 10 columns are visible to the user at any given time.  As user scrolls horizontally, he can see the other columns.   If the columns being edited by the user are not visible at the time of editing, those values are not updated 50% of the time when he scrolls the grid columns into view.   Some columns are being updated correctly and some columns would not be updated correctly.  If the columns are visible at the time of editing, we have not noticed the cells not be updated correctly.
 
To test out our viewmodel, I rewrote part of the grid using the same bindings with a non-Telerik grid, everything seems to refresh just fine as the values are being edited and the gridview being scrolled.

We are using the current Telerik control for WPF 4.

Any suggestions would be appreciated.

Thanks,
Milt
Milt
Top achievements
Rank 1
 answered on 06 Oct 2011
2 answers
176 views

When performing a ShowDialog (and even .Show) of WPF Window within the MouseDoubleClick event of the RadTreeView, mouse events (MouseEnter, Click, etc..) no longer fire in the Dialogue Window.  It gives the appearance of hanging, but keyboard nav functions just fine.

Interestingly, by moving focus to a different window and alt-tabbing back to the dialogue, the mouse events are once again detected.
I have only noticed this in the MouseDoubleClick event. 

The workaround that I am using to avoid this problem is to set a flag in the MouseDoubleClick event and then check the flag in the MouseLeftButtonUp event.    If I fire the .Show or .ShowDialog from the MouseLeftButtonUp event, all is OK and the problem does not appear. 


Details
VS 2010 Ultimate
Telerik - WPF 2011 Q2 - SP1
Win 7 - 64

Reproduce
Create WPF Application with two windows (MainWindow and TestDLG)
Build/Run
Double Click on Item 1
Hit Cancel Button
If it doesn't appear to lock on first try, repeat.  Always get it to lock before doing this three or four times.

When it locks, just Alt-Tab out and then back to the test application and the mouse lives again.

This sample is as simple as I could make.

<Window x:Class="MainWindow"
    Title="MainWindow" Height="280" Width="400"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>
        <telerik:RadTreeView Height="128"
                             HorizontalAlignment="Left"
                             Margin="160,72,0,0"
                             Name="RadTreeView1"
                             VerticalAlignment="Top"
                             BorderThickness="1"
                             BorderBrush="Black"
                             Width="125">
            <telerik:RadTreeViewItem DropPosition="Inside"
                                     Header="Item 1" />
        </telerik:RadTreeView>
    </Grid>
</Window>

MainWindow - Code Behind

Class MainWindow
 
    Private Sub RadTreeView1_MouseDoubleClick(sender As Object, e As System.Windows.Input.MouseButtonEventArgs) Handles RadTreeView1.MouseDoubleClick
        Dim tw As New TestDLG
        tw.ShowDialog()
        tw.Close()
    End Sub
 
End Class

MainWindow CodeBehind (Workaround)
This is the workaround that allows the ShowDialog to occur on doubleclick event but not lose mouse events.

Class MainWindow
 
    Private _DidDoubleClick As Boolean
    Private Sub RadTreeView1_MouseDoubleClick(sender As Object, e As System.Windows.Input.MouseButtonEventArgs) Handles RadTreeView1.MouseDoubleClick
        _DidDoubleClick = True
    End Sub
 
    Private Sub RadTreeView1_MouseLeftButtonUp(sender As Object, e As System.Windows.Input.MouseButtonEventArgs) Handles RadTreeView1.MouseLeftButtonUp
        If _DidDoubleClick Then
            _DidDoubleClick = False
            Dim tw As New TestDLG
            tw.ShowDialog()
            tw.Close()
        End If
    End Sub
End Class

Dialog Window

<Window x:Class="TestDLG"
    Title="TestDLG" Height="300" Width="300">
    <Grid>
        <Button Content="Button"
                Height="29"
                HorizontalAlignment="Left"
                Margin="82,204,0,0"
                Name="Button1"
                VerticalAlignment="Top"
                Width="97" />
    </Grid>
</Window>


Dialog Window CodeBehind

Public Class TestDLG
 
    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        Me.Hide()
    End Sub
End Class
Rex Walker
Top achievements
Rank 1
 answered on 06 Oct 2011
6 answers
249 views
Today I downloaded the WPF demo application (via ClickOnce), and noticed that the sample code does not allow text highlighting or copying to clipboard.  When will this feature be added to the WPF demo application?
Steve
Top achievements
Rank 1
 answered on 06 Oct 2011
1 answer
170 views
I'm having trouble adding a binding to the visibility property of the series definition object programmatically. the binding works fine in xaml, but the object doesn't seem to have a SetBinding() function available to it, only a SetValue() - which doesn't set binding, only the value..

is there another way to do this?

i define a series mapping in XAML but allow users to change the chart type which clears the binding. below is the XAML definition:

<rad:SeriesMapping.SeriesDefinition>
                            <rad:BarSeriesDefinition ShowItemLabels="True" ShowItemToolTips="True" ItemLabelFormat="#ProposedSalesQty{#,###,###,##0}"
                                                     ItemToolTipFormat="#AttributeName, #ProposedSalesQty{#,###,###,##0}" Visibility="{Binding ProposedSalesQtySeriesVisibility}">
                                <rad:BarSeriesDefinition.Appearance>
                                    <rad:SeriesAppearanceSettings Fill="SkyBlue" />
                                </rad:BarSeriesDefinition.Appearance>
                            </rad:BarSeriesDefinition>
                        </rad:SeriesMapping.SeriesDefinition>


And in the C# code-behind i attempt to change the value this way:

((LineSeriesDefinition)MixChart.SeriesMappings[0].SeriesDefinition).SetBinding(
                        LineSeriesDefinition.VisibilityProperty, new Binding("ProposedSalesQtySeriesVisibility"));

there is no SetBinding() function so i'm not sure how i can add the binding alternatively? it can be done perfectly in XAML but not sure about code behind...

Thanks,
Nemanja
Nemanja
Top achievements
Rank 1
 answered on 06 Oct 2011
1 answer
94 views
Hello.

I have a Rad Tree View with around 2000 root nodes inside a RadTabControl. They are are bound to observable Collection items as I need to Drag and Drop to maintain order.

When I select the tab item containing this Tree View. It takes around 40 seconds to load which as you can understand not acceptable to the end user.

Is there any way to speed it up or what I am missing.

Regards

Ahmad



Petar Mladenov
Telerik team
 answered on 06 Oct 2011
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?