Telerik Forums
UI for WPF Forum
1 answer
64 views

Hello,

With the telerik:RadDocking the content of the tab that I open expect a specific parent Window (of type like WindowBase) with utilities, notification, modals, ...

Then I drag out one of the docking pane the parent window is a ToolWindow, is there a way to create a custom ToolWindow or wrap the content of a ToolWindow in a custom UserControl ?

Thanks you,

Martin Ivanov
Telerik team
 answered on 19 Mar 2025
1 answer
59 views

Hi there,

In the color editor, is there a mechanism to have alpha show as 0... 255 rather than as a percentage?  Our users are accustomed to working with these colors as 4x byte values for consistency.

I don't think I see a setting similar to AlphaSettingsVisibility, but I thought I'd ask to see whether I've missed anything.

Thanks!

-David

Stenly
Telerik team
 answered on 17 Mar 2025
1 answer
58 views

There's an issue with the RadMultiColumnComboBox in that the inner text field is left aligned so if the user doesn't click exactly in the text box, then they can't type anything.

In the attached image, I set the border of the inner textbox to red just for a visual aid. If the user clicks anywhere inside the red border, then the field gets focus and they can type and everything works as expected. However, if they're not focused on that field and they try to click to the right of the red border, it does nothing and to the user, it feels buggy.

I tried setting the horizontal alignment of the text box to stretch, but that had no effect. Is there a fix for this?

Shawn
Top achievements
Rank 1
Iron
Iron
 answered on 13 Mar 2025
0 answers
68 views

I'm having an issue with the RadMultiColumnComboBox where it accepts returns, so it grows the field when it shouldn't. I tried this but it had no effect:

private void MultiColumnComboBox_Loaded(object sender, RoutedEventArgs e)
{
    var textBox = MultiColumnComboBox.FindChildByType<TextBox>();
            
    if (textBox != null)
    {
        textBox.AcceptsReturn = false;
        textBox.AcceptsTab = false;
    }
}
How can I make it so the field doesn't accept returns?
Shawn
Top achievements
Rank 1
Iron
Iron
 asked on 13 Mar 2025
1 answer
119 views
Hello everyone!
I am using Telerik in my wpf app(.NET 8.0). There is a RadGridView and the selection mode is multiple. I have a Checkbox(GridViewSelectionColumn) in the first column. And in my model there is a field IsSelectable. now my question is, how can i make the Selection enabled or disabled according to this field? When the IsSelectable is False the whole row should be disabled to select. and vise versa. Here is my current code:
<!--  Main data grid  -->
<telerik:RadGridView
Name="GridView"
Grid.Row="1"
Margin="3"
DataContext="{Binding Requests}"
ItemsSource="{Binding}"
ShowGroupPanel="False"
SelectionMode="Multiple"
SelectionUnit="FullRow"

>
<telerik:RadGridView.Columns>
<telerik:GridViewSelectColumn />

<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Id}" Header="{DynamicResource 100314}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Branch}" Header="{DynamicResource 100214}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=OperName}" Header="{DynamicResource 100315}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=OperRefer}" Header="{DynamicResource 100316}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=CrtUsr}" Header="{DynamicResource 100317}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=CrtDtm}" Header="{DynamicResource 100318}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SndUsr}" Header="{DynamicResource 100319}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SndDtm}" Header="{DynamicResource 100320}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Status}" Header="{DynamicResource 100242}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Remark}" Header="{DynamicResource 100114}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=RetCode}" Header="{DynamicResource 100321}" />
</telerik:RadGridView.Columns>

<telerik:EventToCommandBehavior.EventBindings>
<!-- Scroll event (RowLoaded) -->
<telerik:EventBinding
Command="{Binding DataContext.ScrollCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
EventName="RowLoaded"
PassEventArgsToCommand="True"
RaiseOnHandledEvents="True" />
</telerik:EventToCommandBehavior.EventBindings>

</telerik:RadGridView>
Stenly
Telerik team
 answered on 12 Mar 2025
1 answer
78 views

Is it possible to have the RadCalendar inside the RadDatePicker and RadDateRangePicker to have a different theme than the RadDatePicker and the RadDateRangePicker?

I tried setting this within the RadDatePicker control's xaml:

<telerik:RadDateTimePicker.CalendarStyle>
    <Style TargetType="telerik:RadCalendar">
        <Setter Property="telerik:StyleManager.Theme"
                Value="Windows11" />
    </Style>
</telerik:RadDateTimePicker.CalendarStyle>

...but it has no effect.

Stenly
Telerik team
 answered on 12 Mar 2025
0 answers
48 views

There is the a form:

|    Segment   |        TimeIn       |       TimeOut        |       Duration      |

|          1          |   XX:XX:XX:XX  |   XX:XX:XX:XX   |   XX:XX:XX:XX  |

|          2         |   XX:XX:XX:XX  |   XX:XX:XX:XX   |   XX:XX:XX:XX  |

|          3         |   XX:XX:XX:XX  |   XX:XX:XX:XX   |   XX:XX:XX:XX  |

|          4         |   XX:XX:XX:XX  |   XX:XX:XX:XX   |   XX:XX:XX:XX  |

The number of Segment depends on how many xml file is found. I want to limited the information cannot be empty in middle (without the 1st seg1 and last seg4). How can I set get these middle segment number? My way is using  SegmentNo.Text <> 1 and SegmentNo.Text <> last. However it can't use ".last". How can I get the last row's Segment No? 

Code

For Each r As GridDataItem In gridSegment.Items

   If FileName.Text <> "" Then

       // Red the textbox if data is missing

   Else

      If timeIn.Text = "" AND timeOut.Text = "" AND Duration.Text = "" Then

        If Segment.Text <> 1 AND Segment.Text <> ??? Then
        
          // Red that row all textbox

        End If

     End If

   End If

Next

 

 

Matthew
Top achievements
Rank 1
 updated question on 12 Mar 2025
0 answers
94 views

Hello dear community.

We have a problem, which results in references not being cleaned up properly and the memory leaking over time.

 

The application works like this:

We have a RadTabbedWindow, with RadTabItems. Those RadTabItems have Views with ViewModels (MVVM), injected via PRISM.

Now when we close the tab, the view is not unloaded or garbage collected. When analysed with Resharper DotMemory, you can see that in this example the StyleSelectors or the ResourceDictionarys keep it referenced and thus not allowing it to be collected.

 

To find a Solution to the problem, we have broken down the control to the most simple elements (Simplified ScheduleView.txt). When tested, we noticed that Events and StyleSelectors are keeping the items referenced. So we wrote an UnloadBehavior (which is executed when closing the tab). There is a lot more code in it, handling other stuff, but in the uploaded file (UnloadBehavior.txt) I have only left the stuff regarding this particular case.

 

You can see in MasterViewTop1.png (1 being the top, 2 the middle, 3 the bottom) the reference path.

 

In this particular code, the two StyleSelectors:

GroupHeaderStyleSelector
AppointmentStyleSelector

hinder the cleaning up.

When I give the RadScheduleView a x:Name Property and use them in code behind to set those StyleSelectors to null, it gets unloaded.    Example: ObjectName.GroupHeaderStyleSelector = null;

 

But our application is gonna be big and we need a general solution. We don't want to give each object a name and unload StyleSelectors, Events, etc.. in the code-behind and set them to null. We need a general solution.

 

I can assure that neither the ViewModel, nor the code-behind is at fault. At this particular case, it's just those two StyleSelectors. I know about events, because the RadTimeBar causes the same problem, but with the VisiblePeriodChanged property, which is an event. But we want to solve this step first, which will probably solve all other problems, too. We just need to understand what has gone wrong.

 

Does anybody have an idea what can be done or what is wrong with the code?

I can guarantee that the UnloadBehavior is executed and reaches the DependencyProperties of the RadScheduleView and also sets them to null. But for some reason the objects and the view stay in the memory, even though they don't when I manually do it in the code-behind.

 

To summarise:

- We need a general solution to unload Telerik objects and clear up references for Events, StyleSelectors and everything referencing and locking the UserControl to be garbage collected.

- When done in Code-Behind it works, but when done in the UnloadBehavior nothing happens.

Anastasios
Top achievements
Rank 1
 asked on 12 Mar 2025
1 answer
52 views
If I bind the SelectedItem of my TimeLine control to a property of my MainView model, the setter does not run when an item is selected. However, the SelectionChanged event is executed.
Stenly
Telerik team
 answered on 11 Mar 2025
2 answers
83 views

Hello everyone!

I want to let my users display a Speed field: this will be a custom field, of course Speed = Distance / Time.

The problem I have is that some of my records are incomplete (have only either distance or time populated), but those records are still being used.

From what I understand, when I get an aggregate value the aggregation function is always set to sum, and incomplete records are still being put into the sum function (even if the other value is null).

 

I would like to be able to do both of these:

  1. Specify I want to use the AVERAGE function instead of sum.
  2. Exclude incomplete records from the calculation of my calculated field.

 

Thanks for your input!


public class CalculatedSpeedCalculatedField : CalculatedField
{
    private RequiredField distance;
    private RequiredField time;

    public CalculatedSpeedCalculatedField()
    {
        this.Name = "CustomCalculatedSpeed";
        this.DisplayName = "Custom Calculated Speed";
        this.distance = RequiredField.ForProperty("distance");
        this.time = RequiredField.ForProperty("time");
    }

    protected override IEnumerable<RequiredField> RequiredFields()
    {
        return new List<RequiredField>
        {
            this.distance,
            this.time,
        };
    }

    protected override AggregateValue CalculateValue(IAggregateValues aggregateValues)
    {
        var aggregateDistance = aggregateValues.GetAggregateValue(this.distance);
        var aggregateTime = aggregateValues.GetAggregateValue(this.time);

        if (aggregateDistance.IsError())
        {
            return aggregateDistance;
        }
        else if (aggregateTime.IsError())
        {
            return aggregateTime;
        }

        double dist = aggregateDistance.ConvertOrDefault<double>();
        double tim = aggregateTime.ConvertOrDefault<double>();
        return new DoubleAggregateValue(dist / tim);
    }
}

Oscar
Top achievements
Rank 1
Iron
 answered on 11 Mar 2025
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
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?