Telerik Forums
UI for WPF Forum
1 answer
262 views
It would be good too see if it's either a tab or many spaces that are used in the code.
Stenly
Telerik team
 answered on 15 Aug 2022
0 answers
349 views

I have cells highlighted by changing cell' foreground color.

Now i need to collect those highlighted cells to select cells programmatically. I can browse through values but need to read back cell style:

List<GridViewCellInfo> highlightedCells = new List<GridViewCellInfo>();
foreach (var item in this.gridView.Items)
{
     foreach (var column in this.gridView.Columns.OfType<GridViewBoundColumnBase>())
     {
          var cell = column.GetValueForItem(item); // it is actual cell value
// looking for something like: 
// if (cell.Foreground == Brushes.Cyan)
//       highlightedCells.Add(cell)
     }
}
Thank you,
Gennady
Top achievements
Rank 2
Iron
Iron
 asked on 12 Aug 2022
1 answer
509 views

Hi

I am having an issue binding the IsSelected property of a RadListboxItem. Specifically I am attempting to follow the pattern provided in this blog post Accessing WPF ListBox SelectedItems using MVVM (markwithall.com)

The key part toward the bottom of the post is this which binds the IsSelected property of a ListBoxItem. I have tested it and it works just fine.

<ListBox ItemsSource="{Binding Items}" SelectionMode="Extended">
    <ListBox.ItemContainerStyle>
        <Style TargetType="ListBoxItem">
            <Setter Property="IsSelected" Value="{Binding IsSelected}" />
        </Style>
    </ListBox.ItemContainerStyle>
</ListBox>

However when I try to use a RadListbox and setup the ItemContainerStyle like this

<telerik:RadListBox.ItemContainerStyle>
	<Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
		<Setter Property="IsSelected" Value="{Binding IsSelected}" />
	</Style>
</telerik:RadListBox.ItemContainerStyle>
The bound value does not update, is this by design or a bug?
Ross
Top achievements
Rank 2
Iron
 answered on 12 Aug 2022
0 answers
256 views

Hello,

I have an issue concerning GridViewDataColumn. Currently, my data type is Enum. If I sort it in my RadGridView (click on the header of this column) the view is empty after my click, and every data disappear. With other fields it's working fine (string, int, etc..)

Here's how I create my Column:

<telerik:GridViewDataColumn                         
    Header="Type" UniqueName="MyType"
    DataMemberBinding="{Binding Type}"
    IsSortable="True" IsFilterable="False" IsResizable="True"
    TextAlignment="Left" HeaderTextAlignment="Center" />

It doesn't look possible to sort Enum in this field. Someone has a solution or can help me to make a custom sort for this column?
If you need something more, feel free to ask ;)

Justin
Top achievements
Rank 1
 asked on 11 Aug 2022
1 answer
106 views

Hello, 

I need to create a scale, showing the Major tick at the beginning/at the end of the scale.

In order to do this, I've set ShowLastLabel to false. The data on the scale changes every 200 m/s.  The last label sometimes blinks, even though the property ShowLastLabel is set to false.

If I change EndTickOffset, instead of changing ShowLastLabel, then I do not see the Major tick at the end of the scale.

See the attached example.

 <telerik:RadVerticalLinearGauge 
             FontSize="16"
             Background="Green"
             HorizontalAlignment="Left"
             Width="3"
             Margin="30,94,0,95"
            >
            <telerik:VerticalLinearScale
                    Max="{Binding Max,FallbackValue=20}"
                    Min="{Binding Min,FallbackValue=0}"
                    Background="Green"
                    LabelLocation="Inside"
                    FontSize="16"
                    StartTickOffset="{Binding TickOffset,FallbackValue=0}"
                    EndTickOffset="{Binding TickOffset,FallbackValue=0}"
                 ShowFirstLabel="False"
                    ShowLastLabel="False"
                    MajorTickStep="10"
                    IsInteractive="True"
                    MinorTickBackground="Red"
                    MiddleTicks="2"
                    MiddleTickBackground="Green"
                    MiddleTickLocation="Outside"
                    LabelOffset="16"
                    MiddleTickRelativeWidth="5"
                    MiddleTickRelativeHeight="0.015*"
                    MajorTickRelativeWidth="20"
                    MajorTickRelativeHeight="0.015"
                    EndWidth="0.03"
                    StartWidth="0.03"
                    MinorTicks="1"
                    >
            </telerik:VerticalLinearScale>
        </telerik:RadVerticalLinearGauge>

 

Timer timer= new Timer(200);
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;
            timer.Elapsed += Timer_Elapsed;
            timer.Start();
        }

 

 private void Method(double value)
        {
            Val = value.ToString();
            Min = value - 10;
            Max = value + 10;
            double startValue = Math.Round(Min / 10) * 10;
            TickOffset = startValue - Min;


        }
Stenly
Telerik team
 answered on 11 Aug 2022
1 answer
304 views

Hi, I am trying to display some glyphs in my WPF application using the RadGlyph control.

Unfortunately some of them are not displayed and I do not understand why.

I am usig the 2021 R3 version and .Net Framework 4.7.2.

I am attaching a sample where this issue can be easily reproduced.

Thanks for the help.

Masha
Telerik team
 answered on 11 Aug 2022
1 answer
214 views

Hi,

I use RadGridView.ExportToWorkbook on a grid with over 600 000 rows: the operation take much than 5' to end. Can I speed up it?

Thank you

Luigi

Martin Ivanov
Telerik team
 answered on 05 Aug 2022
0 answers
155 views

I am using Telerik.Windows.Controls for Wpf version 2021.1.233, and have reports from a customer that our application is crashing with the following error included below. As you can see the call stack is not terribly helpful, so I am hoping that either someone else has run into this, or someone from Telerik can offer some insight as to what might be null in the MapSourceInitializeCompleted handler so I can look into preventing this error.

Briefly, my application opens a window with a RadMap, draws a pushpin or two on the map, and the user can close the window at any point. After a period of time the window can also be closed by the application without any user interaction if certain criteria are met. I am fairly sure that the window with the map opens and displays correctly. I think the crash may be related to either an update to the map (drawing the pushpin), or closing the window containing the map, but that is a best guess at this point.

.NET Core Version: 3.1.27
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.Map.TilePresenter.MapSourceInitializeCompleted(Object sender, EventArgs e)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
Heather Kyle
Top achievements
Rank 2
 asked on 04 Aug 2022
1 answer
352 views

Hi,

in wpf, in telerik:RadGridView I can not change width of the RowIndicator column (the very first one where the arrow points at the selected row.). There is only visibility property, but nothing else.

Is there a way to change it?

thank you,

J.

Stenly
Telerik team
 answered on 04 Aug 2022
1 answer
445 views

Hello Team,

I have faced one issue in combbox item template text is not binding after selected item from the combobox.

NOTE; IsEditable field is set to true then the value is not binding.

if its false then its working fine.

I have attached the screenshot for your reference.

Kindly help me to resolve this.

Thanks,

Raja.

Stenly
Telerik team
 answered on 04 Aug 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?