Telerik Forums
UI for WPF Forum
3 answers
320 views

I have a strange new bug in Visual Studio XAML Editor when I place a RadGridView inside a DataTemplate. It is quite easy to reproduce:

  1. create a new WPF Core 3.1 project
  2. add Telerik.UI.for.Wpf.NetCore 2020.2.513 (as NuGet package)
  3. place the following code inside the Resource-part of the window:
01.<Window.Resources>
02.    <DataTemplate x:Key="testTemplate">
03.        <Grid>
04.            <telerik:RadGridView>
05.                <telerik:RadGridView.Columns>
06.                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Title}"></telerik:GridViewDataColumn>
07.                </telerik:RadGridView.Columns>
08.            </telerik:RadGridView>
09.        </Grid>
10.    </DataTemplate>
11.</Window.Resources>

 

It does not matter that there is no ItemsSource or which field you are binding the GridViewDataColumn to. As soon as I include the property DataMemberBinding="{...}" I get a warning from "Microsoft.CodeAnalysis.Xaml.Diagnostics.Analyzers.XamlDocumentDiagnosticAnalyzer" saying that there is a NullReferenceException. From there on there is no more Intellisense or Autocomplete inside my Xaml Editor.

Could someone at Telerik check if it is just my developer machine or is it a bug that I detected? Visual Studio 2019 is Version 16.6.0.

Thanks in advance!

Regards
Heiko

Doug
Top achievements
Rank 1
Veteran
 answered on 19 Jul 2020
0 answers
162 views

Good day.

How can I have a paginated GridView using SQL LIMIT/OFFSET.

I tried using DataPager and GridView but what i understand is the control loads the records in full. Is it possible to have the Pager or the GridView use something like LIMIT/OFFSET when retrieving the date from the database.

For example 1 have 100,000 records. I just want to load the first 1000 on my page load and navigate via pager(with 100 page indicator) to show the other records. And also have it affect the GridView column filter and other header controls which means when I filter/sort it will look on the full records list. 

 

Thank you very much.

gerardo
Top achievements
Rank 1
Veteran
 asked on 19 Jul 2020
2 answers
243 views

I have seen the following example in this forums.

-->  https://www.telerik.com/forums/geoserver-as-provider

 

 

 

i just change 

1. BaseUri="http://localhost:8080/geoserver/hc_test/wms"

2. TileUrlFormat = @"?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&FORMAT=PNG&WIDTH={1}&HEIGHT={2}&SRS=EPSG:42310&BBOX={0}&LAYERS=hc_test:N3A_G0100000";

3. XYZoomToBBox Function

 

my GetTile Function is  return url that "http://ocalhost:8080/geoserver/hc_test/wms?service=WMS&version=1.1.1&request=GetMap&layers=hc_test:N3A_G0100000&styles=&bbox=956779,1928520,1142111,2015940&width=1000&height=1000&srs=EPSG:42310&format=application/openlayers"
This url works well in the browser. However, the map is not visible in the radmap.

The rest of the code is the same as example code.

 

Can I get the latest examples or advice for working with geoserver?


 

MCanitez
Top achievements
Rank 1
 answered on 17 Jul 2020
3 answers
291 views

Hi,

I would like to style the search results that are displayed in HighlightTextBlock so that the found text is bold or underlined or similar. Any simple solution for that?

Regards
Heiko

Vicky
Telerik team
 answered on 17 Jul 2020
3 answers
501 views

Hello,

 

I was wondering if there is a way to export data from my RadGrid to an Excel File Template.  I am currently using Microsoft.Office.Interop.Excel and looping through my list to input each record in its according row and column but I am noticing it is running very slow now with the amount of records I have.   I believe this was a question asked in 2012 (http://www.telerik.com/forums/export-to-a-template-excel-file) and I am hoping it may now be supported.

 

Thank you

 

Derrick

Martin Ivanov
Telerik team
 answered on 16 Jul 2020
9 answers
373 views

Hello,

I have Windows 10 in English, but the date display in Swiss French.

In the save dialog (not checked the other ones, but it should be the same), the date and time are displayed in the US format, with AM/PM).

You must use the Windows settings to display the date and time correctly.

Dinko | Tech Support Engineer
Telerik team
 answered on 15 Jul 2020
4 answers
237 views

Hello,

I am trying to give my CodeBlocks inside a RichTextBox.Document a certain style.

Every character inside the CodeBlock should have the same FontFamily and FontSize.

To do this I am going the following way:

1.) Clear all existing styles inside the RichTextBox.CodeFormatter.

2.) Add my own styles.

The code looks like this:

            StyleDefinition styleWhite = new StyleDefinition(cl.GetCodeLanguage.Name + "StyleWhite", StyleType.Character);
            styleWhite.SpanProperties.ForeColor = Colors.White;
            styleWhite.SpanProperties.FontFamily = Wpf.Fonts.Fonts.GetFont(eFont.Consolas);
            styleWhite.SpanProperties.FontSize = Unit.PointToDip(fontSize);


            StyleDefinition styleKeyWord = new StyleDefinition(cl.GetCodeLanguage.Name + "StyleKeyword", StyleType.Character);
            styleKeyWord.SpanProperties.ForeColor  = colorKeyWord;
            styleKeyWord.SpanProperties.FontFamily = Wpf.Fonts.Fonts.GetFont(eFont.Consolas);
            styleKeyWord.SpanProperties.FontSize   = Unit.PointToDip(fontSize);

            StyleDefinition styleString = new StyleDefinition(cl.GetCodeLanguage.Name + "StyleString", StyleType.Character);
            styleString.SpanProperties.ForeColor = colorKeyWord;
            styleString.SpanProperties.FontFamily = Wpf.Fonts.Fonts.GetFont(eFont.Consolas);
            styleString.SpanProperties.FontSize = Unit.PointToDip(fontSize);

            StyleDefinition styleMethod = new StyleDefinition(cl.GetCodeLanguage.Name + "styleMethod", StyleType.Character);
            styleMethod.SpanProperties.ForeColor = colorKeyWord;
            styleMethod.SpanProperties.FontFamily = Wpf.Fonts.Fonts.GetFont(eFont.Consolas);
            styleMethod.SpanProperties.FontSize = Unit.PointToDip(fontSize);

            StyleDefinition styleComment = new StyleDefinition(cl.GetCodeLanguage.Name + "StyleComment", StyleType.Character);
            styleComment.SpanProperties.ForeColor = colorKeyWord;
            styleComment.SpanProperties.FontFamily = Wpf.Fonts.Fonts.GetFont(eFont.Consolas);
            styleComment.SpanProperties.FontSize = Unit.PointToDip(fontSize);



            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Comment);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Keyword);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Method);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.StringLiteral);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Attributes);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.CharacterLiteral);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Constants);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Data);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.ExcludedCode);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Identifier);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.NumberLiteral);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Operator);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.PreprocessorKeyword);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Variable);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.WhiteSpace);
            doc.CodeFormatter.UnregisterClassificationType(ClassificationTypes.Literal);

 

            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Comment, styleComment);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Keyword,  styleKeyWord);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Method,  styleMethod);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.StringLiteral,  styleString);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Attributes,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.CharacterLiteral,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Constants,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Data,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.ExcludedCode,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Identifier,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.NumberLiteral,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Operator,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.PreprocessorKeyword,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Variable,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.WhiteSpace,  styleWhite);
            doc.CodeFormatter.RegisterClassificationType(ClassificationTypes.Literal,  styleWhite);

 

The result of this code is, that I get different FontSizes inside the CodeBlock. See attached *.gif.

So my question is: Which styles do I need to change or add, to give CodeBlocks a consitent look?

Max
Top achievements
Rank 1
 answered on 15 Jul 2020
9 answers
564 views

Hello,

In the file dialogs, there is no shortcut for the controls. For example Alt+N to go to the "File name:" text box.

Martin Ivanov
Telerik team
 answered on 14 Jul 2020
4 answers
883 views

I updated my DLLs to the newest version  Telerik_UI_for_WPF_2020_2_617_Dev_Hotfix and now I get a reference conflict:

Severity    Code    Description    Project    File    Line    Suppression State
Warning        Could not resolve this reference. Could not locate the assembly "Telerik.Pivot.Core, Version=2019.2.618.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.            

Please refer to the attached image files for more details.

ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 13 Jul 2020
1 answer
199 views

Are there any solutions for it in version before useful EnableSelectionCaching option was added?

https://docs.telerik.com/devtools/wpf/controls/radlistbox/features/selection#disabling-caching-of-selected-items 

"Disabling Caching of Selected Items
By default, when its ItemsSource is reset, RadListBox will try to restore any previously selected items through its built-in caching mechanism. As of R1 2017, RadListBox allows you to disable this functionality by setting its new EnableSelectionCaching property to False."

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