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

I have 8 RadGridViews in my wpf application. I have used some properties of the RadGridView in the below code snippet. Each RadGridView is added inside an Expander.

When I select an item in a tree view, I change the Datacontext of the Expander. But the rendering of the control  takes too much of tne time. How do i improve the rendering performance of my RadGridViews?  Am i missing anything? Can anyone help.

<Telerik:RadGridView CanUserFreezeColumns="False"

                                                                     RowIndicatorVisibility="Collapsed"

                                                                     RowDetailsVisibilityMode="{Binding ElementName=root,Path=CanEdit.IsEnabled,IsAsync=True,Converter={StaticResource rowdetailsvisibilityconverter}}"

                                                                     RowDetailsTemplate="{StaticResource propertyEditTemplate}"

                                                                     ItemsSource="{Binding Properties}"

                                                                     AutoGenerateColumns="False"

                                                                     SelectionUnit="FullRow"

                                                                     SelectionMode="Single"

                                                                     DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Expander}}}"

                                                                     Grid.Column="0"

                                                                     Name="propertyListView"

                                                                     VirtualizingPanel.IsVirtualizing="True"

                                                                     VirtualizingPanel.IsContainerVirtualizable="True">

                                                    <Telerik:RadGridView.ContextMenu>

                                                        <ContextMenu>

                                                            <MenuItem Header="Edit"  Command="ApplicationCommands.Replace">

                                                                <MenuItem.Icon>

                                                                    <Image Source="..\Images\Edit.png" Height="15" Width="20" Margin="0,0,2,0" />

                                                                </MenuItem.Icon>

                                                            </MenuItem>

                                                        </ContextMenu>

                                                    </Telerik:RadGridView.ContextMenu>

                                                    <Telerik:RadGridView.CommandBindings>

                                                        <CommandBinding Command="Replace" CanExecute="CommandBinding_NewTripAlarms" Executed="CommandBinding_EditProperties" />

                                                    </Telerik:RadGridView.CommandBindings>

                                                    <Telerik:RadGridView.InputBindings>

                                                        <KeyBinding Command="Replace" Key="Enter" />

                                                    </Telerik:RadGridView.InputBindings>

                                                    <Telerik:RadGridView.Columns>

                                                        <Telerik:GridViewDataColumn IsReadOnly="True" IsGroupable="False" IsFilterable="False" Header="{DynamicResource Name}" DataMemberBinding="{Binding Path=ModelProperty.PropertyName}" />

                                                        <Telerik:GridViewDataColumn IsReadOnly="True" Header="{DynamicResource DataType}" DataMemberBinding="{Binding Path=ModelProperty.DataType.Name}" />

                                                        <Telerik:GridViewDataColumn IsReadOnly="True" IsGroupable="False" IsSortable="False" IsFilterable="False" Header="{DynamicResource Value}" DataMemberBinding="{Binding Path=Value}" />

                                                    </Telerik:RadGridView.Columns>

                                                </Telerik:RadGridView>

regards,
Maya
Telerik team
 answered on 10 Jul 2013
1 answer
68 views
I couldn't to change TimeRulerMonthViewItem.


Code snippets   below :

 <Window.Resources>
            <Style x:Key="TimeRulerMonthViewItemStyle" TargetType="telerik:TimeRulerMonthViewItem">
            <Setter Property="telerik:StyleManager.Theme" Value="Windows8"/>
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock Text="WhyCantChanged"/>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
     </Style>
        <telerik:OrientedTimeRulerItemStyleSelector x:Key="Origin" 
                                                 MonthViewTickStyle="{StaticResource TimeRulerMonthViewItemStyle}"/>
    </Window.Resources>
<Grid>
        <telerik:RadScheduleView x:Name="ScheduleView"
                                  telerik:StyleManager.Theme="Windows8" TimeRulerItemStyleSelector="{StaticResource Origin}">
            <telerik:RadScheduleView.Resources>
                <Style TargetType="telerik:RadButton">
                    <Setter Property="ContentTemplate">
                        <Setter.Value>
                            <DataTemplate>
                                <TextBlock Text="I am Mark."/>
                            </DataTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </telerik:RadScheduleView.Resources>
            <telerik:RadScheduleView.ViewDefinitions >
                <telerik:MonthViewDefinition/>
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>
    </Grid>

It could not change  Content. Do I just have to setting its ControlTemplate ,Only one way? Why not setting ContentTemplate?


Kalin
Telerik team
 answered on 09 Jul 2013
2 answers
104 views
Hi there,

how do I integrate the documentation into VisualStudio 2012? I would like to be able to view the documentation offline and get quick access via the F1 key to the overview and espially to the API documenation.

E.g. I found the property Items of the RadTreeListView and would like to know more about it, e.g. the type.

Or by hitting F1 on RadTreeListView in the editor I'd like to see all properties, methods, events, ... of this control.

Actually, I even have a hard time finding it in the online help.

Thanks!

Jan
Rosen Vladimirov
Telerik team
 answered on 09 Jul 2013
7 answers
162 views
I setup a hierarchy template on my bound GridView. Inside of the hierarchy I have column footer to sum all the values. I have an event that fires in the background that updates the values inside the hierarchy template. However, the sum in the column footer of the hierarchy template does not update. I tried calling CalculateAggregates() on the GridView, but it doesn't seem to do anything for the hierarchy.
Dimitrina
Telerik team
 answered on 09 Jul 2013
1 answer
189 views
Hi,

I got a wpf application and i set it the Windows8 theme (default color blue).

In some point of the application i need to open a new RadWindow. I want that only this radwindow look like windows 8 not blue but orange, and the main window remain with the same windows8 blue theme.

something like the example image.

How can i achieve this?



best reagards.
Masha
Telerik team
 answered on 09 Jul 2013
3 answers
117 views
Hi,

We need to create a chart with multiple series. I created a RadCartesian chart which has a DateTimeCategoricalAxis as horizontal axis and a LinearAxis as vertical axis. For the series I use scatterpoint series.

<telerik:RadCartesianChart>
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeCategoricalAxis Title="Inspection Date" />
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis LineThickness="1"
                                    Title="Value">
                </telerik:LinearAxis>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.Series>
                <telerik:ScatterPointSeries ItemsSource="{Binding Path=InspectionHistory}"
                                            PointTemplate="{StaticResource PointTemplate1}"
                                            XValueBinding="InspectionDate"
                                            YValueBinding="Value" />
                <telerik:ScatterPointSeries ItemsSource="{Binding Path=InspectionHistory}"
                                            PointTemplate="{StaticResource PointTemplate2}"
                                            XValueBinding="InspectionDate"
                                            YValueBinding="MinimalValue">
                </telerik:ScatterPointSeries>
            </telerik:RadCartesianChart.Series>
             
            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
            </telerik:RadCartesianChart.Grid>
        </telerik:RadCartesianChart>

Currently the chart does not show the scatter points. If I change the horizontal axis into a linearaxis and bind the X value to another property, the chart is drawn. Why doesnt it work with the DateTimeCategoricalAxis ?

I am using the 2013 Q1 control.

Kind regards,
Mike
Evgenia
Telerik team
 answered on 08 Jul 2013
1 answer
467 views

Hi,

Currently we are dealing with a Problem of a blocking UI-Thread during the Initial dataload of our RadGridView.
Instead of the blocking UI-Thread we would expect the "running" BusyIndicator!
(During different Grid-Opertions (like Paging, Sorting,...) the BusyIndicator is displayed correctly).

We are using Entity-Framework and since we are having a really complex query-logic we are working with IQueryable Sources.
We have tried to set the data through Dependency-Property-Binding and also tried it manually.
As we found in the web the IQueryable-Source should be the best solution for large amount of data - isn't it?

Here are our attempts:
1) Using an IQueryable Dependency-Property

public static readonly DependencyProperty QueryableSourceProperty =

DependencyProperty.Register("QueryableSource", typeof(IQueryable<Data.TransactionHistory>), typeof(MainWindow), new PropertyMetadata(default(IQueryable<Data.SalesOrderDetail>)));


..
// different conditions... for examp

qeryableSource = queryableSource.OrderBy(o => o.TransactionType);

 

..

ItemsSource="{Binding QueryableSource, ElementName=window}"

2) Setting the ItemsSource-Property of the grid manuelly to our IQueryable

this.radGridElement.ItemsSource = queryableSource;

3) Run all operations asynchronous with Task and Dispatcher

new Task(() => { this.loadData2(); }).Start();


...
Dispatcher.BeginInvoke(
new Action(() => { this.QueryableSource = queryableSource; }));
...

All these samples didn't work as expected.
What's the best solution to bind the Grid on an IQueryable source, so that everything works asynchronously and the BusyIndicator is displayed during the loading-time???

Hopefully you can provide us with a solution...
I can provide you a sample .net application if you send me an upload-link...

Best regards
 Jürgen

Vera
Telerik team
 answered on 08 Jul 2013
2 answers
151 views
Hi everybody,
how can I retrieve the documentposition of a certain Span (not the current where the caret is in). The background is: I need to move the caret to a specific Span when pushing the FastForward / FastRewind button of a microphone to easily dictat in a RadRichTextBox.

Here is what I have yet:

List<NamedPermissionRangeStart> allPermissionRangeStarts = Document.EnumerateChildrenOfType<NamedPermissionRangeStart>().SkipWhile(a => a.Type != "Text").ToList();
            NamedPermissionRangeStart cur = (NamedPermissionRangeStart)Document.CaretPosition.GetCurrentSpanBox().AssociatedSpan.PreviousSibling;
 
            for (int i = 0; i < allPermissionRangeStarts.Count; i++)
            {
                if (allPermissionRangeStarts[i].InternalKey == cur.InternalKey)
                {
                    Document.CaretPosition.MoveToPosition(((Span)allPermissionRangeStarts[i + 1].NextSibling).?????)
                    break;
                }
            }


I hoped to find something that gives me the DocumentPosition where the "???" are.
Is this approach the right one?

Thanks in advance
Jo
JoRoSch
Top achievements
Rank 1
 answered on 08 Jul 2013
3 answers
228 views
How do you hide the header of the expander control, I'm using a checkbox to control it, or how do you change the arrow to be a checkbox.

thanks,

Pablo.
Petar Mladenov
Telerik team
 answered on 08 Jul 2013
7 answers
163 views
Hi Telerik, is it possible to show tree's line in the RadTreeListView like RadTreeView. There is a IsLineEnabled property in RadTreeView, but I can't see it in RadTreeListView.

Thanks,
Cheau
Dimitrina
Telerik team
 answered on 08 Jul 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?