Telerik Forums
UI for WPF Forum
1 answer
18 views

Hi,

We are using the scheduler in an old asp.net app (see attachment).

How do we set the background, foreground and border color for every single appointment/item.

For example: An Appointment/item now has the following properties:

            var app1 = new Appointment()
            {
                Subject = "Front-End Meeting",
                Start = DateTime.Today.AddHours(9),
                End = DateTime.Today.AddHours(10)
                ForeColor = "Red",
                BackColor = "Blue",
                BorderColor = "Black"
            };

Thanks and best regards,
Egbert

Martin Ivanov
Telerik team
 answered on 28 Feb 2024
1 answer
29 views

Hello. 
I want to add Custom User control to RadDocument in RadRichTextBox. So I use InlineUiContainer to do that. And add it to paragraph.

And it looks so that I have to define height and width to make it so that it will take correct space in the document layout. If I skip this step then it looks like it takes zero width and height.
Looks strange. Because of course I don't know physical size of element in advance. As workaround I can do some "magic" with Loaded event and extract size of UiElement once it was rendered. And it works. But definitely it looks like a dirty code. 
I believe I miss something. Please help me. What am I doing wrong here? :)

By the way when I need to add InlineUiElement  to standard WPF RichTextBox it does all calculations of size by itself.

Dimitar
Telerik team
 answered on 28 Feb 2024
2 answers
50 views

Hello,

My Radtaskboard contains dozens of items. How do I find an item and scroll to it so the user can find it?
I have made this code:


 foreach (taskboarddata item in MyRadTaskBoard.Items)
 {
     if (item.Id == itemidsearch)
     {
         this.MyRadTaskBoard.SelectedItem = item;


but only selection, the UI does not direct/point to the item.

Thank you for your help.

The Nimble Coder
Top achievements
Rank 2
Iron
 answered on 27 Feb 2024
0 answers
22 views
I have a controls on a <UserControl> the first of which is a <telerik:RadComboBox>
I have another control that is a <telerik:RadWatermarkTextBox>
I want the second control to have the focus after the screen loads because the combobox has the OpenDropDownOnFocus property set to true.

I use txtPolicyNumber.Focus(); in the after load event but the Combobox grabs the focus.

I even have this code and it still goes to the combobox:

Any suggestions as to what I can do to make Focus() focus?
FrameworkElement focusedElement = Keyboard.FocusedElement as FrameworkElement;
if (focusedElement != null) 
{
    string focusedControlName = focusedElement.Name;
    if (focusedControlName == "txtPolicyNumber")
    {
        iefInsuranceThirdPartyVM.CanAutoDrop = true;
        txtPolicyNumber.Focus();    // WTF is making it focus on the combobox
    }
}


Paul
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 27 Feb 2024
1 answer
18 views

Currently the RadCalculatorPicker only recognize the decimal key from a numeric keypad. This is a problem when working on a laptop that does not have a numeric keypad.

Is there an easy and robust way to capture the period keystroke and "convert" it into a decimal key?

Regards

Renier

Martin Ivanov
Telerik team
 updated answer on 26 Feb 2024
1 answer
56 views

I have a RadGridView where i've replaced the "Full Text Search" with a custom control (TextBox + Label) 

I'm using a Debouncer to collect text changes from the Textbox and then after 300msec - do the search:


if (e.PropertyName == "Query")
{
	debounce.Debounce(() =>
	{
		Dispatcher.Invoke(() =>
		{
			FilterByQuery();
		});
	});
}
FilterByQuery() : 
var searchBytextCommand = RadGridViewCommands.SearchByText as RoutedUICommand;
searchBytextCommand.Execute(Query, radgrid);

Query = String property

radgrid = x:name of the RadGridView.

at some random point in time of the lifetime of the WPF program, this function stops working !

- I dont have any other case of the Debouncer stops working so i trust that it's not the issue. 

- WPF Databinding and PropertyChanged events are also working 1000 other places in the program without failing, so i trust that they work too.

- This leads me to believe that the RadGridViewCommands might have an issue.. 

 

Martin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 26 Feb 2024
0 answers
22 views

Hi, I would like to change style of schedulerdialogs in ScheduleView. For example, when I click on delete appointment button, this is the style I see:

But I want the style to look like this:

As you can see, the header of this dialog looks different. I am only able to achieve this look for Radwindow not for SchedulerDialog. Is there a way ro do it?

Thank you for your answer

 

 

T
Top achievements
Rank 1
 asked on 26 Feb 2024
0 answers
28 views

We have a issue with WPF RadComboBox to disable the auto selection of first item while databinding.

I have large set of data (say 10000 items) in the application cache.

<telerik:RadComboBox
                                        x:Name="itemBox"
                                        HorizontalAlignment="Stretch"
                                        telerik:TextSearch.TextPath="Name"
                                        CanAutocompleteSelectItems="False"
                                        DisplayMemberPath="Name"
                                        EmptyText="Select item"
                                        IsEditable="True"
                                        IsFilteringEnabled="True"
                                        IsReadOnly="False"
                                        IsTextSearchEnabled="True"
                                        ItemsSource="{Binding ItemCollection, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                        OpenDropDownOnFocus="True"
                                        ScrollViewer.VerticalScrollBarVisibility="Auto"
                                        SelectedItem="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                        TextSearchMode="Contains">

                                                <telerik:EventBinding
                                                Command="{Binding BeginSearchCommand}"
                                                EventName="KeyUp"
                                                PassEventArgsToCommand="True" />
</telerik:RadComboBox>

We have the RadCombobox with Filter enabled.

BeginSearchCommand relay command method has implementation of filtering the cached ItemCollection and setting the value.


this.ItemCollection = new QueryableCollectionView(new ObservableCollection<ItemModel>(filtereditems));

I first load 50 items in RadCombobox and the user will try to search the items from SearchText . Then the items in the cache is filtered with searchtext and the result is assigned with the datasource property.

  1. User start searching
  2. The first item from the filtered result occupies the search text.

The couple of action above continues. Please help us disable autoselect  while databinding.

Praveenraj
Top achievements
Rank 1
 updated question on 24 Feb 2024
0 answers
22 views

As in the title some charactes are getting not displayed in some pdfs.

If I import this pdf: https://jmp.sh/s/mdWM2qNDL2Oi6Yd825s0

Im getting this result its right if you click inside the field but its not getting displayed correct when not inside the field

 

Maybe its something with the font, thats the only thing i could think of.

 

Thanks for the help

Dominik

 

 

Dominik
Top achievements
Rank 1
Iron
Iron
 updated question on 21 Feb 2024
0 answers
22 views
Hello
I have a radgridview with two columns (for simplicity)
The first is defined like this:

RiassuntoSorgentiGrid.Columns.Add(new GridViewDataColumn()
{
				Header = Utility.LoadString(ResourcesKeys.RipetizioniSorgente),
				ColumnGroupName = GENERALGROUPNAME,
				DataFormatString = "D",
				DataMemberBinding = new Binding("Sorgente.Ripetizioni")
				{
					Mode = BindingMode.OneWay
				}
});


The second like this:

RiassuntoSorgentiGrid.Columns.Add(new GridViewDataColumn()
{
				Header = Utility.LoadString(ResourcesKeys.RipetizioniSorgente),
				ColumnGroupName = GENERALGROUPNAME,
				DataFormatString = "D",
				DataMemberBinding = new Binding($"Sorgente.LivelliSingoli[{parametro.Id}][{l}]")
				{
					Mode = BindingMode.OneWay
				}
});


where parametro.Id and l are variables correctly defined and not null.
The grid works good, but in the second columns filtering and sorting are not active, while in the first they do.

Is there a reason for this behavior?
Thank you
Luigi
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
 updated question on 21 Feb 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?