Telerik Forums
UI for WinForms Forum
9 answers
351 views
Hi guys,

I'm in the process of converting all existing WinForm GroupBoxes to RadGroupBoxes programatically. However there's a property called AutoSizeMode that's missing and I need some help to resize a groupbox based on the number of controls in it.

The code that I'm working with now is
GroupBox dbGroupBox = new GroupBox();             
dbGroupBox.Location = new System.Drawing.Point(10, 0); 
dbGroupBox.Name = databaseInstance + pageName; 
dbGroupBox.TabIndex = 0; 
dbGroupBox.TabStop = false
dbGroupBox.Text = pageTitle + "  (Possible Matchs)"
dbGroupBox.AutoSize = true;         
dbGroupBox.AutoSizeMode = AutoSizeMode.GrowOnly;                         
dbGroupBox.Tag = tag.ToString(); 
dbGroupBox.BackColor = Color.Transparent; 

and I need to convert it into

RadGroupBox dbGroupBox = new RadGroupBox(); 
dbGroupBox.Location = new System.Drawing.Point(460, groupBoxY); 
dbGroupBox.Name = databaseInstance + pageName; 
dbGroupBox.TabIndex = 0; 
dbGroupBox.TabStop = false
dbGroupBox.Text = pageTitle + "  (Possible Matchs)"
dbGroupBox.AutoSize = true;         
//dbGroupBox.AutoSizeMode = AutoSizeMode.GrowOnly;                         
dbGroupBox.Tag = tag.ToString(); 
dbGroupBox.BackColor = Color.Transparent; 

Note that line 8 has been commented out because there's no AutoSizeMode in a RadGroupBox. Can you advise on how I can toggle a resize on the Groupbox based on the number of controls within the box? (i.e. the controls are generated dynamically.)

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Aug 2020
4 answers
1.0K+ views

With a RadGridView component, how do I access the contents of a single cell within a row that is selected?

In the code behind, I can access the selected item, but the selection is always the whole row. Granted, this is not unexpected as I have the selection mode set to "Row" (intentionally so). However, when actually interacting with the grid, I can click and highlight individual cells within the row selected – I have to imagine, then, that I should be able to access the specific cell highlighted. To my surprise, I've found no way to accomplish this. Is there a way?

[for context, I want to give the user the ability to copy individual cell values to the clipboard, instead of copying the whole row of values, WITHOUT changing the selection mode]

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Aug 2020
1 answer
193 views

I'd like to have my regions folded when new .CS is loaded.. is there a way to programatically fold / unfold the display text? 

Closest thing I could find was this:  radSyntaxEditor1.SyntaxEditorElement.FoldingManager.UnfoldAllRegionsContaningIndex(1);

Thanks!  Jason

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Aug 2020
2 answers
85 views

Hi

I have one of my RadMenuItem having the MdiList set to true and it is working fine, no issues to report here.

Would it be possible to have a way to close one of the child form directly from that menu? Maybe a little X shown on the right like we see elsewhere?

Eric Moreau
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 17 Aug 2020
3 answers
177 views
How can i set min/max size of dropdown?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Aug 2020
1 answer
223 views

I have a windows form in my application which uses the datetime picker.  I have noticed that there is no "Focus" property on the control.  I cannot do the following: 

fromDatePicker.Focus() and force my my user to interact with that control first, other Telerik controls on the form allow me to do this.  

I am using the latest version of the WinForm controls and VS 2019

What am I missing?

Thanks

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Aug 2020
4 answers
337 views
Hi,
I'm trying to use the best fit functionality for ListViews. Im using a list as the datasource like this:

radListView.DataSource = List<Myclass>

and in the BindingCompleted event i do the following:

            foreach (ListViewDetailColumn c in rlv.Columns)
            {
                c.AutoSizeMode = ListViewBestFitColumnMode.AllCells;
            }
       
The columns are not resized at all. Could you provide me with an example of how to use this feature ?

/Thomas
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 Aug 2020
13 answers
1.2K+ views
hi,

Can anyone guide me in how to change the scrolling position of the scoll bar of radGridView  by code behind. 

regards,
Shewta
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Aug 2020
1 answer
107 views

Hello,

I have problem with completion window location when vertical scroll of SyntaxEditor is not at start position. In that case position of completion window is at the top of control, in same case, somewhere else. I reproduced such behavior on minimal example which I am sharing with you right now.

 

using System.Windows.Forms;
using Telerik.WinForms.Controls.SyntaxEditor.UI.IntelliPrompt.Completion;
 
namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
 
            ICompletionInfoCollection completionInfoCollection = new CompletionInfoCollection
            {
                new CompletionInfo("AAA", "A description."),
                new CompletionInfo("BBB", "B description."),
                new CompletionInfo("CCC", "C description.")
            };
 
            var completionListWindow = this.radSyntaxEditor1.SyntaxEditorElement.IntelliPrompts.CompletionListWindow;
            completionListWindow.Presenter.CompletionListItems = completionInfoCollection;
        }
 
        private void radSyntaxEditor1_DocumentContentChanged(object sender, Telerik.WinForms.SyntaxEditor.Core.Text.TextContentChangedEventArgs e)
        {
            Telerik.WinForms.Controls.SyntaxEditor.UI.CompletionListPopup completionListWindow = this.radSyntaxEditor1.SyntaxEditorElement.IntelliPrompts.CompletionListWindow;
            completionListWindow.Show();
            completionListWindow.Refresh();
        }
 
    }
}

As you can see in the images, in the first two cases everything is ok, but in the third image, when the vertical scroll is not at the start position (moved a little bit), the completion window has a completely wrong place.

Thank you for your answers.
Stoyan
Telerik team
 answered on 12 Aug 2020
3 answers
127 views

Is it possible to export the whole diagram as an image?

Image image = this.radDiagram1.ExportToImage(new Size(10000, 5000));
Clipboard.SetImage(image);

This only exports the visible area which gives me scrollbars which is not what I need.  I want the entire diagram as an image.

Thanks

Paul

 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Aug 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
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
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
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
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
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
DateOnlyPicker
TimeOnlyPicker
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?