Telerik Forums
UI for WinForms Forum
2 answers
28 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
29 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
1 answer
27 views

I can't consistently have the SelectedItemChanged event called when clicking an item with a Listview in IconsView.  If a click is made in empty space, the event is triggered.  

What am I missing?

Attached is a sample app.

 Thanks,

_D

Nadya | Tech Support Engineer
Telerik team
 answered on 18 Dec 2023
2 answers
30 views

Hi team,

 

I have a scenario where we need to add line series to the chart dynamically from code behind and I need to bind live data (i.e, data changes for every 2 seconds) . I am using Telerik UI for WinForms controls . 

One static line series work perfectly fine using the demo sample. The problem is adding 'n' number of line series and setting data every 2 seconds . In the sample , data is set using a global variable. but we need to achieve the same dynamically 

 

Can anyone guide on this

Anup
Top achievements
Rank 1
Iron
 answered on 13 Dec 2023
1 answer
22 views

Mouse Down event invalid.

private void radTextBox1_MouseDown(object sender, MouseEventArgs e)
{
    radTextBox1.Text = "test";
}
Dinko | Tech Support Engineer
Telerik team
 answered on 11 Dec 2023
1 answer
32 views

I have a radgridview grid with paging.  I have a mouse double click event:


private void RgvSyncUp_MouseDoubleClick(object? sender, MouseEventArgs e)
{
	var rgv = (RadGridView)sender;
	var myRow = rgv.CurrentRow;
	var dlg = new DlgPendingSync(myRow);
	dlg.ShowDialog();
}

 

The problem I am having is this, that if the user double clicks a paging control it fires off the mouse double click event and the dialog mentioned in the code gets shown. 

Is there a way to trap or prevent this or prevent the double click on the paging control from firing off my dialog?

 

Thank you,

Kevin

 

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Dec 2023
1 answer
40 views

BestFitColumns is a great way to stretch/narrow your columns based on the data they contain.

There are a few issues when using this.  My suggestion deals with one of them.

Suggestion:  When using BestFitColumns, please add a new optional Parameter called "PadWidth" or something similar.  This would be an Integer value and when the BestFitColumns executes, it will add "PadWidth" pixels to the width of the column AFTER calculating the 'Best Fit' width.

Reason:  Several Themes will accurately "squeeze" column width's so they JUST BARELY fit the Column Data. While this may be the desired output, it's rather unpleasant to look at:  The data is smashed right up against both left and right cell borders.  Additionally, some themes have a 2 or more pixel, Cell FOCUSED border (I don't know what to call it.  The 'cursor' perhaps?  The visual indicator of what Cell the user is currently on. 

Anyway, as you move this 'Cursor' if you navigate to a cell where the data was the widest, this thicket "border" takes up too much room in the cell to display the entire string, and so you're back to seeing Ellipses instead of the entire data.

By adding an Optional "PadWidth" value (I'll use 10 for example) AFTER the BestFit width has been calculated but before that is applied to all columns, the cell width will gain an additional 10 pixels.  This will allow for the extra-wide Cell "cursors" as well as allow developers to create less "cramped" grids.

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 06 Dec 2023
1 answer
34 views

Hi!

I have a chart with multiple Y axes, series, and an X axis as DateTimeContinuousAxis.

The thing is my chart is customizable and I should be able to change the series styling from line to column. When I change one of my series to a column, it is not centered with the rest of the series and according to the X-axis (see first img).

See the tooltips that the lines are at the same point (img2) but when I change to column, the column ends at that point, it is not centered.

Any suggestion?

Columns

Linear

Dinko | Tech Support Engineer
Telerik team
 answered on 05 Dec 2023
1 answer
40 views

Hi, 

 

I add shape page. In shape of text can I do change color of text at third line similar like picture? If I choose third line of text change color can first and second text no change color? How I write it. Because user want to change or add any of text color.

Thanks.

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Dec 2023
2 answers
670 views
Hi..

I want to ask if there is any approach to determine the position of mouse down or up related to cell, in order to know which part of cell has been clicked.

Thanks in advance.
Jeff
Top achievements
Rank 1
Iron
 answered on 01 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
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
ContextMenu
Spreadsheet
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
DateTimePicker
CollapsiblePanel
Conversational UI, Chat
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
PictureBox
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?