Telerik Forums
UI for WPF Forum
7 answers
208 views
Hi! Sometimes when I select some text in TextBox I get next error:

System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Telerik.Windows.Documents.Layout.SpanLayoutBox.BinarySearchSplitIndex(SpanLayoutBox spanBox, Single availableWidth)
   at Telerik.Windows.Documents.SpanBoxPositionHandler.MoveToLocation(PointF location)
   at Telerik.Windows.Documents.DocumentPosition.SetPosition(PointF position, Boolean moveToNextIfOutOfBox)
   at Telerik.Windows.Documents.Selection.MouseSelectionHandler.UpdateSelectionAndCaretPosition()
   at Telerik.Windows.Documents.Selection.MouseSelectionHandler.RegisterDocumentMouseMove(Point position, SourceType source)
   at Telerik.Windows.Documents.UI.DocumentPresenterBase.HandleMouseMoveOnPosition(Point position, SourceType source)
   at Telerik.Windows.Documents.UI.DocumentPresenterBase.Owner_MouseMove(Object sender, MouseEventArgs e)

How I can catch this error for handling?
Tanya
Telerik team
 answered on 26 Apr 2018
2 answers
145 views

     Hi, i'm using RadBreadcrumb in my WPF app and cannot find the way to handle when user Paste path in TextMode ? I.e. -

1) click on Breadcrumb , it will switch to text mode,

2) press Ctrl+C (Copy),

3) press Esc (to switch off TextMode)

4) Now goto another path , to make break crumb show different path

5) click on Breabcrumb, it will switch to TextMode

6) press Ctrl+V (Paste)

Any idea how i can handle that ?

Charles Goh
Top achievements
Rank 1
 answered on 26 Apr 2018
2 answers
559 views

Hi,

we had UI.for.Wpf version 2016.3.1024 before and we updated to 2018.1.122. We started to have problem after update.

Scenario: We have background worker which starts long running operation. When it finishes, we do some actions in WorkerCompleted event handler. We show RadWindow. When its closed, we do some data refresh there and then we programatically change tab in Ribbon to show user final list with results.

Then app seems to be frozen. Better to say, it is shown on screen, but I can click on items behind window. fe if there is desktop behind, I can manipulate items on desktop.

Steps to unfreeze: Click on application incon in task bar. App gets minimized. Then click on that icon again and app gets maximized. App is then working fine again.

Unfortunately, its so rare that we cant debug it or at least create some demo for you. So, we dont know what is suddently causing this. Our observation is that it happens on Win 10.

Question is now, what can we do to prevent this strange behavior? sure, we can downgrade previous version we used. Any other suggestions? Can you help us please?

Kalin
Telerik team
 answered on 26 Apr 2018
1 answer
107 views

Greetings,

I need to slightly change the GridViewGroupPanel of the WPF GridView to include a close button. After creating a copy of the GridViewGroupPanel Style via Visual Studio, it seems that the visual state changes are no longer firing. I've made no changes to the style after the copy was created, and I can see that the copy contains the visual states for changing the panel text after groups are added, but it doesn't change after dragging a column to the group bar.

Was wondering if perhaps I was missing something? I wouldn't think creating a copy of the control style (no modifications) would disable the visual states..

Vladimir Stoyanov
Telerik team
 answered on 25 Apr 2018
1 answer
188 views

hello,

i am new to the telerik controls and i have a question to the radtreeview.

I have two normal classes and a hierarichal template. Everything works fine and the data is shown in tree.

Instead of the normal class i want to use the radtreeviewitem. I try to inherit wich works for the nodes but

not for the childs. Can you please give me a advice how to do this. Here is my code and my problem is

the Children property in the class recursiveObject. Thank you and greetings ....

public static ObservableCollection<RecursiveObject> FillRecursive(List<FlatObject> flatObjects, int parentId)
{
    ObservableCollection<RecursiveObject> recursiveObjects = new ObservableCollection<RecursiveObject>();
    foreach (var item in flatObjects.Where(x => x.ParentId.Equals(parentId)))
    {
        recursiveObjects.Add(new RecursiveObject
        {
            Data = item.Data,
            NodeId = item.Id,
            Menge = item.Menge,
            Selected = false,
            ParentKey = item.ParentId,
            Children = FillRecursive(flatObjects, item.Id)
        });
    }
    return recursiveObjects;
}
 
public class FlatObject
{
    public int Id { get; set; }
    public int ParentId { get; set; }
    public string Data { get; set; }
    public int Menge { get; set; }
 
    public FlatObject(string name, int id, int parentId, int menge)
    {
        Data = name;
        Id = id;
        ParentId = parentId;
        Menge = menge;
    }
}
 
public class RecursiveObject : RadTreeViewItem
{
    public bool Selected { get; set; }
    public int NodeId { get; set; }
    public int ParentKey { get; set; }
    public string Data { get; set; }
    public int Menge { get; set; }
    public ObservableCollection<RecursiveObject> Children { get; set; }
}
Martin Ivanov
Telerik team
 answered on 25 Apr 2018
4 answers
141 views

Hi, Is there a way to change the ResourceType orientation to vertical, but mantaining the days  in horizontal?

We want to make something like in the attached file.

Greetings.

 

Carlos
Top achievements
Rank 1
 answered on 25 Apr 2018
4 answers
339 views

Hi,

I have a relatively simple RadGridView with a datapager. On one machine everything works fine. However, when I check out the sources to another machine everything works, but the datapager does not display, and there is no indication of an error. Any ideas how I could track this down?

Thanks ... Ed

 

Dilyan Traykov
Telerik team
 answered on 25 Apr 2018
2 answers
282 views

Hi ,

i using MVVM and the problem i have is i capture RowValidating  Event which is routedto a Method OnValidatingRow(arg)

 

DoValidatingRow = new DelegateCommand<object>(OnValidatingRow);

there i checkif valid or not and setting in some cases evnt.IsValid = false;

public override void OnValidatingRow(object arg)
        {
            var evnt = (GridViewRowValidatingEventArgs)arg;

    evnt.IsValid = false;

 

 

 

 

 

<telerik:RadGridView x:Name="LookupListGridCtrl" ItemsSource="{Binding Nodes, Mode=TwoWay}" SelectedItem="{Binding Nodes.SelectedUiDataItem,Mode=TwoWay}"  Grid.Row="1"
                             AutoGenerateColumns="false" GroupRenderMode="Flat" NewRowPosition="Top"  SelectionMode="Single" SelectionUnit="FullRow"
                             CanUserDeleteRows="True" ScrollMode="Deferred" IsSynchronizedWithCurrentItem="True" CanUserResizeColumns="True" CanUserSearch="True"
                             RowIndicatorVisibility="Visible" Margin="0,0,0,1" ValidationType="Default">

            <telerik:EventToCommandBehavior.EventBindings>
                <telerik:EventBinding Command="{Binding CommandProvider.DoDeleteRow}" EventName="Deleted" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
                <telerik:EventBinding Command="{Binding CommandProvider.DoInsertRow}" EventName="RowEditEnded" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
                <telerik:EventBinding Command="{Binding CommandProvider.DoAddNew}" EventName="AddingNewDataItem" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
                <telerik:EventBinding Command="{Binding CommandProvider.DoValidatingCell}" EventName="CellValidating" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
                <telerik:EventBinding Command="{Binding CommandProvider.DoValidatingRow}" EventName="RowValidating" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
            </telerik:EventToCommandBehavior.EventBindings>

Dilyan Traykov
Telerik team
 answered on 25 Apr 2018
9 answers
115 views
I recently had to switch to a new computer, from win 7 to win 10, and after I installed everything, I loaded my project, rebuilt it, and it all works fine(so far) except the RadDiagram control will not display.  What could I be doing/not doing that would cause this.
Dinko | Tech Support Engineer
Telerik team
 answered on 25 Apr 2018
7 answers
210 views

Hi,

 

Sorry if my question has been asked already in this forum.

I'm using a RadMaskedTextInput with a dynamic MASK set in code behind. My current mask is d4Sd3. Therefore, I am expecting 4 digits followed with a capital S and then another 3 digits.

It works well except that in my code behind I would like to get the full content of the input. If I type in 1234567 it displays 1234S567 which is perfect, but then in my code behind I only get 1234567 and the "S" is gone. I need this S to remain in this string. How can I achieve such thing ? This is just an example, it could be any sort of mask.

 

Cheers,

 

Chris

Claire
Top achievements
Rank 1
 answered on 24 Apr 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?