Telerik Forums
UI for WinForms Forum
2 answers
77 views

 

Hi team ,

I am using Telerik UI for winforms Chartview Drill down charts. I am using line series . I need to get the labels on top of every value( please refer attached screenshot of demo app) but getting object reference not set to an instance of an object .particularly in line  series.ShowLabels = true;  Can you please guide on this?

If I set

  series.DataSource = DrillDownViewModel.ParseDataByDay(year, month);
                    series.ShowLabels = true;
                    series.DrawLinesToLabels = true;
                    series.SyncLinesToLabelsColor = false;

 

Thanks

Anup

Dinko | Tech Support Engineer
Telerik team
 answered on 27 Dec 2023
1 answer
115 views

Hi,

I'm wondering if it could be possible to add an auto close functionnality on RadMessageBox ?

- With a formattable string like this : "Popup will close in {0} seconds"

- We should be able to specify a duration in seconds

- It would only be useable if the MessageBox is not a YesNo(Cancel)

Using an internal timer, the MessageBox would update the formattable string at each tick.

I think it can easily be achieved.

Thanks.

Dinko | Tech Support Engineer
Telerik team
 answered on 22 Dec 2023
1 answer
80 views

Trying to run UI for Winforms examples for a user and we have the store locked down. When I run it on the machine I get a popup stating it wants to run this

C:\Program Files\WindowsApps\Telerik.TelerikUIFormsExamples_202...\windowsstorelauncher.exe

Network location cannot be reached.

 

Does it require the store to be enabled? This is after install and just trying to run it. Yes, we can install it without issues.

Dinko | Tech Support Engineer
Telerik team
 answered on 22 Dec 2023
1 answer
143 views

Hi I am working on Radgridview where on a particular column I have hidden few options like below.

Private Sub grd_ContextMenuOpening(sender As Object, e As ContextMenuOpeningEventArgs) Handles grd.ContextMenuOpening
        Dim i As Integer = 0
        Dim IgnoreOperator() As String = {"Ends with", "Equals", "not equal to", "no filter"}
        If DirectCast(e.ContextMenuProvider, Telerik.WinControls.UI.GridCellElement).ColumnInfo.FieldName = "AcctNbr" Then
            While i < e.ContextMenu.Items.Count
                If Not IgnoreOperator.Contains(e.ContextMenu.Items(i).Text, StringComparer.CurrentCultureIgnoreCase) Then
                    e.ContextMenu.Items(i).Visibility = Telerik.WinControls.ElementVisibility.Collapsed
                End If
                i = i + 1
            End While
        End If
    End Sub

My requirement is to search data from a different a column of Dataview which is binded to the grid  however  column header is different.

I wrote below code expecting that  when `AcctNbr` is the header of column it will search the dataview(dv) based on the row filter and bind it the grid on UI but it's not working

Private Sub grd_FilterChanging(sender As Object, e As GridViewCollectionChangingEventArgs) Handles grd.FilterChanging
        dv.RowFilter =""
        If e.NewValue IsNot Nothing
        If DirectCast((DirectCast(e.NewItems, Object())(0)), Telerik.WinControls.Data.FilterDescriptor).[Operator] = Telerik.WinControls.Data.FilterOperator.IsEqualTo AndAlso DirectCast((DirectCast(e.NewItems, Object())(0)), Telerik.WinControls.Data.FilterDescriptor).PropertyName = "AcctNbr" Then
            Dim CurrentVal As String = CStr(e.NewValue)
            dv.RowFilter = "EnAcctNbr ='" & CurrentVal & "'"
        End If
        If DirectCast((DirectCast(e.NewItems, Object())(0)), Telerik.WinControls.Data.FilterDescriptor).[Operator] = Telerik.WinControls.Data.FilterOperator.IsNotEqualTo AndAlso DirectCast((DirectCast(e.NewItems, Object())(0)), Telerik.WinControls.Data.FilterDescriptor).PropertyName = "AcctNbr" Then
            Dim CurrentVal As String = CStr(e.NewValue)
            dv.RowFilter = "EnAcctNbr <>'" & CurrentVal & "'"
        End If
        End If

how can I achieve this behavior ? I tried to assign the updated dataview as datasource to the grid in `grd_CellEndEdit` event that too did not work. pls. help.

Regards,

Amit Rai

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 21 Dec 2023
1 answer
139 views

Dear Friends,
I am using telerik SelectionChanged event to select row value from grid, another thing I am opening context menu using ContextMenuOpening event, now the problem I am facing is that when I do right click I loss my current selected row.
I do not want to loss current selected row but same time I want to fire  right click event using ContextMenuOpening , do we have any possible solutions for it so we will not loss our selected row when firing ContextMenuOpening of grid.

 

Thanks

Nadya | Tech Support Engineer
Telerik team
 answered on 21 Dec 2023
1 answer
140 views

Theres any sample app winform login using sql server table with password encrypted?

thank you

Dinko | Tech Support Engineer
Telerik team
 answered on 20 Dec 2023
1 answer
72 views

Hi,

I use the RadSpellChecker for some Textbox Controls and it worked great.

But when I have words with more than 9 letters, I don't get the contextmenu die Add these Words to the dictonary.

Any Idead to solve this problem?

Attached a screenshot with the contextmenu on a word with max 9 letters and a screenshot with more than 9 letters.

 

Thank you

Nadya | Tech Support Engineer
Telerik team
 answered on 20 Dec 2023
2 answers
412 views

I have a RadDock with several MdiChildren/DockWindows. When the user closes one of the tabs I want the focus to be set to the previously active tab.

In the ActiveWindowChanged event I remeber the previous active tab. 

I've tried both the radDock.ActivateMdiChild(Form) and radDock.ActivateWindow(DockWindow) methods

What am I missing?

    bool exists = (Array.IndexOf(radDock.MdiChildren, _currentMdi) != -1);
    if (!exists && _prevMdi != null)
    {
        _currentMdi = null;
        _currentDockWindow = null;
          
        //radDock.ActivateMdiChild(_prevMdi);
        radDock.ActivateWindow(_prevDockWindow);
          
    }
 
_prevMdi = _currentMdi;                   
_currentMdi = (Form) ((HostWindow) e.DockWindow).Content;

_prevDockWindow = _currentDockWindow;
_currentDockWindow = e.DockWindow;

Dinko | Tech Support Engineer
Telerik team
 answered on 20 Dec 2023
2 answers
76 views

Hello,

I am using RadScheduler with a grouped TimelineView. The number of resources can be selected with a TrackBar, but if the selected value is to high, the view looks squezed and I got overlappings in my customized resource header elements. So my Idea is a minimum ResourceHeaderHeigth. I want to achieve this by calculating the maximum suitable ResourcesPerView value when the Trackbar is changed or the Form / Scheduler is resized. E.g. if my Scheduler has 250 px size, max 5 resources should be visible and if the size is resized to 200 px, only 4 should be shown, so that every resource has at least 50px height.

But to achieve this I need to get the size of the area, where the resources are paintet or SchedulerSize minus Header and Footer.

        private void tbVisibleResourceCount_ValueChanged(object sender, EventArgs e)
        {
            if (DesignMode)
                return;

            try
            {
                int val = (int) tbVisibleResourceCount.Value;

                if (val <= 0)
                {
                    tbVisibleResourceCount.Value = 1;
                }
                else
                {
                    var newValue = Math.Min(val, AppointmentsVm?.AktiveRessourcen?.Count ?? 0 /*rsTermine.Resources.Count*/);

                    /* todo
                    switch (rsTermine.SchedulerElement.ViewElement)
                    {
                        case SchedulerTimelineViewElement timelineElement:                           
                            break;
                    
                        case SchedulerDayViewElement dayViewElement:
                            break;

                        case SchedulerMonthViewElement monthViewElement:
                            break;

                        case TimelineGroupingByResourcesElement timelineGrouped:
                            IList<SchedulerTimelineViewElement> childTimelineElements = timelineGrouped.GetChildViewElements();
                            break;

                        case SchedulerDayViewGroupedByResourceElement dayViewGrouped:
                            break;

                        case SchedulerMonthViewGroupedByResourceElement monthViewGrouped:
                            break; 
                    }*/

                    rsTermine.ActiveView.ResourcesPerView = newValue;
                }

                SetAppointmentsMargin();
                _adjustBackgroundsTimer?.Reset();
            }
            catch (Exception ex)
            {
                LogHelper.HandleError<CalendarView>(this, $"Fehler in {nameof(tbVisibleResourceCount_ValueChanged)}", ex);
            }
        }

 

Hope you can help me with this problem.

 

Regards,

Stephan

Stephan
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 19 Dec 2023
1 answer
105 views

I'm trying RadVirtualGrid with Hierarchy but when columns are resized, and needs to show scrollbar, height of child table element is not updated.

 

Example

 

Is this a bug? Can I update it manualy?

 

Other issue I have noticed is: when child column header is wider than parent row, it is not longer resizable:

Example 2

 

This is the code used in this examples:

public partial class Form1 : Form
    {

        private int parentRows = 4;
        private int parentColumns = 4;

        private int childRows = 2;
        private int childColumns = 6;

        public Form1()
        {
            InitializeComponent();

            this.grid.CellValueNeeded += (s, e) =>
            {
                if (e.ViewInfo == this.grid.MasterViewInfo)
                {
                    if (e.ColumnIndex < 0) return;
                    else if (e.RowIndex == RadVirtualGrid.HeaderRowIndex)
                    {
                        e.Value = "HEADER_" + e.ColumnIndex;
                    }

                    else if (e.RowIndex < 0)
                    {
                        e.Value = "FIELD_" + e.ColumnIndex;
                    }

                    else if (e.RowIndex >= 0 && e.RowIndex < parentRows)
                    {
                        e.Value = "Value (" + e.RowIndex + ";" + e.ColumnIndex + ")";
                    }
                }
                else
                {

                    if (e.ColumnIndex < 0) return;
                    else if (e.RowIndex == RadVirtualGrid.HeaderRowIndex)
                    {
                        e.Value = "CHILD_HEADER_" + e.ColumnIndex;
                    }

                    else if (e.RowIndex < 0)
                    {
                        e.Value = "CHILD_FILED_ " + e.ColumnIndex;
                    }

                    else if (e.RowIndex >= 0 && e.RowIndex < childRows)
                    {
                        e.Value = "Child_Value (" + e.RowIndex + ";" + e.ColumnIndex + ")";
                    }

                }
            };

            this.grid.QueryHasChildRows += (s, e) =>
            {
                e.HasChildRows = e.ViewInfo == this.grid.MasterViewInfo && e.RowIndex >= 0 && e.RowIndex < parentRows;
            };

            this.grid.RowExpanding += (s, e) =>
            {
                e.ChildViewInfo.ColumnCount = childColumns;
                e.ChildViewInfo.RowCount = childRows;
            };


            this.grid.RowCount = parentRows;
            this.grid.ColumnCount = parentColumns;
        }
    }

 

Dinko | Tech Support Engineer
Telerik team
 answered on 19 Dec 2023
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?