Telerik Forums
UI for WPF Forum
5 answers
152 views
How to add adorner (like settings pane) to RadDiagramShape? I'd like my RadDiagramShape to have a mini-toolbar with buttons over the shape visible if shape is selected.
Petar Mladenov
Telerik team
 answered on 03 Mar 2016
1 answer
239 views

I have searched and found several articles about support for a Material Design theme in Kendo UI and other products, but I have not found any discussion about one for WPF.  Is there a Material theme available for the WPF Telerik controls that I have missed somewhere?

Thanks

pmont

Yana
Telerik team
 answered on 03 Mar 2016
2 answers
192 views

I have a RadCartesianChart with several line series, ShowTrackInfo is true, and I have a custom header set up exactly like is done here: http://docs.telerik.com/devtools/wpf/controls/radchartview/features/behaviors/trackball#trackinfoupdated .

It works great but I don't want to show the "Value: xxx Category: yyy" text fields any more. I just want to display my header in the trackinfo tooltip. How can I do this?

Sam
Top achievements
Rank 2
 answered on 02 Mar 2016
1 answer
431 views

We are encountering an issue where the UI with a Grid View in it freezes when you scroll the grid sideways a certain amount.

 

We are using nested column grouping in order to display a set of "calculated" values above the existing columns. The calculated values are displayed by setting the column group header template and binding to the fields on the control ancestor's data model.

 

The issue is, this worked perfectly fine with v2012.3.1129.40   . The grid would scroll across fine with very little slowdown.

Now with v2015.2.728.45 the grid starts off scrolling normally, but quickly stutters and eventually grinds to a completely unresponsive halt.

EnableColumnGroupsVirtualization is set to false because otherwise the middle nested column group headers do not show up at all (a separate issue I can reproduce in another forum thread if need be).

 

I have a project that can reproduce this but it doesn't seem like I'm allowed to attach it.

 

Essentially it is a grid with a number of grid column groups (50+) defined as follows, and simple GridViewColumns set to the innermost column group. 

 

<telerik:RadGridView.ColumnGroups>
            <telerik:GridViewColumnGroup
                Name="Outermost Group"
                Header="Outermost Group">
                <telerik:GridViewColumnGroup
                    Name="Inner1_1"
                    Header="Inner1_1">
                    <telerik:GridViewColumnGroup.HeaderTemplate>
                        <DataTemplate>
                            <TextBlock
                                HorizontalAlignment="Center"
                                Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ChartTest:MainWindow}, Path=DataContext[1]}" />
                        </DataTemplate>
                    </telerik:GridViewColumnGroup.HeaderTemplate>
 
                    <telerik:GridViewColumnGroup
                        Name="Inner1_2"
                        Header="Inner1_2">
                        <telerik:GridViewColumnGroup.HeaderTemplate>
                            <DataTemplate>
                                <TextBlock
                                    HorizontalAlignment="Center"
                                    Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ChartTest:MainWindow}, Path=DataContext[1]}" />
                            </DataTemplate>
                        </telerik:GridViewColumnGroup.HeaderTemplate>
 
                        <telerik:GridViewColumnGroup
                            Name="Inner1_3"
                            Header="Inner1_3">
                            <telerik:GridViewColumnGroup.HeaderTemplate>
                                <DataTemplate>
                                    <TextBlock
                                        HorizontalAlignment="Center"
                                        Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ChartTest:MainWindow}, Path=DataContext[1]}" />
                                </DataTemplate>
                            </telerik:GridViewColumnGroup.HeaderTemplate>
                        </telerik:GridViewColumnGroup>
                    </telerik:GridViewColumnGroup>
                </telerik:GridViewColumnGroup>
                </telerik:GridViewColumnGroup>
                </telerik:GridViewColumnGroups>
 

Ivan Ivanov
Telerik team
 answered on 02 Mar 2016
1 answer
169 views

Known affected versions: 2015.2.728, 2016.1.217, both net40 and net45

There appears to be a bug in the CommonHeaderPresenter VirtualizingStrategy when there are more than 2 levels of nested column groups.

The following code shows the bug in effect. When EnableColumnGroupsVirtualization is True, the Middle 2 group headers are not displayed. Only the outermost group (not referenced by any column) and the innermost group (referenced by the single column) are visible. (Also see attached image for demonstration)

 

01.<Window
03.    x:Class="chartTest.MainWindow"
08.    mc:Ignorable="d"
09.    Title="MainWindow"
10.    Height="350"
11.    Width="525">
12.    <telerik:RadGridView
13.        AutoGenerateColumns = "False"
14.        CanUserDeleteRows="False"
15.        CanUserSortColumns="False"
16.        CanUserResizeColumns="False"
17.        CanUserReorderColumns="False"
18.        CanUserResizeRows="False"
19.        CanUserFreezeColumns="False"
20.        CanUserInsertRows="False"
21.        CanUserSelect="True"
22.        CanUserSortGroups="False"
23.        ShowGroupPanel="False"
24.        NewRowPosition="None"
25.        ShowColumnFooters="False"
26.        RowIndicatorVisibility="Collapsed"
27.        EnableColumnGroupsVirtualization="True">
28.        <!-- Switch EnableColumnGroupsVirtualization between True and False to see the bug -->
29.        <telerik:RadGridView.ColumnGroups>
30.            <telerik:GridViewColumnGroup
31.                Name = "Outermost Group"
32.                Header="Outermost Group">
33.                <!-- These 2 middle groups do not show up when virtualization is used -->
34.                <telerik:GridViewColumnGroup
35.                    Name = "Middle 1 Group"
36.                    Header="Middle 1 Group">
37.                    <telerik:GridViewColumnGroup
38.                        Name = "Middle 2 Group"
39.                        Header="Middle 2 Group">
40.                        <telerik:GridViewColumnGroup
41.                            Name = "Innermost Group"
42.                            Header="Innermost Group">
43.                        </telerik:GridViewColumnGroup>
44.                    </telerik:GridViewColumnGroup>
45.                </telerik:GridViewColumnGroup>
46.            </telerik:GridViewColumnGroup>
47.        </telerik:RadGridView.ColumnGroups>
48.        <telerik:RadGridView.Columns>
49.            <telerik:GridViewColumn
50.                Width = "150"
51.                ColumnGroupName="Innermost Group" />
52.        </telerik:RadGridView.Columns>
53.    </telerik:RadGridView>
54.</Window>

 

I have tracked it down to the InitializeVisuals() method on VirtualizingStrategy (Controls\GridView\GridView\GridView\ColumnGroups\CommonHeaderPresenter.VirtualizingStrategy.cs).

At around line 69 it traverses the column groups for the current column group, and sets each child control's ParentGroup property to the TOP LEVEL (outermost) column group. Thus all child groups at all levels are flattened out as they are made direct children of the first level of column groups:

 

01.foreach (var columnGroup in ParentPresenter.ColumnGroups)
02.{
03.    ...
04. 
05.    this.TraverseColumnGroups(columnGroup,
06.        new Action<GridViewColumnGroup>((c) =>
07.    {
08.        if (!this.GroupNames.Contains(c.Name))
09.        {
10.            this.GroupNames.Add(c.Name);
11.            c.ParentGroup = columnGroup;
12.            c.DataControl = columnGroup.DataControl;
13.        }
14.    }));
15.}

 

I have managed to fix this by creating an overload for TraverseColumnGroups which takes an action which can act on both the Parent AND Child groups. Using this new action in the traversal from above results in the inner column group headers actually showing up in the test code from above.

The changes I had to make can be seen below (unrelated code excluded):

01.internal void TraverseColumnGroups(GridViewColumnGroup group, Action<GridViewColumnGroup, GridViewColumnGroup> action)
02.{
03.    foreach (var childGroup in group.ChildGroups)
04.    {
05.        action.Invoke(group, childGroup);
06.        this.TraverseColumnGroups(childGroup, action);
07.    }
08.}
09. 
10....
11. 
12.foreach (var columnGroup in ParentPresenter.ColumnGroups)
13.{
14.    ...
15.     
16.    this.TraverseColumnGroups(columnGroup,
17.        new Action<GridViewColumnGroup, GridViewColumnGroup>((parentGroup, childGroup) =>
18.    {
19.        if (!this.GroupNames.Contains(childGroup.Name))
20.        {
21.            this.GroupNames.Add(childGroup.Name);
22.                      childGroup.ParentGroup = parentGroup;
23.                      childGroup.DataControl = parentGroup.DataControl;
24.        }
25.    }));
26.}

 

I'm assuming this bug is not "works as designed", because why would only the OUTERMOST\First level column group header show up (even if it isn't directly referenced by any columns).

 

Thanks,

Sam

Ivan Ivanov
Telerik team
 answered on 02 Mar 2016
1 answer
98 views

Hi, at the moment I create a document using richtextbox with some merge fields. I then save the document as a .xaml so the file can be reused over and over. I convert the file from my database and import it using the code below

 

private void OpenTemplate()
{
   if (Attachments.SelectedItem != null)
   {
     var template = (FilesDTO) Attachments.SelectedItem;
 
     RadDocument result;
     var UnitOfWork = new UnitOfWork();
     XamlFormatProvider provider = new XamlFormatProvider();
 
     result = provider.Import(UnitOfWork.MailTemplateRepository.GetById(template.Id).FileXAML);
                
     radRichTextBox.Document = result;
     }
}

 

 After opening the file, I then populate the

radRichTextBox.Document.MailMergeDataSource.ItemsSource = UniversalCollection; 

When loading a .xaml document, the mailing tab buttons behave weird. If I were to press any button [show all field codes, preview result, previous, next] it will jump to the Home tab instead of maintaining on the mailings tab. 

 

It works completely fine if I don't open a xaml document. Am I missing something upon importing? 

 

 

Svetoslav
Telerik team
 answered on 02 Mar 2016
4 answers
232 views

Hi,

I have a GridView for a DesktopAlert. It is like the example in your demos. 

I have used the RowStyleSelector from the example. The properties "FontWeight" and "Background" work succesfull, however the property "Foreground" doesn't work. The color of text of the row is not changing. 

The code:

 

<UserControl.Resources>
       <localStyleSelector:MessageRowStyleSelector x:Key="RowStyleSelector">
           <localStyleSelector:MessageRowStyleSelector.BoldStyle>
               <Style TargetType="{x:Type telerik:GridViewRow}" BasedOn="{StaticResource GridViewRowStyle}">
                   <Setter Property="FontWeight" Value="Bold" />
                   <Setter Property="Background" Value="#FF9EAABF" />
                   <Setter Property="Background" Value="Red" />
               </Style>
           </localStyleSelector:MessageRowStyleSelector.BoldStyle>
           <localStyleSelector:MessageRowStyleSelector.NormalStyle>
               <Style TargetType="{x:Type telerik:GridViewRow}" BasedOn="{StaticResource GridViewRowStyle}" />
           </localStyleSelector:MessageRowStyleSelector.NormalStyle>
       </localStyleSelector:MessageRowStyleSelector>
       <localConverter:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
   </UserControl.Resources>

 

<telerik:RadGridView x:Name="gwMessages"
    ScrollViewer.VerticalScrollBarVisibility="Auto"                     
    Grid.Row="1"
    Grid.Column="0"
    ShowGroupPanel="False"
    SelectionChanged="OnGridViewSelectionChanged"
    ItemsSource="{Binding ReceivedMessagesCollection}"
    SelectedItem="{Binding SelectedMessage, Mode=TwoWay}"
    IsSynchronizedWithCurrentItem="True"
    RowStyleSelector="{StaticResource RowStyleSelector}"
    GroupRenderMode="Flat"
    AutoExpandGroups="True"
    AutoGenerateColumns="False"
    RowIndicatorVisibility="Collapsed"
    CanUserFreezeColumns="False"
    IsReadOnly="True"                   
    ColumnWidth="*">
    <telerik:RadContextMenu.ContextMenu>
        <telerik:RadContextMenu>
            <telerik:EventToCommandBehavior.EventBindings>
                <telerik:EventBinding Command="{Binding ContextMenuOpenedCommand}" EventName="Opened" PassEventArgsToCommand="True" />
            </telerik:EventToCommandBehavior.EventBindings>
            <telerik:RadMenuItem Header="Reply" />
            <telerik:RadMenuItem Header="Reply All" />
            <telerik:RadMenuItem Header="Forward" />
            <telerik:RadMenuItem IsSeparator="True" />
            <telerik:RadMenuItem Header="Mark as Unread" Command="{Binding MarkAsUnread_ContextMenuCommand}" />
        </telerik:RadContextMenu>
    </telerik:RadContextMenu.ContextMenu>
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="From" DataMemberBinding="{Binding Sender}" />
        <telerik:GridViewDataColumn Header="Subject" DataMemberBinding="{Binding Subject}" />
        <telerik:GridViewDataColumn Header="Received" DataMemberBinding="{Binding Received}" DataFormatString=" {0:dd/MM/yyyy hh:mm}" />
        <telerik:GridViewDataColumn Header="ReceivedDate" DataMemberBinding="{Binding ReceivedDate}" IsVisible="False" GroupHeaderFormatString=" {0:dd/MM/yyyy}" DataFormatString=" {0:dd/MM/yyyy}" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

 

Any help?

 

Thanks,

Stefan Nenchev
Telerik team
 answered on 02 Mar 2016
6 answers
233 views
I have attached an example which is 100% the First Look GanttView reduced to illustrate the problem I am experiencing.  The Fist Look works fine, my code is clearly missing something.

1. Run the app.
2. Make the Window wider.
3. Zoom all the way to 0 - you will notice now that the GanttView only takes about 1/2 the width of the window.
4. Zoom all the way to 100 - you will notice the GanttView does zoom in, but the width of th eGanttView stays the same.
5a. Make the Window wider  - the GanttView properly re-sizes  to fill the entire window.
5b Scroll the GanttView Horizontally - the GanttView properly re-sizes to fill the entire window.

The Fist Look works does not have the behavior.  The First Look does not also zoom out to where the GanttView does not fill the entire window.  I believe I'm missing something that sets a minimum zoom limit to keep this odd behavior from happening.

Ok, so apparently I can't attach a sample project .zip.  Strange.  How would you like me to send you this sample project?

Thanks,
Mike
Ben
Top achievements
Rank 1
 answered on 02 Mar 2016
1 answer
282 views

We have a standard WPF MVVM project.  In one view model we have a QueryableCollectionView to which a radgridview is bound.  When the user filters the grid we had expected the QueryableCollectionView.FilterDescriptors.CollectionChanged to be fired but nothing is happening.  When we inspect the FilterDescriptors through visual studio we can see the collection is present.  Is this binding incorrect or am I missing something else?

Any help appreciated:

 

DisplayTrades = new QueryableCollectionView(displayTradeSource, typeof(TradeViewModel));
DisplayTrades.FilterDescriptors.CollectionChanged += CollectionChanged_Event;

private void CollectionChanged_Event(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
           throw Exception("test");
}

 

 

Stefan
Telerik team
 answered on 02 Mar 2016
1 answer
81 views

Hi,

         I am trying to automate radgridview with 20 columns and 300 rows using CUIT/UIA. Here the script is unable to get the required row and cell in to view (auto scroll not working). If the row is visible it is able to perform action. We didn't implemented any virtualization  on the RADgridview.Any help in this regard is very much thankful.

 

Please reply as early as possible as it is very high priority issue.

 

Regards,

Nagasree.

      

 

Stefan
Telerik team
 answered on 02 Mar 2016
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
Slider
Expander
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?