Telerik Forums
UI for WPF Forum
1 answer
138 views

Hello. I faced the problem when i am trying to get Route from BinRestMapProvider, using method CalculateRouteAsync, it returns status code 400 and message like this: "This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","errorDetails":["One or more parameters are not valid.","waypoint: One or more locations specified in the waypoint parameter are invalid or require more information. : 42,6957539183824;23,3327663758679"],"resourceSets":[],"statusCode":400,"statusDescription":"Bad Request" "

I just followed the example at:
https://docs.telerik.com/devtools/wpf/controls/radmap/features/providers/bing-rest-map-provider/routing

I guess problem is in example 4 of this doc: "request.Waypoints.Add(point.ToString());"

I hope someone can help me with it.

Dmytro
Top achievements
Rank 1
Iron
 answered on 09 Jun 2023
1 answer
345 views

Does the vulnerability that was in your MOVEit software also exist in the Telerik software?

Is it currently safe to download software from your website?

Lance | Senior Manager Technical Support
Telerik team
 answered on 06 Jun 2023
1 answer
135 views

I want to encrypt a zip archive.


using (FileStream stream = File.Create(Filepath + Filename))
 {
     DefaultEncryptionSettings encryptionSettings = new DefaultEncryptionSettings();
     encryptionSettings.Password = "123";

     using (ZipArchive archive = new ZipArchive(stream, ZipArchiveMode.Create, false, null, null, encryptionSettings))
     {
          using (ZipArchiveEntry entry = archive.CreateEntry("document.txt"))
          {
               StreamWriter writer = new StreamWriter(entry.Open());
               BinaryFormatter formatter = new BinaryFormatter();
               formatter.Serialize(writer.BaseStream, this);
          }
     }
}
When assigning a string directly for the password, the code works. If I assign the password via a string variable, the zip archive is not encrypted.

Aleks
Telerik team
 answered on 06 Jun 2023
1 answer
594 views

Hello,

After reading multiple questions in this forum regarding why the RadGridView is not refreshing when an existing item is updated, I am developing the refresh mechanism. I tried your suggest (calling CollectionChanged.Reset) but this solution is not good for us because when we call CollectionChanged the RadGridView is updated and also a lot of elements are drawn in a screen (thousand of elements and it cost a lot of performance).

So my solution is using a timer with refresh interval of 1 second which will refresh all the subscribed RadGridViews.

* I used WeakRefereces to avoid Memory Leaks.

In the distpatcher timer I do the following code:

if(radGridView == null || !radGridView.IsVisible) return;

var isRefreshRequired = radGridView.GroupDescriptors.Count >0 || radGridView.FilterDescriptors.Count>0 || radGridView.SortDescriptors.Count>0

if(isRefreshRequired)

{

   var collectionView = CollectionViewSource.GetDefaultView(radGridView.ItemSource);

   collectionView.Refresh?();

}

 

As mentioned, this code guarantees that only the view (RadGridView) is refresh and not the other elements of the SourceCollection.

I need your help with the following:

1. Only when there is a group and I scrolled down, after refresh the grid jumps to top (I couldn't reproduce when sorting or filter is enabled).

2. There is any good way to really know if the RadGridView is shown on screen (maybe it is visible but hidden in other tab), I need a method with fast access because I may check around 15 grids every second and I want to refresh only the required grids.

3. I tried to refresh the radGridView.Items instead of radGridViewItemsSource.
I expected this to work beause Items holds the items after grouping/filter/sorting. Unfortuneatly ,it doesn't work.

There is any way to refresh your internal view instead of the SourceCollection view that is bound to ItemSource?

The problem is that CollectionChanged on the view, triggers other code on my side that it will be good to skip for this case.

EDIT:

* I figured out that if I have a grid with 500 elements with two groups of 250 rows and one group is expanded then the application is almost freeze, the refresh is killing the performance. I think that my solution is better than Collection Reset so I don't know how to solve this :(

* Regarding point one, I think that the grid jumps because the Panel Unit is set to Content. I can't switch to Pixel because it will cause bad performance.

* I noticed that you have the method Reset for GroupDescriptors and SortDescriptors, the performance is the same. I taught that you maybe manage an internal caching and have some improvements there.

Vladimir Stoyanov
Telerik team
 answered on 05 Jun 2023
0 answers
155 views

I have tried to create two RadNumericUpDown controls, first one has a minimum value and second one has a maximum value. I thought that I can bind automatically minimum value as Minimum for second control, but here is the problem.

Problem is happens when Minimum value of RadNumericUpDown control was updated, but updated Value of second control was not bound to source.

<StackPanel>
        <telerik:RadNumericUpDown Value="{Binding MinValue, Mode=TwoWay}"/> //changes here are not updatind value of second control
        <telerik:RadNumericUpDown Value="{Binding MaxValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                                  Minimum="{Binding MinValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
</StackPanel>

 

 

Kostiantyn
Top achievements
Rank 1
Iron
 asked on 01 Jun 2023
1 answer
120 views

Sorry my bad English,

There is my RadGridView

<telerik:RadGridView x:Name="DepartmentBalanceListRadGridView"
                                     ItemsSource="{Binding Display}"
                                     IsBusy="{Binding IsBusy}"
                                     IsReadOnly="True"
                                     ScrollViewer.VerticalScrollBarVisibility="Visible"
                                     AutoGenerateColumns="True"
                                     RowHeight="50"
                                     SelectionMode="Extended"
                                     CanUserFreezeColumns="False"
                                     RowIndicatorVisibility="Collapsed"
                                     GroupRenderMode="Nested"
                                     AutoExpandGroups="True"
                                     HorizontalAlignment="Stretch"
                                     VerticalAlignment="Stretch"
                                     VerticalGridLinesBrush="LightGray"
                                     ShowGroupFooters="True"
                                     ShowColumnFooters="True"
                                     CanUserResizeColumns="True"
                                     CanUserGroupColumns="False"
                                     ColumnWidth="*"
                                     AutoGeneratingColumn="DepartmentBalanceListRadGridView_AutoGeneratingColumn">

            <telerik:RadGridView.ControlPanelItems>
                <telerik:ControlPanelItem ButtonTooltip="Filtering Options">
                    <telerik:ControlPanelItem.ButtonContent>
                        <Button Background="Transparent">

                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <cal:ActionMessage MethodName="PrintDepartmentBalance">
                                        <cal:Parameter Value="{Binding ElementName=DepartmentBalanceListRadGridView, Path=Items}"/>
                                        <cal:Parameter Value="{Binding ElementName=DepartmentBalanceListRadGridView, Path=SelectedItems}"/>
                                    </cal:ActionMessage>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>

                            <materialDesign:PackIcon Kind="Printer" Foreground="White" />

                        </Button>
                    </telerik:ControlPanelItem.ButtonContent>
                </telerik:ControlPanelItem>

            </telerik:RadGridView.ControlPanelItems>

            <telerik:RadGridView.Columns>

                <telerik:GridViewSelectColumn/>

            </telerik:RadGridView.Columns>

        </telerik:RadGridView>


Binding Display


private ObservableCollection<IDictionary<string, object>> _display;

public ObservableCollection<IDictionary<string, object>> Display
{
    get { return _display; }
    set
    {
         _display = value;
         NotifyOfPropertyChange(() => Display);
    }
}

now only 4 options 
is equal to, is not equal to, is null, is not null 

how can I add startswith and contains filter in the FilterControl ?

Martin Ivanov
Telerik team
 answered on 31 May 2023
0 answers
150 views

Hello, I have an issue with the style of the ContextMenus.

I changed the style of the ContextMenu and it is working for TextBlock and TextBox but on Telerik controls like RadNumericUpDown and RadRichTextBox the context menu looks different.

Let's take for example the menu in the RadNumericUpDown (see attached picture).

I expect that the menu with Cut,Copy,Paste looks like other menus.

I tried to define in RadNumericUpDown.Resources a style for ContextMenu and RadContextMenu (change the Background property) but it doesn't work.

When I change the Foreground property of the TextBlock style inside RadNumericUpDown.Resources, I can see that the text color changed.

I hope you can guide me on this matter.

Thanks,

Alex

alex
Top achievements
Rank 2
Bronze
Iron
Iron
 updated question on 29 May 2023
1 answer
333 views
I would like to know if the WPF RadDatePicker control offers a built-in clear button functionality to remove the selected date.
Martin Ivanov
Telerik team
 answered on 29 May 2023
0 answers
119 views

 

Hi Telerik,

I implemented a Column group grid view. In  that I want to show same background color for a group of columns and its header .

Our requirement: All columns that belong to the same component type are grouped together and displayed with the same color.

How to achieve our requirement? please help me as soon as possible . 

Thanks in advance!

Mahima
Top achievements
Rank 1
 updated question on 29 May 2023
0 answers
99 views

I am using telerik:RadScheduleView in my control and when user tries to use "Edit Recurrence" dialog while adding any event/schedule, the window comes up with some messed up texts for buttons. Like Every appears as E_very, please find attached screenshots.

I am using below content in my page.

<telerik:RadScheduleView AppointmentsSource="{Binding Recordings}"
								 AppointmentCreated="OnAppointmentCreated"
								 AppointmentEdited="OnAppointmentEdited"
								 AppointmentDeleted="OnAppointmentDeleted">
			<telerik:RadScheduleView.ViewDefinitions>
				<telerik:MonthViewDefinition />
				<telerik:WeekViewDefinition />
				<telerik:DayViewDefinition />
			</telerik:RadScheduleView.ViewDefinitions>
		</telerik:RadScheduleView>

 

How to fix the text?

Sunny
Top achievements
Rank 1
 asked on 26 May 2023
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?