Telerik Forums
UI for WPF Forum
0 answers
337 views

My app will typically work with 6 workbooks instantiated (one window each) simultaneously.
User will work interactively with the worksheets, just like he would if Excel was used.
After some editing, he/she will perform some heavy access of data (mostly reading), processing the data and send the outputs to another application (as xml documents by COM interface)

As a test I instantiate 6 spreadsheets, one window each and load them with the same xlsx file.
The loaded workbook filesize is about 430 kBytes and contains 37 worksheets (no graphs or other graphics, just plain worksheets) with a total of 45520 cells with data and 1489 formulas (according to Excel/Review/Workbook Statistics) .

My testmachine has an i7-8700 cpu (6 cores) and available memory before application start of about 24 GBytes of rwm.

The opening time until all 6 spreadsheets are visible and editable on screen is about 90 seconds and final working set is about 1.4 GBytes(!!).
Using Excel 2021/x64 and opening the same 6 workbook instances (6 different copies to enable single process) takes about 6 seconds with final working set of 237 MBytes.

The cpu load while editing the workbooks seems to be much more demanding than Excel as well, not really measured, probably acceptable.
Accessing cells data (reading plain cell data) seems to be doable with acceptable performance.

The long loading time and the high memory demand is not acceptable and means that I cannot use WPF radSpreadsheet as is and will need advice to lower these numbers if possible.
Alternatives are:
Using Excel (accessing with Excel COM automation), but I would very much like to avoid the license cost (and more complex application
development).

Finding another component supplier, similar to Telerik radSpreadsheet, but with possibly better performance (I guess it is not proper to ask in this forum for advice of which supplier could be recommended :)

EuroEager2008
Top achievements
Rank 1
 asked on 14 Dec 2021
2 answers
139 views

Hi there,

We have a situation where we're creating dockable panes and we'd like to make it so when you hit the button to make one it will create it and start a drag option automatically so you can then dock it where you want as soon as you make it, is this doable at all? I haven't been able to find anything online about it

Thanks

Stenly
Telerik team
 answered on 13 Dec 2021
1 answer
166 views

Hi,

I'm adding 2 column groups to my RadGridView, say "A" and "B".
Then I'm removing them using myRadGridView.RemoveRange().

Then I try to add them again: it works for "A", but raises an exception for "B": InvalidOperationException, because apparently a column group with this name already exists.
But I had removed "B" from the column groups!

So I tried to repro with a very simple case:

var cg = new GridViewColumnGroup { Name = "test" };
myRadGridView.ColumnGroups.Add(cg);
myRadGridView.ColumnGroups.Add(cg);

This is done right at the start of the app.
I exepect this to raise the same exception, since I'm trying to add several column groups with the same name.

But it executes without any problem!

So how does it work internally? At the moment this doesn't make much sense to me...

I'm wondering if this exception is only raised if the column groups are actually used by some columns, that are bound to data, but I can't tell...

Thanks for your feedback!

EDIT: I noticed the event RadGridView.ColumnGroups.CollectionChanging is only fired when using ColumnGroups.Add or .Remove, but not when using ColumnGroups.AddRange or ColumnGroups.RemoveRange. Could this be related to my issue?

EDIT2: I managed to avoid the exception by looping through my groupsToRemove and calling .Remove for each of them, instead of directly calling .RemoveRange. This is in the docs: WPF DataGrid | Column Groups | Telerik UI for WPF. However, I'm not using .SuspendNotifications() and .ResumeNotifications() around my loop. If I do this, the exception is raised again. Hope this helps!

Dilyan Traykov
Telerik team
 answered on 10 Dec 2021
1 answer
212 views

I had to add : 

foreach (var column in radgrid.Columns)
            {
                column.ColumnFilterDescriptor.FieldFilter.Clear();
            }

to clear the text .. 

question: is it supposed to work like that ? 

Martin Ivanov
Telerik team
 answered on 10 Dec 2021
0 answers
121 views

Hi Dear Telerik Developers
It seems there is a bug on exporting RadDocument to docx using DocxFormatProvider.  The problem is when the document has a rtl span. Not only the span which we want to be rtl dose not get right to left direction, but also some other properties of the span (such as bold and italic styles) get buggy and do not work properly on Microsoft Word. 

So, after a couple of hours working on this bug (decompiling  Telerik.Windows.Controls.RichTextBox.dll via JustDecompile and searching about what is going on inside of the component)  finally is turns out that the problem is in ExportTextDirection method of SpanExporter class under Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Export namespace. This method uses "rtl" WML element which is not recognizes by Microsoft Word and should be "bidi" to perform correctly.
Thanks to OpenXML technology, currently I am using the following code as a trick to solve the problem:

private static void TestTelerik()
{
var document = new RadDocument();
var section = new Section();
document.Sections.Add(section);
var paragraph = new Paragraph();
paragraph.TextAlignment = Telerik.Windows.Documents.Layout.RadTextAlignment.Justify;
paragraph.FlowDirection = System.Windows.FlowDirection.RightToLeft;
var span = new Span();
span.FlowDirection = System.Windows.FlowDirection.RightToLeft;
span.Text = "متن فارسی نمومه";
span.FontWeight = System.Windows.FontWeights.Bold;
span.FontStyle = System.Windows.FontStyles.Italic;
span.FontFamily = new System.Windows.Media.FontFamily("Tahoma");
paragraph.Inlines.Add(span);
section.Blocks.Add(paragraph);
var provider = new DocxFormatProvider();
var bytes = provider.Export(document);
bytes = RefineDocx(bytes);
IO.File.Write("RTLSpanBugFix.docx", bytes);
}

private static byte[] RefineDocx(byte[] docx) 
{
var stream = new System.IO.MemoryStream(docx);
var openXml = DocumentFormat.OpenXml.Packaging.WordprocessingDocument.Open(stream, true);
var main = openXml.MainDocumentPart;
FixBugOnRightToLeft(main);
openXml.Save();
openXml.Close();
var result = stream.ToArray();
return result;
}
private static void FixBugOnRightToLeft(DocumentFormat.OpenXml.Packaging.MainDocumentPart main)
{
var outerXML = main.Document.OuterXml;
outerXML = outerXML.Replace("w:rtl w:val=", "w:bidi w:val=");
main.Document = new DocumentFormat.OpenXml.Wordprocessing.Document(outerXML);
}

 

Mohammad Afghari
Top achievements
Rank 2
 updated question on 09 Dec 2021
0 answers
321 views

Hi, 

we have a dataset of several thousand items which needs to be fully expanded if some search criteria is applied. This can be displayed with virtualization enabled but we encounter an issue where if we add new records the scroll position jumps to the top, this is not the case with virtualization disabled. 

we are using a hierarchical data template to display our tree view items , and would like the scroll position to remain somewhat consistently in the same place. 

Thanks, 

Richard 

 

 

 

 

 

Richard
Top achievements
Rank 1
 asked on 09 Dec 2021
2 answers
1.5K+ views
Hy i am can`t show image in a RadButton
Please told me how can i do this
Petar Mladenov
Telerik team
 answered on 09 Dec 2021
1 answer
212 views

I want to add a small arrow in the column header. This worked perfect. And if I click on this arrow, the column should have a ver small size (almost invisible).

So I have to set the column width almost to zero. Is there a way to set the width programmatically? I could only set the header width, but not the full column width.

 

This is my wpf to show the arrow:

                    <Style TargetType="telerik:ColumnHeaderContainer" BasedOn="{StaticResource ColumnHeaderContainerStyle}">
                        <Setter Property="ContentTemplate">
                            <Setter.Value>
                                <DataTemplate>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Grid.Column="0" Text="{Binding Header}" />
                                        <Polygon Grid.Column="1" Points="7.5,5 11.5,2 11.5,8 7.5,5" Stroke="Black" StrokeThickness="1" VerticalAlignment="Bottom" 
                                                 HorizontalAlignment="Right" MouseDown="SpalteZusammenklappen">
                                            <Polygon.Style>
                                                <Style TargetType="Polygon">
                                                    <Style.Triggers>
                                                        <Trigger Property="IsMouseOver" Value="True">
                                                            <Setter Property="Polygon.Fill">
                                                                <Setter.Value>
                                                                    <SolidColorBrush Color="Black"/>
                                                                </Setter.Value>
                                                            </Setter>
                                                        </Trigger>
                                                        <Trigger Property="IsMouseOver" Value="False">
                                                            <Setter Property="Polygon.Fill">
                                                                <Setter.Value>
                                                                    <SolidColorBrush Color="White"/>
                                                                </Setter.Value>
                                                            </Setter>
                                                        </Trigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Polygon.Style>
                                            <Polygon.RenderTransform>
                                                <RotateTransform Angle="-37" />
                                            </Polygon.RenderTransform>
                                        </Polygon>
                                    </Grid>
                                </DataTemplate>
                            </Setter.Value>
                        </Setter>

So my Header looks like this:

Stenly
Telerik team
 answered on 09 Dec 2021
3 answers
3.6K+ views

Hello,

I want to change the text color (foreground) of the selected item in a combo box only. The rest of the control should stay as it is.

Can you help me with this?

regards,

Tobias

Stenly
Telerik team
 answered on 09 Dec 2021
1 answer
303 views

When playing around with the RadRichTextBox for WPF, the following has been noticed:

1) Type in some text using Calibri font: 

2)  Insert symbols in Wingdings font by going to Insert and add Symbol: 

3) Close the 'Insert Symbol' popup, and start typing from the Keyboard. Notice that only Wingdings symbols are being typed up: 

Question: Is this the intended behaviour in Telerik? In Microsoft Word 2013. when you insert a symbol, it does not change the font of the text. In this case, Microsoft Word will let the user type out characters in Calibri font from their keyboard after inserting Wingdings symbols through the Insert Symbols icon present in MS Word. Also, in MS 2013, the font present in the Home page would still be Calibri, it will not change to Wingdings as it does in this example.

Note: The RadRichTextBox being used is from the demo which can be downloaded here: https://demos.telerik.com/wpf/

Tanya
Telerik team
 answered on 09 Dec 2021
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?