Telerik Forums
UI for WPF Forum
2 answers
206 views

Hello. I'm new to using Telerik and I'm experiencing strange behavior when editing data in the RadGridView control. I have a GridViewMaskedInputColumn and I lose the first character if I start editing the content of the cell by pressing 2 or more keys in quick succession. I've searched and searched these forums (as well as Telerik's guides and Google), but I could not find anything that helped. Please forgive me if I overlooked something.

My project currently using version 2018.1.122.45 of Telerik's WPF suite. 

Here's a snippet of my XAML, please let me know if more detail is needed. 

<telerik:RadGridView Name="MainGridView"
                   AutoGenerateColumns="False"
                   CanUserDeleteRows="False"
                   CanUserInsertRows="False"
                   CanUserReorderColumns="True"
                   CellValidating="MainGridView_CellValidating"
                   IsBusy="{Binding IsGridRefreshing}"
                   IsFilteringAllowed="False"
                   IsSynchronizedWithCurrentItem="True"
                   EditTriggers="TextInput"
                   RowIndicatorVisibility="Collapsed"
                   SelectionMode="Single"
                   SelectionUnit="FullRow"
                   ShowGroupPanel="False"
                   ShowSearchPanel="True"
                   ItemsSource="{Binding Path=DetailGridVM.TblDetailGrid}"
                   SelectedItem="{Binding Path=DetailGridVM.SelectedDetail, Mode=TwoWay}">
     
        <telerik:GridViewMaskedInputColumn Header="Vendor Number"
                                          Mask=">a6"
                                          MaskType="Standard"
                                          Name="GV_Column_VendorNumber"
                                          Width="65"
                                          DataMemberBinding="{Binding VendorNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
 
            <telerik:GridViewMaskedInputColumn.HeaderCellStyle>
                <Style TargetType="telerik:GridViewHeaderCell">
                    <Setter Property="TextAlignment" Value="Center"/>
                    <Setter Property="TextWrapping" Value="Wrap"/>
                    <Setter Property="Background" Value="#FF9AE1B4"/>
                    <Setter Property="Foreground" Value="Black"/>
                </Style>
            </telerik:GridViewMaskedInputColumn.HeaderCellStyle>
             
            <telerik:GridViewMaskedInputColumn.EditorStyle>
                <Style TargetType="telerik:RadMaskedTextInput">
                    <Setter Property="SelectionOnFocus" Value="SelectAll"/>
                </Style>
            </telerik:GridViewMaskedInputColumn.EditorStyle>
        </telerik:GridViewMaskedInputColumn>
     
</telerik:RadGridView>

 

Please note that the "Mask" property for the column object doesn't actually contain the ">" sign. It uses the correct notation as demonstrated in Telerik's guide, I just can't figure out how to escape it in this forum. 

Thank you for any assistance. 

 

Alex
Top achievements
Rank 1
 answered on 04 Dec 2018
0 answers
135 views

Hello, my task is show visible links between appoinments (example in the attachment).

Can you explain me how i can recieve the coordinates of each AppointmentItem?

I can recieve it by VisualTreeHelper, but using this approach i recieve only AppointmentItems which are prepared for drawing (due virtualization).  

Maybe i can use more simple way to recieve the coordinates? Or maybe i can disable virtualization for the RadScheduleView?

Иван
Top achievements
Rank 1
 asked on 04 Dec 2018
1 answer
116 views

Hi

  We get this a Critical Error when we try to move around an event in a RadScheduleView:

 

System.NotSupportedException: Specified method is not supported.
   at Telerik.Windows.Controls.DraggedAppointmentsToLocalizedStringConverter.Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.Activate(Object item)
   at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
   at System.Windows.Data.BindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
   at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
   at MS.Internal.Data.DataBindEngine.Run(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

 

  Currently we use Telerik version 2018.3.911.45 (Runtime Version V4.0.3.319).

  How can we fix this error?

Thank You,

Dave

 

 

 

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Dec 2018
4 answers
740 views

Hi,

 

I'm having some problem with the synchronizing the combobox, when ItemsSource updates.

When I select an object and the combobox update, the item is perfectly synchronized with the selected objects value.

My problem is that my application poll new items every 10 sec and update/refresh the itemssource.  I'm using isSynchronizedWithCurrentItem = true and the combobox just set the first item by default, instead of displaying the actual value from the selected object, as before the itemssource updated.

 

How can I fix this?

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Dec 2018
2 answers
227 views

  I've been having version issues with the Telerik DLLs so after lots of research and attempting to fix the issues to no avail I've decided to start a clean project and move my code over piece by piece in hopes of finding the culprit.  Everything is going well so far except my AutoCompleteBox does not show up in design mode or at runtime.  The XAML shows no errors and if you select the markup it highlights where the control should be but it remains invisible.  I had a similar problem with the RadButton but solved that by switching to the native WPF button.

Here is my XAML

01.<telerik:RadAutoCompleteBox Width="300"
02.             ItemsSource="{Binding Transaction.Carriers}"
03.             SelectedItem="{Binding Transaction.SelectedCarrier}"
04.             TextSearchMode="Contains"
05.             AutoCompleteMode="Suggest"
06.             SelectionMode="Single"
07.             TextSearchPath="Name"
08.             FilteringBehavior="{StaticResource CustomAutoCompleteFiler}"
09.             />

 

This worked fine in my previous project until I started getting the weird errors that set off a frustrating chain of events that led me here. As for Telerik references I tried to minimize down to only what I absolutely needed.  At the moment I have Telerik.Windows.Controls and Telerik.Windows.Controls.Input.  This project was made using the Telerik WPF Project Template so I assumed all controls should work fine.  I am also using RadGlyphs and they are rendering just fine.

 

 

Vladimir Stoyanov
Telerik team
 answered on 03 Dec 2018
8 answers
2.4K+ views
Severity Code Description Project File Line Suppression State
Error Unknown build error, 'Cannot resolve dependency to assembly 'Telerik.Windows.Documents.Spreadsheet, Version=2016.2.421.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Line 442 Position 76.' TelerikWpfApp2 D:\visual studio 2015 Projects\TelerikWpfSolution\TelerikWpfApp2\Views\MailView.xaml 442
Tanya
Telerik team
 answered on 03 Dec 2018
4 answers
126 views

Hi,

what is the simplest way to change this white background behind tab "Home" as you can see on screenshot?

Thanks.

Tanya
Telerik team
 answered on 03 Dec 2018
2 answers
103 views

Hi, I'm running into an issue with the RadRibbonTab obscuring other content that should be in front of it.

The easiest way to illustrate this is with the attached screenshot. I put a breakpoint in the app when I click on an item inside the radRibbontab what is part of the RadRibbonView. The Z-order of the tab is higher than anything else on the screen, in this case obscuring other applications like visual studio. Note the order of the layers in the screenshot is my running WPF app is behind visual studio as expected, but the expanded ribbon tab is in front of it, obscuring part of visual studio.

This causes other issues in the application as well where the tab obscures other controls until the user explicitly hides the rad ribbon tab by focusing on the other control.

I am using VS Professional 2017, Version 15.8.0, .net version 4.7 and Telerik UI for WPF R3 2018

Thank you,

 

Chris

Krzysiek
Top achievements
Rank 1
 answered on 29 Nov 2018
1 answer
353 views

     Hi,

i'm trying to use KeyboardCommandProvider, with binding in a MVVM scenario for managing the Enter key(i don't want to move down). I've read this post, https://docs.telerik.com/devtools/wpf/controls/radgridview/commands/keyboardcommandprovider and i try to implement my CustomKeyboardCommandProvider without success; i've a usercontrol with insede a GridView but i've an error message: "The type CustomKeyboardCommandProvider does not include any accessibile constructor". How can i solve it in my scenario?

This is my code:

XAML:

<UserControl.Resources>
        <Conditional:CustomKeyboardCommandProvider x:Key="MyKeyboardCommand" />
    </UserControl.Resources>

<telerik:RadGridView Grid.Column="0" Grid.Row="1" Name="MyRadGridArtworks"
                                ItemsSource="{Binding GridViewList, Mode=TwoWay}"
                                SelectedItem="{Binding GridViewRowSelected, Mode=TwoWay}"                                            
                                EnableColumnVirtualization="False"
                                ValidatesOnDataErrors="None"              
                                ShowColumnSortIndexes="False"
    AutoGenerateColumns="False"
                                telerikControls:StyleManager.Theme="Office2013"                                          
    ColumnWidth="auto"                                         
    CanUserFreezeColumns="True"
                                LeftFrozenColumnCount="3"
                                ShowColumnFooters="True"                                      
                                KeyboardCommandProvider="{StaticResource MyKeyboardCommand}"
                                IsLocalizationLanguageRespected="False"
    RowIndicatorVisibility="Collapsed">

</telerik:RadGridView>

C# --> CustomKeyboardCommandProvider

public class CustomKeyboardCommandProvider : DefaultKeyboardCommandProvider
    {
        private GridViewDataControl dataControl;

        public CustomKeyboardCommandProvider(GridViewDataControl dataControl ) : base(dataControl)
        {
            this.dataControl = dataControl;
        }

        public override IEnumerable<System.Windows.Input.ICommand> ProvideCommandsForKey(System.Windows.Input.Key key)
        {

            if (key != System.Windows.Input.Key.Return)
                // use default behavior for all keys except Return
                return base.ProvideCommandsForKey(key);

            List<ICommand> commandsToExecute = new List<ICommand>();

            if (this.dataControl.CurrentCell == null)
                return commandsToExecute;

            if (this.dataControl.CurrentCell.IsInEditMode)
            {
                commandsToExecute.Add(RadGridViewCommands.CommitEdit);
            }
            else
            {
                commandsToExecute.Add(RadGridViewCommands.ActivateRow);
            }

            return commandsToExecute;
        }
    }

Dilyan Traykov
Telerik team
 answered on 29 Nov 2018
1 answer
199 views

Hello,

I have problem with displaying group headers after when ever I change date in timeline view. There is xaml for schedule view:

<model:OrientedGroupHeaderContentTemplateSelector x:Key="GroupHeaderContentTemplateSelector">
            <model:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
                <DataTemplate>
                    <Border Background="{Binding Name.Brush}" Width="250" Margin="1 0 1 0">
                        <StackPanel Margin="10 10 10 10" Orientation="Horizontal">
                            <TextBlock Foreground="{StaticResource GroupHeaderForeground}" FontSize="16" Margin="0" Text="{Binding Name.Name}" />
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </model:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
            <model:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
                <DataTemplate>
                    <Border Background="{Binding Name.Brush}" Width="250" Margin="1 0 1 0">
                        <StackPanel Margin="10 10 10 10">
                            <TextBlock Foreground="{StaticResource GroupHeaderForeground}" FontSize="16" Margin="0" Text="{Binding Name.Name}" />
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </model:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
        </model:OrientedGroupHeaderContentTemplateSelector>
 
<LinearGradientBrush x:Key="ReadOnlyBrush" MappingMode="Absolute" SpreadMethod="Repeat" StartPoint="0,0"
                EndPoint="1,1">
            <LinearGradientBrush.Transform>
                <ScaleTransform ScaleX="3" ScaleY="3" />
            </LinearGradientBrush.Transform>
            <GradientStop Offset="0.15" Color="#FF4040C2" />
            <GradientStop Offset="0.15" Color="White" />
        </LinearGradientBrush>
 
        <model:SpecialSlotStyleSelector x:Key="SpecialSlotStyleSelector">
            <model:SpecialSlotStyleSelector.NonWorkingHourStyle>
                <Style TargetType="telerik:HighlightItem">
                    <Setter Property="Canvas.ZIndex" Value="{Binding Slot.ZValueIndex}"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Border Background="{StaticResource ReadOnlyBrush}" Opacity="0.7" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </model:SpecialSlotStyleSelector.NonWorkingHourStyle>
        </model:SpecialSlotStyleSelector>
<telerik:RadScheduleView  SpecialSlotsSource="{Binding SpecialSlots}"  GroupDescriptionsSource="{Binding GrpDescriptionCollection,UpdateSourceTrigger=PropertyChanged}" GroupHeaderContentTemplateSelector="{StaticResource GroupHeaderContentTemplateSelector}" ResourceTypesSource="{Binding ResourceTypesCollection, UpdateSourceTrigger=PropertyChanged}" AppointmentsSource="{Binding SeznamOperaciPlan, UpdateSourceTrigger=PropertyChanged}">                       
                        <telerik:RadScheduleView.ViewDefinitions>
                            <telerik:TimelineViewDefinition Orientation="Vertical" TimerulerGroupStringFormat="{}{0:dddd - dd.MM.yyyy}" VisibleDays="6" GroupTickLength="1d" MajorTickLength="1h" MinorTickLength="15min" TimerulerMajorTickStringFormat="{}{0:HH:mm}" TimerulerMinorTickStringFormat=":{0:mm}" StretchAppointments="True" StretchGroupHeaders="False" Title="Timeline"/>
                        </telerik:RadScheduleView.ViewDefinitions>
                    </telerik:RadScheduleView>

GroupDescriptionsSource and ResourceTypesSource are initialized and filled by some data in view model constructor.
On image grupheader-ok.jpg - is all OK and this what I want every when I change date, but if I go to the future date, it displays like on image groupheader-problem.jpg and If I go back to the actual week (current date) then it displays like on image groupheader-problem-back.jpg.

Where could be problem?

Thank you for your answers.

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 29 Nov 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
InlineAIAssistant
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?