Telerik Forums
UI for WPF Forum
1 answer
197 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
314 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
96 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
113 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
195 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
261 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
190 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
102 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
1 answer
96 views
Hi,

I am facing problem while rebinding the grid.

In the XAML,

<

 

 

telerik:RadGridView x:Name="RadGridView1" ItemsSource="{Binding Path=Table, Mode=TwoWay,
UpdateSourceTrigger
=PropertyChanged}" GridLinesVisibility="Both" IsReadOnly="True"

 

 

 

CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed" CanUserReorderColumns="False"

 

 

 

ShowGroupPanel="False" HorizontalAlignment="Left" SelectionMode="Extended" SelectionUnit="Cell"
BorderThickness
="0">

 

<

 

 

telerik:RadGridView.FilterDescriptors>
<telerik:FilterDescriptor Member="ParentID" Operator="IsEqualTo" Value="0"/>
</telerik:RadGridView.FilterDescriptors>

 

 

 

 

 

 

<

 

 

telerik:RadGridView.ChildTableDefinitions>
<telerik:GridViewTableDefinition>
<telerik:GridViewTableDefinition.Relation>
<telerik:TableRelation IsSelfReference="True">
<telerik:TableRelation.FieldNames>
<telerik:FieldDescriptorNamePair ParentFieldDescriptorName="ServiceID" ChildFieldDescriptorName="ParentID"/>
</telerik:TableRelation.FieldNames>
</telerik:TableRelation>
</telerik:GridViewTableDefinition.Relation>
</telerik:GridViewTableDefinition>
</telerik:RadGridView.ChildTableDefinitions>
</telerik:RadGridView>

In the ViewModel,

 

private

 

 

DataTable _table;
public DataTable Table
{
get { return _table; }
set
{
_table =
value;
RaisePropertyChanged(() =>
this.Table);
}
}

 

 

[

 

ImportingConstructor]
public MatrixViewModel(IEventAggregator eventAggregator)
{
this.TabModel = new TabModel { Title = "Matrix" };

if (eventAggregator != null)
eventAggregator.GetEvent<
MatrixReloadEvent>().Subscribe(OnContractCreatedOrLoaded);
}

 

 

 


private
void OnContractCreatedOrLoaded(ContractCreatedOrLoadedEventArgs args)

 

{

 

DataTable dtOutput = new DataTable();
..buliding the datatable and assigning to the Table property
}

 

 

From the other screen I am calling the event "OnContractCreatedOrLoaded" while adding new items. For the first time (add 1 or n number of items) and view the grid screen. It works perfectly (Grid will have only one row - ParentID = 0).

Now add 1 new item ("OnContractCreatedOrLoaded" event will be fired) and see the grid, it binds all the rows in the datatable without filtering or hierarchy (grid is having all the rows instead of showing ParentID = 0)

Any help appreciated.

Thanks,
Ramasamy

Ramasamy
Top achievements
Rank 1
 answered on 06 Oct 2011
1 answer
132 views
Hi,

how to get the Telerik.Windows.Input namespace? I have already added Telerik.Windows.Controls.dll but i cannot include the Input namesapce.

Thanks,
Ramasamy
Ramasamy
Top achievements
Rank 1
 answered on 06 Oct 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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?