Telerik Forums
UI for WPF Forum
0 answers
185 views

Hello,

I am using the MVVM style on a RadRichTextBox and the XamlDataProvider (using a view model to populate the Xaml through binding). The problem is that I also want to be able to scroll the box after I set the Xaml, preferably as a percentage of the total possible scroll. I can get it to scroll down but then it goes right back.

Any thoughts?

Suzanne
Top achievements
Rank 1
 asked on 24 Jun 2022
1 answer
333 views

Hello,
I'm binding my grid to a collection of RowViewModel, which are basically DynamicObjects that maintain a Dictionary<string, CellViewModel>.
I've read this article to do this : WPF DataGrid | Data Bind to Dynamic Object with CLR and Dynamic Properties | Telerik UI for WPF (even if I'm not using CLR properties at the moment).

Now the thing is, for some rows and columns, it doesn't make sense having a cell (this is business-related).
So for these rows/columns, I don't create a new entry in my row dictionary. That leads to the following Get/Set methods inherited from DynamicObject:

public override bool TryGetMember(GetMemberBinder binder, out object result)
{
    if (dic.ContainsKey(binder.Name))
    {
        result = dic[binder.Name];
        return true;
    }

    result = null;
    return false;
}

public override bool TrySetMember(SetMemberBinder binder, object value)
{
    if (dic.ContainsKey(binder.Name))
    {
        dic[binder.Name].Value = value;
        return true;
    }

    return false;
}

It seems to work well, there is no crash and it displays correctly (the concerned cells are empty).
However in my XAML Binding Failures, I have a bunch of these:

How to avoid this?
Thanks!

Eldoir
Top achievements
Rank 2
Iron
Iron
Iron
 updated answer on 23 Jun 2022
1 answer
191 views

Hello,

I would like to convert select track changes inserts in to track changes delete. I have this code...

Revision rev = radRichTextBox.Document.GetCurrentRevision();
            if (rev.RevisionElements.First().ToString().Contains("Insert"))
            {
                DocumentPosition startPosition = new DocumentPosition(rev.SelectionRange.StartPosition, true);
                DocumentPosition endPosition = new DocumentPosition(rev.SelectionRange.EndPosition, true);
                radRichTextBox.AcceptRevision(rev);
                this.radRichTextBox.Document.Selection.SetSelectionStart(startPosition);
                this.radRichTextBox.Document.Selection.AddSelectionEnd(endPosition);
                radRichTextBox.Delete(true);
            }

But the problem is that I can only do it for the current revision (Document.GetCurrentRevision). I would like to do it for all selected revisions. Anyone out there have a solution?

Tanya
Telerik team
 answered on 23 Jun 2022
2 answers
277 views

Hi there,

as soon as I switch SelectionUnit to something different than "FullRow", the current cell focus is no more jumping down to the next cell when I press the enter key.

I'm replacing the plain old WPF default DataGrid in some application right now and I need to have the RadGridView (2015.1.225.45) act in the same way as the default DataGrid! I already tried to use IKeyboardCommandProvider but it does not work. I can debug into the provider code and everything seems to be arranged correctly (the commandsToExecute list), but it seems like the GridView does not know what to do with these commands...

So, how can I get the default enter key pressed behaviour only with SelectionUnit "Cell" and SelectionMode "extended"?

Cheers,

Marcel

Jonas
Top achievements
Rank 1
Iron
 answered on 23 Jun 2022
0 answers
274 views

I am converting HTML document to RTF by Telerik.Windows.Documents.Flow.FormatProviders.Rtf.RtfFormatProvider.

Conversion works fine, but When I am binding final RTF document to RadRichTextBox editor (RtfFormatProvider), It gives me following error

 

Style of type Paragraph can not have linked style of type Paragraph.

System.InvalidOperationException: Style of type Paragraph can not have linked style of type Paragraph. at Telerik.Windows.Documents.Model.Styles.StyleDefinition.CheckIsValidLinkedStyle(StyleDefinition linkedStyle) at Telerik.Windows.Documents.Model.Styles.StyleDefinition.set_LinkedStyle(StyleDefinition value) at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfStylesTable.InitializeRelatedStyles() at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfStylesTable.ReadTable(RtfGroup group, RtfImportContext context) at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfHandlers.RtfGroupHandlers.StylesTableHandler(RtfGroup group, RtfImportContext context) at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfDocumentImporter.DoVisitGroup(RtfGroup group) at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfElementIteratorBase.VisitElement(RtfElement element, Boolean recursive) at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfElementIteratorBase.VisitGroupChildren(RtfGroup group, Boolean recursive) at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfDocumentImporter.ImportRoot(RtfGroup rtfGroup) at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfDocumentImporter.Import(Stream input, RtfImportSettings settings) at Telerik.Windows.Documents.FormatProviders.Rtf.RtfFormatProvider.Import(Stream input) at Telerik.Windows.Documents.FormatProviders.Rtf.RtfFormatProvider.Import(String input)

 

For reference I am attaching sample project and html document.

 

We are facing lot of issue by such conversion. Sample Html document I shared is generated by Telerik Richtext box editor, but same document conversion is not working.

Kamran
Top achievements
Rank 3
Iron
Iron
Veteran
 updated question on 23 Jun 2022
0 answers
328 views

Hello,

Is it possible to sort/filter data only within a specified group?

For example, there are 3 groups, the first one is sorted by the first column, the second group is sorted by the second column and etc. 

Oleh
Top achievements
Rank 1
 asked on 22 Jun 2022
1 answer
173 views
Currently, the grid view Combobox column onchange event fires only the lost focus on that field. We need to call the function when the combobox option is chosen without closing the Combobox. Please help with this.
Dilyan Traykov
Telerik team
 answered on 22 Jun 2022
0 answers
166 views

Hi,

 

Can we have RadMultiColumnComboBox restrict text input to items in the ItemsSource?

Same functionality as found in a editable RadComboBox with both IsEditable and IsReadOnly set to True.

Avrohom
Top achievements
Rank 1
Iron
Iron
 asked on 21 Jun 2022
0 answers
136 views

Hello,
I'm using the RadGridView tool (WPF) and I'm having problems integrating my data sources there.
I am using LINQ to query two tables, something like this:

TableMaster = from tabM in EntitiesObject.TableMaster 
                        select tabM;
TableDetails = from tabD in EntitiesObject.TableDetails
                               where tabD.Description.Contains(SearchCriteria)
                               select tabD;

How can I display / bind these two tables in the RadGridView control as MasterDetail?

I am using Telerik UI for WPF R1 2022 SP1 :)

Greetings,

Frank
Frank
Top achievements
Rank 1
 asked on 21 Jun 2022
1 answer
281 views

I'm looking to convert all my style in my application to Windows11 style.

However, I have a little probleme with TextBox. As we create a control template for our textbox to add a button, I'm not able to replicate the Windows11 style in my template.

Our textbox looks like this:

Button can be shown or not.

Now, I want a look like this (this is the autocompletebox):

Vicky
Telerik team
 answered on 21 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
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
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?