Telerik Forums
UI for WPF Forum
0 answers
293 views

We have a strange issue that I've not seen posted or reported anywhere after two days of research

We have RadGridViews where we manage persistence using the Telerik PersistenceManager Class.

The grids are set as follows

    theGrid.ShowGroupPanel = false;
    theGrid.FilteringMode = Telerik.Windows.Controls.GridView.FilteringMode.FilterRow;
    theGrid.CanUserGroupColumns = false;
    theGrid.CanUserReorderColumns = true;

We gather data from a web service in the form of a data table and bind to the Grid.

When a filter is applied at the column level (for example a part number using the "Is Equal To"  filter) we save the grid stream, submit the query, retrieve the data, bind to the grid, Reload using the persistence manager.  

pseudo code

 

  • Gather Filter info
  • Save aStream
  • Get Data
  • Bind
  • PersistenceManager.Load(theGrid, astream);

The strange behavior is that I can consistently filter on a particular part number (String) and everything works as expected (A single result in the grid), but another part number results in a blank grid after calling the Manager.Load() code.  

In the second scenario, the underlying data table has one row, but it does not display in the grid.  If I comment out the code to load, then the value displays.  Using this, we lose the persistence, and can't "Clear filter" at the column level.

Long story short, the PersistenceManager.Load(theGrid, astream); seems to be failing, resulting in a blank Grid even though the underlying data table has one row.  Since this is Telerik code, we have no way to debug it.

 

Thanks in advance for any help.  I've attached a screen shot of the resulting grid, when the "Load" fails

John
Top achievements
Rank 1
 asked on 29 Jun 2022
0 answers
132 views
I have an odata entity that has been expanded to include 2 other tables. When I try to filter the entity by one of the columns I am greeted with a LINQ error (I will include a screenshot of the error). I was wondering if there is anyway to be able to filter by one of the expanded columns? I am using a QueryableDataServiceCollectionView that populates my RadGridView. 
Josh
Top achievements
Rank 1
 asked on 28 Jun 2022
3 answers
331 views

I have a problem with RadNumericUpDown control. I'm not able to display edge values of double type (e.g. NaN or Infinity). Every time I try to bind to property with these values I've got a Binding error.

Is it even possible to achieve it utilizing RadNumericUpDown?

Thanks!

Lukasz
Top achievements
Rank 1
Iron
 updated answer on 28 Jun 2022
0 answers
159 views

My requirement is to place a set of RadGridView horizontally, there's a ScrollViewer and ItemsControl, see code below.

 <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
	<Grid>
		<ItemsControl Name="GridItemsControl" HorizontalAlignment="Left" HorizontalContentAlignment="Left"
					  ItemsSource="{Binding Results}">
			<ItemsControl.ItemsPanel>
				<ItemsPanelTemplate x:Uid="ItemsPanelTemplate_1" x:Name="GridItemPanelTemplate">
					<DockPanel x:Uid="DockPanel_1" />
				</ItemsPanelTemplate>
			</ItemsControl.ItemsPanel>
			<ItemsControl.ItemTemplate>
				<DataTemplate x:Uid="DataTemplate_5">
					<telerik:RadGridView Grid.Row="0"
									 Margin="8"
							 ItemsSource="{Binding Items}" 
							 AutoGenerateColumns="False" 
							 IsReadOnly="True"
							 GroupRenderMode="Flat"
							 ShowGroupPanel="False"
							 CanUserSortColumns="False" 
							 ShowColumnSortIndexes="False"
							 RowIndicatorVisibility="Collapsed" 
							 CanUserGroupColumns="False"
							 SelectionMode="Extended"
							 ClipboardCopyMode="All" >
						<telerik:RadGridView.Columns>
							<telerik:GridViewDataColumn Width="Auto"
														Header="Depth"
												IsFilterable="False"
												ShowToolTipOnTrimmedText="True" 
												TextAlignment="Right"
												DataMemberBinding="{Binding Depth}">
							   
							</telerik:GridViewDataColumn>
						</telerik:RadGridView.Columns>
					</telerik:RadGridView>
				</DataTemplate>
			</ItemsControl.ItemTemplate>
		</ItemsControl>
	</Grid>
</ScrollViewer>

The UI got stuck while the program was running, but when replace RadGridView by DataGrid, it can run, and if I replace the Grid with ListView, the UI can work, but the function not meet my requirement

Guang
Top achievements
Rank 1
Iron
 asked on 27 Jun 2022
1 answer
169 views

Hello everyone. I have this problem when generating a table of contents. It is happening to me that when the document is exported to Word, for some reason (or if it is the correct behavior) the text is scrolling down on the next page. What I want to achieve is that the TOC can be generated if scrolling down occurs or, failing that, eliminate the space between the phrase "GENERAL CHARACTERISTICS" and the top of the header of that page. The document is already created and is imported into the application. I'm using an example that I found in the forum (I don't remember the name of the person, credits to him) and I'm adapting it to what I need

I have been researching the way to do it and I think with "Multi-Range Selection"
(https://docs.telerik.com/devtools/wpf/controls/radrichtextbox/features/selection?&_ga=2.154034736.904289798.1655964538-1262658420.1654800489#members-of-documentselection) between the phrase and the last element of the TOC would work but I haven't managed to capture the last element of the TOC, so I'm stuck with that part. Any idea or way I can take to eliminate that generated (dynamic) space between the phrase the following sheet and the header of that page.

Attached functional solution for testing and images.

Thank you very much

Tanya
Telerik team
 answered on 27 Jun 2022
1 answer
189 views
I want to implement row numbers in the Telerik data grid. Is there any predefined functions to enable? Or do we have any other method to achieve this. Please guide me how to achieve the above process.

Thanks in advance.
Dilyan Traykov
Telerik team
 answered on 27 Jun 2022
1 answer
1.0K+ views

Hi

 

I've setup a simple project using a RadRibbonWindow with a ribbon and a few controls. I'm trying to toggle between Light and Dark themes using the StyleManager which is working for the controls but not the Window (Title bar etc).

 

I've gone through a few articles including this one and threads on the forum including this one. Unfortunately I can't get the Window to change theme. Any help would be much appreciated.

 

Thanks Miles

Vicky
Telerik team
 updated answer on 27 Jun 2022
1 answer
977 views

   This question is for Telerik UI for WPF, version R2 2022.  Development environment is Windows 10 Pro 64-bit, Visual Studio 2022 64-bit version 17.2.2.  WPF application targeting .NET Framework 4.8.

I use many Telerik RadExpanders throughout my application.  Rather than style the header of each one individually, I would like to apply a master style to the Application.xaml so it will apply to all of them.  

   An example of one of my RadExpanders is:

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 

        <telerik:RadExpander x:Name="radExpGeneral" IsExpanded="True" 
                             telerik:AnimationManager.IsAnimationEnabled="False" telerikControls:StyleManager.Theme="Office_Blue">
            <telerik:RadExpander.Header>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Steps"/>
                </StackPanel>
            </telerik:RadExpander.Header>
        </telerik:RadExpander>

   I'm attempting to style with the following in my Application.xaml:

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 

        <Style TargetType="{x:Type telerik:RadExpander}">
            <Style.Resources>
                <Style TargetType="{x:Type HeaderedContentControl}">
                    <Style.Resources>
                        <Style TargetType="{x:Type TextBlock}">
                            <Setter Property="FontSize" Value="12"/>
                            <Setter Property="FontWeight" Value="DemiBold"/>
                        </Style>
                    </Style.Resources>
                </Style>
            </Style.Resources>
        </Style>

   The idea is that this style first targets all RadExpanders, then targets only the header, then applies the style to the textblocks inside of it.  The problem seems to be targeting the header only, not the contents.  This style does not work.  Can anyone advise how to target just the radexpander headers?  Thank you!

Martin Ivanov
Telerik team
 answered on 27 Jun 2022
0 answers
240 views

Failed to focus RadWatermarkTextBox

<telerik:RadDropDownButton Margin="10 0" 
                        DropDownIndicatorVisibility="Collapsed"
                        DropDownPlacement="Mouse">
    <telerik:RadDropDownButton.DropDownContent>
        <StackPanel Orientation="Horizontal">
            <telerik:RadButton Click="AddLocation_OnClick"/>
            <telerik:RadWatermarkTextBox 
                    Width="100" 
                    Loaded="RadWatermarkTextBox_Loaded"/>
        </StackPanel>
    </telerik:RadDropDownButton.DropDownContent>
</telerik:RadDropDownButton>

 

private void RadWatermarkTextBox_Loaded(object sender, RoutedEventArgs e)
{
    if (sender is RadWatermarkTextBox tb)
    {
        tb.Text = string.Empty;
    }
}
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 asked on 27 Jun 2022
1 answer
245 views

Application simple crush when try to load this component. 
This can occur only on poor computers. 
What can be a problem ?  Any suggestion.

Event time    6/20/2022, 9:21:02.512 AM (Local time)    
Message    System.OutOfMemoryException: Eine Ausnahme vom Typ "System.OutOfMemoryException" wurde ausgelöst.    
Exception type    System.OutOfMemoryException    
Failed method    Telerik.Windows.Controls.AutomationExtensions.GetBaseControlItemStatus    
Problem Id    System.OutOfMemoryException at Telerik.Windows.Controls.AutomationExtensions.GetBaseControlItemStatus    
Assembly    Telerik.Windows.Controls, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7    
Severity level    Critical    
Telemetry type    exception    
Device type    PC    
Client IP address    0.0.0.0    
Country or region    United Kingdom    
Role instance    DEM5CG9125VHX.int.cpaglobal.net    
SDK version    nlog:2.17.0-146    
Sample rate    1    
Custom Properties
LoggerName    error    
threadid    1    
Message    A fatal error has occured. The application will be terminated.    

System.OutOfMemoryException:
   at System.Text.StringBuilder..ctor (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
   at System.Windows.ThicknessConverter.ToString (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Thickness.ToString (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at Telerik.Windows.Controls.AutomationExtensions.GetBaseControlItemStatus (Telerik.Windows.Controls, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at Telerik.Windows.Automation.Peers.GridViewDataControlAutomationPeer.GetItemStatusCore (Telerik.Windows.Controls.GridView, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at Telerik.Windows.Automation.Peers.RadGridViewAutomationPeer.GetItemStatusCore (Telerik.Windows.Controls.GridView, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.ContextLayoutManager.fireAutomationEvents (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.ContextLayoutManager.UpdateLayout (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.UIElement.UpdateLayout (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Interop.HwndSource.Process_WM_SIZE (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Interop.HwndSource.LayoutFilterMessage (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at MS.Win32.HwndWrapper.WndProc (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)

Dilyan Traykov
Telerik team
 answered on 27 Jun 2022
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
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?