Telerik Forums
UI for WPF Forum
1 answer
191 views

Hello,

I have RadDiagram with some shapes

I tried to arrange the shapes to be one on/under other and using send backward and bring forward actions, but there is a bug in that actions

The problem is that if I clicked send backward when the shape is already in backward and then click bring to front, I have to click the same times that I clicked send backward before (if I clicked 3 times after the shape was in backward, I have to click 3 times till the shape will bring to front)

I saw the bug also in telerik demos

How can I fix this bug?

Thanks

Martin Ivanov
Telerik team
 answered on 11 Feb 2019
1 answer
902 views

Hi,

I'm looking for the best component to show some Json code

As optional it should format and highlight the code

 

Thank you

Dilyan Traykov
Telerik team
 answered on 08 Feb 2019
1 answer
554 views
Is it possible to overwrite the RadGridView Search logic and implement a custom search logic ?
My Problem is that the search works only good on text. In our grid we have columns with Date and / or columns with numbers. The search performs really poor on these types. 

I attached two gif files to showcase my problem.
Dilyan Traykov
Telerik team
 answered on 08 Feb 2019
11 answers
1.6K+ views

I have the following implicit style:

    <Style TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="FontSize" Value="18" />
        <Setter Property="Foreground" Value="Green" />
    </Style>

However, only the foreground color changes - all font settings are ignored. 

Searched this forum, I don't think it is Theme related, but I am using the Crystal theme

Dilyan Traykov
Telerik team
 answered on 08 Feb 2019
1 answer
408 views

Hi, I am having an issue with a standalone RadMultiColumnComboBox.  It needs to be populated differently each time I select a different entity (User) from a RadGridView.  As I understand it the only way to do this is with events. 

The problem is that I run into an exception when I try to clear the selected items from the MCCB (basically, I need to reset it), and add the new selections.  I get various ObservableCollection changed event exceptions.  

What is the correct way to do this to avoid these type of exceptions? 

Thanks,

Ian

 

Here is the code I use so far: 

 

Private changingUser As Boolean = False
 
Private Sub RadMultiColumnComboBox_SelectionChanged(sender As Object, e As SelectionChangeEventArgs)
    Try
        SyncLock lockObject
            If changingUser Then
                e.Handled = True
                changingUser = False
                Exit Sub
            End If
        End SyncLock
 
        If e.AddedItems.Count = 0 AndAlso e.RemovedItems.Count = 0 Then Exit Sub
        vm.AddRemoveRoles(e.AddedItems, e.RemovedItems)
    Catch ex As Exception
    Finally
        e.Handled = True
    End Try
End Sub
 
Private Sub Grid_SelectionChanged(sender As Object, e As SelectionChangeEventArgs)
    Try
        SyncLock lockObject
            changingUser = True
        End SyncLock
        RolesBox.SelectedItems.SuspendNotifications() 'RolesBox is the RadMultiColumnComboBox
        RolesBox.SelectedItems.Clear()
        Dim roles = vm.GetSelectedUserRoles
        For Each r In roles
            RolesBox.SelectedItems.Add(r)
        Next
    Catch ex As Exception
    Finally
        RolesBox.SelectedItems.ResumeNotifications()
 
        SyncLock lockObject
            changingUser = False
        End SyncLock
 
    End Try
 
End Sub

 

Here is an example of the exceptions I am getting: 

System.InvalidOperationException: 'Cannot change ObservableCollection during a CollectionChanged event.'

   at System.Collections.ObjectModel.ObservableCollection`1.CheckReentrancy()
   at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
   at System.Collections.ObjectModel.Collection`1.Remove(T item)
   at Telerik.Windows.Controls.RadMultiColumnComboBox.OnSelectedItemPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.MultiColumnComboBox.SelectionBridge.ItemsSelectedInOwner(IEnumerable`1 addedItems)
   at Telerik.Windows.Controls.MultiColumnComboBox.SelectionBridge.OwnerSelectedItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Feb 2019
1 answer
138 views
I've ready through the migration guide, overview, and DragDropPayloadManager guides, but there is still not enough information to migrate my existing code.Even the migration guide isn't sure which event maps to which event (see attached photo).

Can someone familiar with making the migration help me port over this code since basically everything has changed?

        public void OnDragInfo(object sender, DragDropEventArgs e)
        {
            if (e.Options.Status == DragStatus.DropImpossible && DragCue != null)
            {
                DragCue.Background = DropImpossibleBackground;
                DropIndicator.Opacity = 0;
            }
            else if (DragCue != null)
            {
                DragCue.Background = DropPossibleBackground;

                DropIndicator.HorizontalOffset = e.Options.CurrentDragPoint.X - e.Options.RelativeDragPoint.X;
                DropIndicator.VerticalOffset = e.Options.CurrentDragPoint.Y - e.Options.RelativeDragPoint.Y + DropIndicator.Height;
                Debug.WriteLine(e.Options.CurrentDragPoint);
                DropIndicator.Opacity = 100;
            }
        }

        public void OnDragQuery(object sender, DragDropQueryEventArgs e)
        {
            GridViewRow row = sender as GridViewRow;

            e.QueryResult = RadDragAndDropManager.GetAllowDrag(row) &&
                (e.Options.Destination == null || e.Options.Destination is GridViewRow);

            if ((e.QueryResult ?? false) && e.Options.Status == DragStatus.DragQuery)
            {
                e.Options.Payload = row?.DataContext;
            }
        }

        public void OnDropInfo(object sender, DragDropEventArgs e)
        {
            object item = e.Options.Payload;
            GridViewRow source = e.Options.Source as GridViewRow;
            GridViewRow destination = e.Options.Destination as GridViewRow;

            if (source != null && destination != null && AssociatedObject.Items.Contains(item) && e.Options.Status == DragStatus.DragComplete)
            {
                int index = AssociatedObject.ItemContainerGenerator.IndexFromContainer(destination);

                ((IList) AssociatedObject.ItemsSource).Remove(item);

                ((IList) AssociatedObject.ItemsSource).Insert(index, item);

                if (!ItemsSourceSupportNotifications)
                {
                    AssociatedObject.Rebind();
                }

                DropIndicator.IsOpen = false;
            }

            if (e.Options.Status == DragStatus.DragCancel)
            {
                DropIndicator.IsOpen = false;
            }
        }

        public void OnDropQuery(object sender, DragDropQueryEventArgs e)
        {
            GridViewRow targetRow = e.Options.Destination as GridViewRow;

            if (targetRow != null)
            {
                e.QueryResult = targetRow.GridViewDataControl == AssociatedObject;
            }
            else
            {
                e.QueryResult = false;
            }
        }
Dinko | Tech Support Engineer
Telerik team
 answered on 07 Feb 2019
5 answers
418 views

Hi All,

I am very new to Telerik, doing all my work through threads. The program I am working on it is already do have tables and so on, now I cannot find anyone with problem of sending email and sms.

I need to have a clue on how I can retrieve the particular fields on my clients table and send SMS notification. Email suppose to have an attachment field to attach the document slip.

All I would like to see is ViewModel and View binding data - just these 2, would really appreciate any short program as an example.

 

Regards,

Mncedi

 

Martin Ivanov
Telerik team
 answered on 07 Feb 2019
3 answers
243 views
My WPF application permits users to select from a collection of <UserControl/> at runtime.
Each <UserControl/> is loaded as content to a RadPane. Each RadPane, RadPaneGroup
and RadSplitContainer has a unique serialization tag:


internal void UserControlToRADPane(UserControl theControl, string theName)
{
    RadSplitContainer leftContainer = new RadSplitContainer() { InitialPosition = DockState.DockedLeft };
    RadPaneGroup group = new RadPaneGroup() { Name = "RPG" + (++_radPaneGroupId).ToString() };
    RadPane aPane = new RadPane() { Header = theName, Content = theControl };
 
    RadDocking.SetSerializationTag(leftContainer, "rsp_" + leftContainer.Name + "_tag" + (++_aStaticIntValue).ToString());
    RadDocking.SetSerializationTag(group, "rpg_" + group.Name + "_tag" + (++_aStaticIntValue).ToString());
    RadDocking.SetSerializationTag(aPane, "rp_" + aPane.Header + "_tag" + (++_aStaticIntValue).ToString());
 
    group.AddItem(aPane, DockPosition.Center);
    leftContainer.Items.Add(group);
    MainDockingManager01.Items.Add(leftContainer);
}


I have created an event handler for ElementSaving.  At the point we are saving a RadPane, I
want to serialize the contents (which is a user-selected <UserControl/> as above):


private void dockingManager01_ElementSaving(object sender, LayoutSerializationEventArgs args)
{
    // Since we are accessing UI elements, we need ownership and
    // the quickest way to get that is to run on the STA thread.
 
    if (args.AffectedElement.GetType() == typeof(Telerik.Windows.Controls.RadPane))
    {
        var uc = ((RadPane)args.AffectedElement).Content as UserControl;
        ViewModel.VMDockingManager01.Instance.ElementSaving(sender, args, uc);
    }
    else
        ViewModel.VMDockingManager01.Instance.ElementSaving(sender, args);
}

My first question: Am I on the right track with this approach, or has Telerik implemented
some functionality that would permit a cleaner approach?   I note a reference to a method
called GetPaneContent() at this link in the Silverlight forum.  Is that a reference to some
user-created method... or is it a method provided by Telerik?




Kalin
Telerik team
 answered on 06 Feb 2019
6 answers
173 views
A company that I consult for has an application that uses the expression editor.  A configuration box that uses the expression editor has a calculation that used to work but no longer does.  It appears that the Round function has changed to not allow parenthesis within it's own.  Can someone explain if there has been a recent change in R1 2019 that might explain this?
Ivan Petrov
Telerik team
 answered on 06 Feb 2019
8 answers
437 views

I'm binding a DataView to the ItemsSource of a RadGridView and some columns are of the DateTime type. On the DateTime-columns I set FilterMemberPath to col.DataMemberBinding.Path.Path + ".Date" as mentioned here: http://www.telerik.com/forums/filtering-on-date-only to only filter on the date part.

This functionality is now broken. I't works in 2016.1.217.45, but not in 2016.3.1024.45 or later versions (I've tried up to the latest release version 2017.2.216.40)

If I replace my DataView with an IEnumerable<SomeObject> the filtering works as expected.

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