Our application has a form with multiple wide WatermarkTextboxes (and other textbox-like controls, e.g. MaskedDateTimeInput) in a grid layout. Most of them are single-line but some might become multiline, if the user enters long texts. The attached screenshot shows the form region where the problem becomes the most apparent.
Since each textbox, by default, has its own ScrollViewer that swallows all incoming scroll events, scrolling the main form via mouse wheel becomes pretty much impossible.
Browsers, such as Firefox, circumvent this issue by bubbling scroll events to the parent, whenever the child scrollviewer reaches its end. We could add this kind of workaround via an attached behavior but as our form is quite large, this would become ugly really soon. Is there any better solution and if not, would this be something that can be made possible in a future release?
Good Day.
Is there a way the have the WatermarkTextBox accept multi line text including next lines? I dont want to use the RadRichTextBox as it looks much complicated the what I needed. I just need a simple multi line textbox.
Also, I noticed that with WatermarkTextBox, It does not set the caret to the end of the text when I input a long text. As a result, it only displays the first part of the long text when typing. I already set the property SelectionOnFocus to CaretToEnd.
It only shows the expected behavior when I navigate to the end of the text then type again
Hello,
I'm using: Telerik 2019.1.116.45
1. I'm looking to display code in a read only view. I have found the RichTextBox API for insert code block and I like the formatting and key word coloring for the CSharp setting. I am wondering how can I interact with the Codeblock through MVVM, instead of calling the insert code api.
2. I have found that it takes a bit of time to load when the code is perhaps around 60-70 lines. Any way/settings I can set to increase the speed?
Hello
I am trying to migrate a WPF app to PRISM 7.
The MainWindow (Shell) is a RadRibbonWindow, hence it doe not migrate as it seems it is not of type Window.
I followed the instructions highlighted here (https://docs.telerik.com/devtools/wpf/knowledge-base/kb-radwindow-prismapplication-createshell), but I am missing a critical piece of information.
- Where do I find the "TelerikShell" type? Which dll, out of the many Telerik dlls that comes with WPF?
Also, if you have a working sample application that used PRISM 7 that you can sher would appreciate it.
Thanks
Herald
Hi,
I'm using grid.SelectedItems.Add(row); in a loop to select rows on a grid. However sometimes I need to select 10,000+ rows and this can take over 15 seconds. I have tired .AddRange() but that takes the same amount of time.
Is there a faster way to select items, especially with a very large number of rows?
Thanks,
Richard
Hello,
I don't get any rows displayed when filtering with popup mode, grouping with drag&drop and sorting either by clicking on the column header or programatically.
And I get all my rows back when clearing filter/grouping/sorting either directly on the UI or programatically. Could you please help me?
Designer.xaml
<
telerik:RadGridView
x:Name
=
"AttributesTable"
ItemsSource
=
"{Binding Path=Items}"
RowDetailsVisibilityMode
=
"Collapsed"
ScrollViewer.CanContentScroll
=
"False"
AutoGenerateColumns
=
"False"
CanUserSortColumns
=
"True"
Sorting
=
"AttributesTable_Sorting"
PreparedCellForEdit
=
"AttributesTable_PreparedCellForEdit"
CellEditEnded
=
"AttributesTable_CellEditEnded"
FilteringMode
=
"Popup"
IsFilteringAllowed
=
"True"
MouseLeftButtonDown
=
"AttributesTable_MouseLeftButtonDown"
FieldFilterEditorCreated
=
"OnRadGridViewFieldFilterEditorCreated"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Button
Style
=
"{StaticResource NoChromeButton}"
Command
=
"{base:XamlRoot Path=DataContext.Navigate}"
CommandParameter
=
"{Binding}"
>
<
Image
Source
=
"/STTAR;component/Resources/Object_Globe_16xLG.png"
ToolTip
=
"{base:ResX ResKey=CenterMapToolTip}"
/>
</
Button
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
Code.cs
columns = (this.DataContext as AttributesTableViewModel)?.Columns;
items = (this.DataContext as AttributesTableViewModel)?.Items;
DynAdapter = (this.DataContext as AttributesTableViewModel)?.DynAdapter;
if (columns.Count == 0)
{
var temp = AttributesTable.Columns[0];
AttributesTable.Columns.Clear();
AttributesTable.Columns.Add(temp);
return;
}
var alreadyInsertedColsNames = (from col in (AttributesTable.Columns as ObservableCollection<
GridViewColumn
>).Where(col => col.DisplayIndex != 0) select col.Header as string).ToList();
var colsNames = (from col in columns select col.DisplayName).ToList();
var notInsertedColsNames = colsNames.Except(alreadyInsertedColsNames).ToList();
var toRemoveColsNames = alreadyInsertedColsNames.Except(colsNames).ToList();
if (notInsertedColsNames.Count > 0)
foreach (string colName in notInsertedColsNames)
{
FeatureAttribute selectedCol = columns.Where(col => col.DisplayName == colName).FirstOrDefault();
var gridViewColumn = new GridViewDataColumn();
switch (selectedCol.Name)
{
case FeatureAttributes.Cost:
string costUnit = String.Format(" ({0})", DynAdapter.Project.Settings.CurrencyCode);
gridViewColumn.Header = selectedCol.DisplayName + costUnit;
break;
case FeatureAttributes.Length:
string lengthUnit = " (m)";
gridViewColumn.Header = selectedCol.DisplayName + lengthUnit;
break;
case FeatureAttributes.Id:
case FeatureAttributes.Source:
case FeatureAttributes.Support:
gridViewColumn.IsReadOnly = true;
gridViewColumn.Header = selectedCol.DisplayName;
break;
default:
gridViewColumn.Header = selectedCol.DisplayName;
break;
}
// GetBindingStringForAttribute returns ".[propertyName]"
gridViewColumn.DataMemberBinding = new Binding(GetBindingStringForAttribute(selectedCol));
gridViewColumn.FilterMemberPath = GetBindingStringForAttribute(selectedCol);
gridViewColumn.FilterMemberType = selectedCol.DataType;
gridViewColumn.DataType = selectedCol.DataType;
gridViewColumn.ShowDistinctFilters = false;
gridViewColumn.CellTemplateSelector = (DataTemplateSelector)GridContainer.Resources["CellTemplateSelector"];
gridViewColumn.CellEditTemplateSelector = (DataTemplateSelector)GridContainer.Resources["CellEditTemplateSelector"];
AttributesTable.Columns.Add(gridViewColumn);
}
foreach (string toRem in toRemoveColsNames)
{
var colToRemove = (AttributesTable.Columns as ObservableCollection<
GridViewColumn
>)
.FirstOrDefault(col => col.Header == toRem);
if (AttributesTable.Columns.Contains(colToRemove))
AttributesTable.Columns.Remove(colToRemove);
}