Telerik Forums
UI for WPF Forum
0 answers
101 views
Hallo,

I got problems with the GridView performance.

I have a simple WPF Application with one GridView and one refresh button. The GridView has 4 columns and 100 rows. The ItemsSource of the GridView is an Observable Collection of the type RowViewModel. RowViewModel has 4 properties (1 DateTime and 3 strings). When I push the refresh button, the ItemsSource is cleared and filled again with different objects. On my machine thit takes about 800 to 1000 ms. Here is the XAML code:

<Grid>
    <telerik:RadGridView
        HorizontalAlignment="Left"
        Name="radGridView1"
        VerticalAlignment="Top"
       
Height="561" Width="546">
    </telerik:RadGridView>
    <telerik:RadButton Content="Refresh" Height="23" HorizontalAlignment="Left" Margin="646,152,0,0" Name="radButton1" VerticalAlignment="Top" Width="75" Click="radButton1_Click" />
</Grid>

And here is the code behind:

private const int RowCount = 100;
private int _counter = 0;
private readonly string[] _codes = new [] {"Code Blue", "Code Orange", "Code Yellow", "Code Cyan"};
 
public MainWindow()
{
    InitializeComponent();
 
    CreateRowViewModels();
}
 
public ObservableCollection<RowViewModel> Rows { get; set; }
 
private void CreateRowViewModels()
{
    if (Rows == null)
    {
        Rows = new ObservableCollection<RowViewModel>();
        radGridView1.ItemsSource = Rows;
    }
 
    DateTime d;
    string name;
 
    if (_counter % 2 == 0)
    {
        d = new DateTime(2012, 1, 1);
        name = "Mr. Black";
    }
    else
    {
        d = new DateTime(2012, 6, 1);
        name = "Mr. White";
    }
 
    Rows.Clear();
 
    for (var i = 0; i < RowCount; i++)
    {
        var row = new RowViewModel
        {
            Name = name + " " + (i + 1),
            Date = d,
            Code = _codes[i % 4],
            Error = ""
        };
        Rows.Add(row);
    }
 
    _counter++;
}
 
private void radButton1_Click(object sender, RoutedEventArgs e)
{
    CreateRowViewModels();
}

Nothing special here, why does it take about 1 second to refresh the ItemsSource collection?

Thank you for the help,

Eugen
Eugen Wiens
Top achievements
Rank 1
 asked on 30 Sep 2012
0 answers
94 views
Hi,,, 
I have demo version of Telerik and i used Scheduler view, when I change value of flow direction ,right to left , of my windows, and when I drag a inserted appointment, it does `t normally drag ,

What can I do for fix the problem?

Thanks a lot


PS : Please see the attachment for more detail.
Hossein
Top achievements
Rank 1
 asked on 30 Sep 2012
5 answers
114 views
Hi,

I'm using the TV Schedule example with it's group headers as a base and I need to show the entire week fir into a window without scrolling. I have set the visible days to 7, but I need to change the size / height of the group rows (dynamically if possible) so the the whole week will show without the user needing to scroll. I tried using a viewbox, but that looks ugly and stretched. What properties do I need to set to achieve this?

Thanks,
Geoffrey
Vladi
Telerik team
 answered on 29 Sep 2012
1 answer
77 views
Hi there,

I have a project with a RadScheduleView.

The viewDefinitions are added dynamically when I first open the App. There are 5 of them : day / week / workweek / month / timeLine by default.

In this configuration, when the activeViewDefinition is the MonthView and I click either on a "weekHeader" or a "dayHeader" to go to the corresponding week or day, it takes up to 25s.

Interestingly though, going from WeekView to DayView by clicking on a "dayHeader" in the WeekViewDefinition is almost instantaneous. So I deduced it has something to do with the way the view is displayed (weekView and DayView share the same layout, if I am not mistaken)

I have used DotTrace to try and find where the problem lies, and it appears almost all of the 25s are spent in MeasureOverride() (see attached screenshot) So my guess seems to be right, but I am puzzled as to what could produce such a loss of time on my part.

Do you know of something that could cause such a behavior ?

(nb: I use the metro Theme on the RadScheduleView)
Vladi
Telerik team
 answered on 29 Sep 2012
1 answer
130 views
I'm attempting to bind a RadListBox within a CellEditTemplate but for some reason it isn't working.  I've attempted to bind a RadListBox outwith the GridView and it works fine.
<telerik:GridViewDataColumn Header="Actionees" UniqueName="ACT856">
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadListBox ItemsSource="{Binding Path=Actionees}" DisplayMemberPath="FullName" SelectedValuePath="IdentityId" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>

Am I missing something?
Dimitrina
Telerik team
 answered on 29 Sep 2012
3 answers
154 views
I'm building a business application in WPF that needs to be usable from a kiosk's touch screen.  No real need for fancy multitouch or gestures, but I do need basic controls that handle touch events and the ability to style the controls to make them larger for better usability.

Can the Telerik WPF controls handle touch events and easily be styled appropriately?  Is there anything like the MetroTouch skin for WPF?  Anyone else using the Telerik WPF controls for a basic touch-able application?

Thanks!
Jeremy
Hristo
Telerik team
 answered on 29 Sep 2012
1 answer
153 views
Hi All,

I want to Reorder the RasExpander Control with the help of DragDropManager inside the Stackpanel. Can you please guide me how to do this? Please help me with the sample if possible.

Thanks,
 Sakthi
Pavel R. Pavlov
Telerik team
 answered on 29 Sep 2012
1 answer
193 views
Hello, I would like to know how I can get the value of a particular row / column in RadGrdiView of Wpf
like a telerik web gridview (findcontrol)
Actually I can get the value in a DataGrid wpf, that is my function

Private Function GetCellValue(ByRef dataGrid As DataGrid, ByVal row As Integer, ByVal column As Integer) As String
        Dim temprow As DataGridRow
        Dim rowview As DataRowView
        Dim cellValue As String
        GetCellValue = ""
        Try
            temprow = dataGrid.ItemContainerGenerator.ContainerFromIndex(row)
            rowview = temprow.Item
            cellValue = rowview.Item(column).ToString
        Catch ex As Exception
            cellValue = ""
        End Try
        Return cellValue
   End Function

But when I do the same with telerik, I cant, that give the next error
Unable to cast object of type 'Telerik.Windows.Controls.GridView.GridViewRow' to type 'System.Windows.Controls.DataGridRow'.
if you can give me a solution, will be grateful

Dimitrina
Telerik team
 answered on 29 Sep 2012
3 answers
586 views
Hi,

Is there a file upload/download control in wpf suite? (something like a textbox with spinner to represent upload/download. And a cancel button to cancel upload/download)

Thanks
Santosh
Tina Stancheva
Telerik team
 answered on 28 Sep 2012
1 answer
99 views
Do you have an example of using Virtualization with the WPF PropertyGrid?
Maya
Telerik team
 answered on 28 Sep 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?