Telerik Forums
UI for WPF Forum
3 answers
147 views

Hello.

I have previously posted a post.Please refer to the link.

SpreadSheet Cell changed event infinite loop.

Spreadsheet: InvalidOperationException is thrown when attaching to CellPropertyChanged event and trying to modify the cell

 

I tested it after seeing it was updated and built today.

But I don't know what has changed.

Still, errors and infinite loops appear. (System.StackOverflowException: ''System.StackOverflowException' )

 

Thanks.

Psyduck
Top achievements
Rank 5
Bronze
Bronze
Bronze
 answered on 07 Apr 2021
2 answers
141 views

Is there any way to assign a callout to (say) the Open Image Button of the RadImageEditorUI?

I can't seem to find any way to get a reference to a button within the RadImageEditorUI control so I can assign it to a callout.

Thanks

Richard
Top achievements
Rank 2
Veteran
 answered on 06 Apr 2021
3 answers
283 views
Hello every body,

I am currently trying to custumize the RadSpreadsheet. My purpose is to redirect the shortcut  „Ctrl+S“  to my own custum command.
I tried this

<telerik:RadSpreadsheet x:Name="radSpreadsheet" >
            <telerik:RadSpreadsheet.InputBindings>
                <KeyBinding Gesture="Ctrl+S" Command="{Binding myCommand}"/>
            </telerik:RadSpreadsheet.InputBindings>
          ……
</telerik:RadSpreadsheet>

But I am still getting the default command. Is there any way to achieve what I want?
Just to make it clear. I did the same thing with RadRichTextBox

<telerik:RadRichTextBox x:Name="radRichTextBox" >
                    <telerik:RadRichTextBox.InputBindings>
                        <KeyBinding Gesture="Ctrl+S" Command="{Binding SaveFileCommand}" />
                    </telerik:RadRichTextBox.InputBindings>
                </telerik:RadRichTextBox>
</telerik:RadRichTextBox x:Name="radRichTextBox" >

it works well.

Please help.

Best regards
Dimitar
Telerik team
 answered on 06 Apr 2021
1 answer
164 views

I am calling RadWindow's Alert in the following code.

Even though it transfers control to the main window of the program, it disappears if you do not click the OK button after showing it for a while.

And I can't click the confirmation button anymore.

 

call.cs

AlertWindow.Alert(ret.Error.UserMessage);

 

alertWindow.cs

public class AlertWindow
    {
    public static void Alert(string msg, string header=null, ILog log = null, ContentControl contentControl=null)
        {
            if (header == null)
                header = "title";
            if (contentControl == null)
                contentControl = Application.Current.Windows.Cast<Window>().FirstOrDefault(win => win.Topmost);
 
            Telerik.Windows.Controls.RadWindow.Alert(new Telerik.Windows.Controls.DialogParameters
            {
                Content = msg,
                Header = header,
                OkButtonContent = MulBangUl.Resources.Localization.CommonResources.CmdConfirm,
                Owner = contentControl
            });
 
            if (log != null)
                log.Info(msg);
        }

}


Dinko | Tech Support Engineer
Telerik team
 answered on 05 Apr 2021
3 answers
334 views

I need coordinates where exactly I clicked the mouse on the loaded image in WPF RadImageEditor (not the coordinator of the editor but the image). Any ideas how to achieve this goal?

Andrzej

Martin Ivanov
Telerik team
 answered on 05 Apr 2021
1 answer
169 views
How can I show all grid lines *and* always show the plot area border? For example, if my axis ranges from 5 to 35, the grid line at 35 overwrites the plot area border and border will not be shown. If set the gridlines to Inner, then sometimes the first and last grid lines will not show, depending on the axis range (obviously). Equally unfortunate is that if one set is set to Inner and one to All, the grid lines will be drawn on top of the border leading to gray pixels at the intersection (screenshot). Ideally, this could all be solved if the border was just drawn after the grid lines. Is that possible?
Martin Ivanov
Telerik team
 answered on 05 Apr 2021
4 answers
820 views

 

I have a listbox defined in the xaml -

<telerik:RadListBox x:Name="CartLineItems" ItemsSource="{Binding LineItems}" SelectedItem="{Binding SelectedArticle, Mode=TwoWay}"
ItemTemplate="{StaticResource ConfectioneryDataTemplate}" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" Background="LightGray">
</telerik:RadListBox>

 

I frequently need to clear and repopulate the ItemsSource to refresh the Listbox. (LineItems is an observable collection). When I clear the collection, the SelectedItem is also cleared (visually). When I repopulate and set the SelectedItem object with data, there is no item in the ListBox which is selected. Below is the code -

private void RefreshLineItems()
{
    // Store the selected article for later use.
    LineItem selectedLineItem = null;
    if (SelectedArticle != null)
        selectedLineItem = SelectedArticle;
 
    // Clear all the line items.
    LineItems.Clear();
    // Iterate through the cart to re-populate LineItems and reset the selected article.
    if (ActiveCart != null)
    {
        foreach (LineItem lineItem in ActiveCart.lineItems)
        {
            LineItems.Add(lineItem);
        }
        if (selectedLineItem != null)
            SelectedArticle = ActiveCart.lineItems.Find(x => x.articleID == selectedLineItem.articleID);
    }
}

 

How do I get the selected item to re-appear on the listbox after the ItemsSource is cleared?

Thanks.

Gopinath

Vladimir Stoyanov
Telerik team
 answered on 05 Apr 2021
4 answers
180 views

Dear sir,

I am using the  Rad Masked Currency Input control in my project. One of the requirement  is  to show empty content when the value is null.

 Unfortunately, when  I set the empty Content property to string. Empty or to null , I still see the default value in the control ( zero number).

 I can see an error in the output window of problem to convert null object  to value. 

I have noticed that after pressing the clear button and opening again the control  the content become empty.

Do you have a solution to this scenario?

Thank you,

 Yafit hamilton

Hen
Top achievements
Rank 1
Veteran
 answered on 05 Apr 2021
1 answer
569 views

Hey everyone,

I'm currently working through some existing project, and would like to set up a RadComboBox that will complain if it doesn't have a current selection, or the current selection is an empty string. The current ComboBox is the stock WPF control, and populates itself like this:

const string sql = @"
    SELECT Item AS ListItem
    FROM...";
DataTable table = GetTable(...)
 
cbx.ItemsSource = table.DefaultView;
cbx.DisplayMemberPath = "Item";
cbx.SelectedValuePath = "Item";

 

I'm new to MVVM and WPF, and this doesn't seem standard. So, what I want to know is if there's a nice way to have the RadComboBox control complain about an invalid SelectedItem? Do I need to rip this apart and do data binding? If so, is there an example I can look at to get an idea?

As always, thanks for the help,

Lee

Dinko | Tech Support Engineer
Telerik team
 answered on 02 Apr 2021
5 answers
205 views

Hi guys,

 

I am currently working on a way to display data, that is structured on 3 levels.
On first level is a week, on second level a day, and on the third level a basic entry.

Based on that system I thought about the RadGridView and the Child-Relations.
My main problems now are, that I have especially on the third level way too less space in the child-table so its basically unreadable. 
Is there any way to give the childtables more space? 

The other problem is, that I haven't found out, how I could set different Templates for the childtables.
The HierarchyChildTemplate only works for one Child as it seems.

 

The reason why I not just Group by the Days and weeks is, that I later want to use Drag and Drop entries between the days. 
I thought this would be more possible in a hierarchical system.

 

I also tested the RadPanelBar, but there I would need to create somethin like a table with frozen headers and so on manually.

 

Greetings,

Benedikt

Dilyan Traykov
Telerik team
 answered on 01 Apr 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?