Telerik Forums
UI for WPF Forum
3 answers
234 views

Hey guys,

I have a RadGridView in the UI of my application and bind it to a VirtualQueryableCollectionView shown in the example:
https://docs.telerik.com/devtools/wpf/consuming-data/using-data-virtualization
That works fine so far.

Since I have a client/server architecture, it may happen that the server updates the database table collection is "looking" on.

Let's say there are 41 entries in the table after the UI started. Then the server adds one entry to the database. Afterwards the server notifies the client and the client executes "view.Refresh();".

Due to sorting the new entry may appear in the UI BUT the VirtualItemsCount remains 41.

I cannot find any method that allows me to refresh/update the underlying collection so that the collection is synchronized to the database.

Is it possible to achive this behavior or do I have to recreate the VirtualQueryableCollectionView with "view = new VirtualQueryableCollectionView (query);" on each refresh?

 

I appreciate any feedback :)

Dilyan Traykov
Telerik team
 answered on 15 Mar 2018
1 answer
130 views

Is it possible to set the Positions property using a style?

Here's mine:

<Style x:Key="myStyle" TargetType="telerik:NumericIndicator" BasedOn="{StaticResource {x:Type telerik:NumericIndicator}}">
    <Setter Property="telerik:ScaleObject.Location" Value="Inside"/>
    <Setter Property="telerik:ScaleObject.RelativeX" Value="0.225"/>
    <Setter Property="telerik:ScaleObject.RelativeY" Value="0.4"/>
    <Setter Property="telerik:ScaleObject.RelativeHeight" Value="0.4*"/>
    <Setter Property="telerik:ScaleObject.RelativeWidth" Value="1.1*"/>
    <Setter Property="Foreground" Value="#FFCED2E4"/>  
    <Setter Property="Format" Value="{}{0:F1}"/>
    <Setter Property="Positions">
        <Setter.Value>
            <telerik:NumberPositionCollection>
                <telerik:FontNumberPosition CornerRadius="15,0,0,15" />
                <telerik:FontNumberPosition/>
                <telerik:FontNumberPosition/>
                <telerik:FontNumberPosition/>
                <telerik:FontNumberPosition/>
                <telerik:FontNumberPosition/>
                <telerik:FontNumberPosition CornerRadius="0,15,15,0"/>
            </telerik:NumberPositionCollection>
        </Setter.Value>
    </Setter>
</Style>

 

Doesn't seem to work. The NumericIndicator is aligned ok (I can see the rectangle positioned correctly in VS designer) but there are no visible NumberPosition objects.

Properties window shows that the Positions property value is an empty collection, and the little rectangle (after the "..." button) is gray. I.e., not indicating that the Positions property is bound to anything.

Vladimir Stoyanov
Telerik team
 answered on 14 Mar 2018
1 answer
557 views

Hi,

I am using radgridview in my wpf application.When I drag and drop a column to the group panel, the sorting of groups is not done numerically as it is a string field.

I want the grouped data to be sorted numerically.

Any help would be really appreciated.

Dilyan Traykov
Telerik team
 answered on 14 Mar 2018
3 answers
169 views
Hello, I'm trying to style the Row Details, and I'm following the instructions on the help here: http://www.telerik.com/help/wpf/gridview-styling-row-details.html
I'm not seeing the properties shown in the help file. I should see ControlOuterBorder, ControlInnerBorder, etc.. according to the help. I'm using Blend for VS 2013 Do you have a video, or a sample project that does this? Any help will be greatly appreciated .
Thanks,
Scott

Here's the XAML I get.
<Style x:Key="RowDetailsStyleCustom" TargetType="{x:Type telerik:DetailsPresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:DetailsPresenter}">
<Border x:Name="DetailsBorder" BorderBrush="#FF848484" BorderThickness="0,1">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="DetailsStates">
<VisualState x:Name="DetailsVisible">
<Storyboard>
<ObjectAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DetailsBorder">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="DetailsCollapsed"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<ContentPresenter x:Name="PART_ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Visibility" Value="Collapsed"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFC2C2C2"/>
<GradientStop Color="#FFF0F0F0" Offset="0.3"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="White"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
</Style>
</Window.Resources>



Stefan
Telerik team
 answered on 14 Mar 2018
1 answer
802 views

After some digging I still am not able to get this to work.
In short, I would like to use the Telerik Components with my own Dictionary.xaml.
Can someone please point me in the right direction or describe what needs to be done.

 

You time in this is much appreciated.

Martin
Telerik team
 answered on 14 Mar 2018
2 answers
112 views

It would be a nicer UX if a user did not have to first move the frozen column indicator in order to resize a column.

I am happy to style it myself this way but I am struggling to find the correct element, is it the PART_FrozenColumnsPreview element?

 

Regards,
Maurice

Maurice
Top achievements
Rank 1
 answered on 13 Mar 2018
1 answer
122 views
Hello, my case is: I have a RadContextMenu, and there's a RadListBox filling the RadMenuGroupItem of the RadContextMenu.  And then I added a TextBlock in the ItemTemplate of the RadListBox. And finally, I added a ContextMenu on this TextBlock, this ContextMenu on TextBlock didn't work. Right clicking on the TextBlock which is also the an Item of the RadListBox, no ContextMenu pop up, nothing happened.  So what's the reason of it?  Is this kind of case supported?  Thanks for any comments, that would be great help for me, thanks a lot. 
Stefan
Telerik team
 answered on 13 Mar 2018
1 answer
222 views

Hi, I'm trying to use the PDF Viewer control, everything works nicely except for one thing,

he toolbar theme won't change no matter what I select.

 

            <telerik:RadPdfViewerToolBar x:Name="pdfViewTools"
                                         RadPdfViewer="{Binding ElementName=pdfViewer, Mode=OneTime}"
                                         telerik:StyleManager.Theme="Fluent"
                                         HasClockwiseButton="False"
                                         HasCounterclockwiseButton="False"
                                         HasOpenButton="False"
                                         HasPageDownButton="False"
                                         HasPagesCountGroup="False"
                                         HasPageUpButton="False"
                                         HasSignatureButton="False"/>
            <telerik:RadPdfViewer x:Name="pdfViewer"
                                  DataContext="{Binding CommandDescriptors, ElementName=pdfViewer}"
                                  Grid.Row="1"
                                  telerik:StyleManager.Theme="Fluent"
                                  telerik:RadPdfViewerAttachedComponents.RegisterContextMenu="True"/>

 

Where am I going wrong?

Tanya
Telerik team
 answered on 13 Mar 2018
3 answers
247 views

Hello,

I'm working on a scenario where i have to use 2 different types of appointments, with different properties. both share a common abstract base class, which is derived from the Appointment Class.

public abstract class MyBaseClass : Appointment
{
    private string _designation;
 
    public string Designation
    {
        get { return this.Storage<MyBaseClass>()._designation; }
        set
        {
            var storage = this.Storage<MyBaseClass>();
            if (value == storage._designation) return;
            storage._designation = value;
            this.OnPropertyChanged(() => this.Designation);
        }
    }
}
 
public class DerivedType : MyBaseClass
{
    private string _longText;
 
    public string LongText
    {
        get { return this.Storage<DerivedType>()._longText; }
        set
        {
           var storage = this.Storage<DerivedType>();
            if (value == storage._longText) return;
            storage._longText = value;
            this.OnPropertyChanged(() => this.LongText);
        }
    }
}
 
public class OtherType : MyBaseClass
{
    private bool _myBool;
 
    public bool MyBool
    {
        get { return this.Storage<OtherType>()._myBool; }
        set
        {
            var storage = this.Storage<OtherType>();
            if (value == storage._myBool) return;
            storage._myBool = value;
            this.OnPropertyChanged(() => this.MyBool);
        }
    }
}

 

When using a ListBox, i would simply put multiple datatemplates with DataType={x:Type ...} into the listbox resources. As this did not work, I tried to override  ScheduleViewDataTemplateSelector:

public override DataTemplate SelectTemplate(object item, DependencyObject container, ViewDefinitionBase activeViewDefinition)
{
     Occurrence o = (item as Occurrence);
     if (o.Appointment is DerivedType)
     return this.DerivedTypeTemplate;
...
}

 

<local:TelerikScheduleTemplateSelector x:Key="ScheduleTemplateSelector">
    <local:TelerikScheduleTemplateSelector.DerivedTypeTemplate>
        <DataTemplate>
            <Grid Background="LightGray">
                <Grid.RowDefinitions>
                    <RowDefinition MinHeight="15"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Label Grid.Row="0" Content="{Binding Appointment.LongText}" />
                <Label Grid.Row="1" MinHeight="30" Margin="2"  Background="Green" />
            </Grid>
        </DataTemplate>
 
        <local:TelerikScheduleTemplateSelector.OtherTypeTemplate>
            <DataTemplate>
                <Grid Background="LightGoldenrodYellow">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="20"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <CheckBox Grid.Row="0" Margin="2" IsChecked="{Binding Appointment.MyBool}" Content="asdf" />
                </Grid>
            </DataTemplate>
        </local:TelerikScheduleTemplateSelector.OtherTypeTemplate>
</local:TelerikScheduleTemplateSelector>

 

this seems to work partially, but I found some problems:

-> the bindings are not recognized, as I cannot set the DataType to DerivedType or to OtherType 
-> Sometimes when switching to other weeks in the scheduleview, I get Binding Errors, because of a missing MyBool Property on DerivedType, and vice-versa

Is there an easier way to get different looks based on the type of the appointment? Could you point me in the right direction, or maybe provide a small sample?

Thanks a lot!

                         

 

 

Stefan
Telerik team
 answered on 13 Mar 2018
5 answers
265 views

Hi, 

we are using the rad docking and set a automationid to all levels (RadDocking, RadSplitContainer, RadPaneGroup and RadPane) but if we let the CUIT run it needs much time or he doesn´t find the control.

Also if we check the UI with AccChecker we can see that there is no AutomationId set. 

If have downloaded a example from this thread:

https://www.telerik.com/forums/cuit-is-failing-perform-actions-on-the-controls-placed-inside-the-radpanegroup#g4MK_X_CbU-XMfaGOlK9vg

But it doesn´t work on my computer and I can see that there is no automationid set. 

See AutomationIds in the Code.jpg file.

In the file ACC.jpg you could see that there is no AutomationId found. 

Currently it´s not possible to upload the source code because it´s to big and it´s not allowed.

Could you tell me where we miss something or is it a bug?

Thanks for your help.

 

Kalin
Telerik team
 answered on 13 Mar 2018
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?