Telerik Forums
UI for WinForms Forum
5 answers
334 views
Can I change printer for printing from GridView without PrinterDialog, but from code? (i.e. not default printer and not using PrinterDialog. I have to save printer by user and set it when it is needed)  
Krasimir
Top achievements
Rank 1
 answered on 30 Dec 2020
13 answers
278 views

Hi,

I have put the calendar into a popupeditor, the purpose is to choose a "from" and "to" date for filtering data. For that reason I'm trying to only allow 2 selected dates. It doesn't seem to be so straight forward, currently I tried to prevent more than 2 selected dates in the SelectionChanged and SelectionChanging event by using e.Cancel = true and some other stuff also. But it's like the events doesn't detect it before too many dates are selected?

The best scenario would be if there's a way to disable the "drag selection" so that it's only possiple to select a date by clicking a date.

 

In any case, how can this behavior be achieved? 

 

Thanks in advance!

Nadya | Tech Support Engineer
Telerik team
 answered on 29 Dec 2020
6 answers
176 views
I develop candlestick charts now. How to use Telerik UI for WinForms put candlestick series on the top and volume series on the bottom? (like 2020-12-24_16-38-06.png)
Nadya | Tech Support Engineer
Telerik team
 answered on 29 Dec 2020
3 answers
172 views

Hi. 

I tried to do the same for the example in this article, but there was no drop-down list. It also did not accept the values on the list.

CellIndex dataValidationRuleCellIndex = new CellIndex(0, 0);
  
ListDataValidationRuleContext context = new ListDataValidationRuleContext(worksheet, dataValidationRuleCellIndex);
context.InputMessageTitle = "Restricted input";
context.InputMessageContent = "The input is restricted to the week days.";
context.ErrorStyle = ErrorStyle.Stop;
context.ErrorAlertTitle = "Wrong value";
context.ErrorAlertContent = "The entered value is not valid. Allowed values are the week days!";
context.InCellDropdown = true;
context.Argument1 = "Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday";
  
ListDataValidationRule rule = new ListDataValidationRule(context);
  
worksheet.Cells[dataValidationRuleCellIndex].SetDataValidationRule(rule);

 

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 29 Dec 2020
1 answer
254 views

I need to loop through all controls/elements and child controls/elements on a form and disable the control/element if the Tag property = "someText".

The following code works for controls and child controls on the form, but not for radRibbonBar elements. 

=================================================
foreach (var control in GetControlHierarchy(this))
            {
                if (control.Tag != null)
                {
                    if (control.Tag.Equals("someText"))
                    {
                        control.Enabled = false;
                    }
                }
            }

 private IEnumerable<Control> GetControlHierarchy(Control root)
        {
            var queue = new Queue<Control>();

            queue.Enqueue(root);

            do
            {
                var control = queue.Dequeue();

                yield return control;

                foreach (var child in control.Controls.OfType<Control>())
                    queue.Enqueue(child);

            } while (queue.Count > 0);
        }
======================================================

How would I change the above code to include radRibbonBar elements?

Thank you,

Nadya | Tech Support Engineer
Telerik team
 answered on 29 Dec 2020
3 answers
122 views

How to add a click event to the form header? How to do it so that the event fires only when you click on the header, excluding buttons and tabs.

For clarity, I have highlighted the area in the picture below, only it should react to the event.

Nadya | Tech Support Engineer
Telerik team
 answered on 28 Dec 2020
1 answer
704 views

Hi,

 

I'm currently using a dataentry connected to a bindingnavigator. I'm using the below code to check when the bindingsource collection change.

The goal is to disable the delete button in the bindingnavitor when the bindingsource collection has 1 item in it like shown below:

bs.ListChanged += (s, e) =>
                    {
                        int itemCount = Convert.ToInt32(bindingNavigator.BindingNavigatorElement.PageLabel.Text.Split(' ')[1]);
                        if (itemCount == 1)
                        {
                            bindingNavigator.BindingNavigatorElement.DeleteButton.Enabled = false;
                        }
                        else
                        {
                            bindingNavigator.BindingNavigatorElement.DeleteButton.Enabled = true;
                        }
                    };

 

However, I'm having a hard time disable the delete button. As seen in the ListChanged, I'm using below code to disable the button, but it seems that it has no effect at all. Am I doing something wrong?

bindingNavigator.BindingNavigatorElement.DeleteButton.Enabled = false;

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 Dec 2020
7 answers
170 views

I see TabbedForm has RightItems and LeftItems. How to add various controls there?

I've tried creating a Button(Button btn = new Button();), and adding it(RightItems.add(btn)). However, this did not work, since the Add method asks for a certain RadItem ?! I did not find details and examples in the documentation :(

Nadya | Tech Support Engineer
Telerik team
 answered on 25 Dec 2020
10 answers
231 views

Hello, 
We're using RadTreeView with a mutiselection and expect that SelectedNodesChanged event will be fired once user select/deselect set of nodes (e.g. with Shit Key), Unfortunately it fires much more times.
Example: if I have several nodes selected and just click on any single node, I expect SelectedNodesChanged event will be fired only once, or at least two times (collection cleared, and then filled with single node), but it fires as much as I have selected nodes plus one? are you ok with that?

Could you explain how it works? for me it looks like a bug. It's replicated on latest 2019 R1 release

Arnold
Top achievements
Rank 1
 answered on 24 Dec 2020
1 answer
116 views

Good morning, I would like to know how you can combine an object that contains a list inside it and be able to pass it to a list in the document. This is my class to combine:

public class Customer

{
        public string Name{ get; set; }

        public int Age{ get; set; }

        public string PaymentDate{ get; set; }
       
        public ObservableCollection<string> ChildrenName{ get; set; }

}

Martin
Telerik team
 answered on 24 Dec 2020
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)
Form
Chart (obsolete as of Q1 2013)
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
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
CollapsiblePanel
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?