Telerik Forums
UI for WinForms Forum
3 answers
108 views

How would I create and populate 10 Worksheets with SQL queries for each one, when form loads or other event using a Spreadsheet control with Ribbon?

 

Thanks,

Dimitar
Telerik team
 answered on 21 Nov 2017
6 answers
272 views

Hello, my English is bad, very bad 8D 

BindingNavigator don't work, when I write code:

 

RadBindingNavigator.BindingSource = tableBindingSourse;

 

however, in the standart BindingNavigator it's working this code

pls, help ^___^ 

Hristo
Telerik team
 answered on 20 Nov 2017
7 answers
2.6K+ views
On a number of my gridviews I have button columns which I want to have set to a fixed width, otherwise they resize very wide which just looks weird.. To add my button column as a fixed width column I do something like this:

        Dim commandColumn As New GridViewCommandColumn() 
        commandColumn.UniqueName = "Command" 
        commandColumn.HeaderText = "" 
        commandColumn.Width = 70 
        commandColumn.MaxWidth = 70 
        commandColumn.MinWidth = 70 
        Me.GridView1.MasterGridViewTemplate.Columns.Add(commandColumn) 

I also have the grid set to auto resize the columns with:

        Me.GridView1.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill 

The problem is that the columns no longer take up the full width of the grid as a result of the fixed width column(s).. When I manually resize the columns, sometimes it will "snap" to the width of the grid, but I want it to be done automatically when the grid loads..

Any ideas?
Hristo
Telerik team
 answered on 20 Nov 2017
5 answers
306 views

Hi

1.How Determine the StartDate for the First month (Example: 2016/05/01)

2.How Set the Navigator Month Start (Step First month. Example: 2016/05/01 - 2016/05/30)

3.How radScheduler According to the adjusted image?

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Nov 2017
0 answers
99 views
Hi

I am a programmer evaluating the raddock

Created the form and add raddock control.

I hv created one text box in right side tool window.

I hv a radform as a document in the dock container.

I need to access the tool window text box and pass the value to the text box from the

document form.

I am unable to access the text box control which is resided in the tool window of raddock.

Please help me for the above.

Regards
Ramachandran
Top achievements
Rank 1
 asked on 18 Nov 2017
3 answers
195 views

Hi.

How do i change the "time" color in a appointment? I have figured out to change everything else, but not this. See attached file.

Rossi
Top achievements
Rank 1
 answered on 17 Nov 2017
10 answers
353 views
I have a column with multiple data types. I'm using the EditorRequired event to set the editor as a RadDateTimeEditor or RadDropDownListEditor as needed. In some cases I set the RadDropDownListEditor's datasource to a datatable as shown in the code below. When I click in the cell, the radDropDownListEditor works perfectly, but when I click away from that cell, the cell shows the OfficeNumber (the valueMember) instead of the OfficeName (the displayMember). How do I get it to show the OfficeName?

       Private Sub dgv_EditorRequired(sender As Object, e As EditorRequiredEventArgs) Handles dgv.EditorRequired
             Select Case dgv.CurrentRow.Cells("EditorType").Value
                    
                    Case EditorType.OfficeDropDown
                        Dim editor As New RadDropDownListEditor
                        editor.DropDownStyle = RadDropDownStyle.DropDownList
                        DirectCast(editor.EditorElement, RadDropDownListEditorElement).DataSource = dtOffices
                        DirectCast(editor.EditorElement, RadDropDownListEditorElement).DisplayMember = "OfficeName"
                        DirectCast(editor.EditorElement, RadDropDownListEditorElement).ValueMember = "OfficeNumber"
                        e.Editor = editor
                End Select
End Sub
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Nov 2017
12 answers
287 views

We’re having a serious performance issues with RadGridView in Telerik v.2017.1.221.40 for Winforms. It is very easy to reproduce.
The code below opens up a Form with the only control, RadGridView and then adds 5,000 rows to it. The control has a single column containing Boolean values. Since the EnableHeaderCheckBox property of the column is set to true, it is possible to manually tick the check box in the column header.
With v.2017.1.221.40, after the checkbox ticked, it takes 10 seconds to the program to actually tick the boxes in all 5,000 rows and then 7 seconds to untick them. During this time the control (and the form too of course) remains unresponsive.

In another code example, which is virtually identical to the one below (it’s part of a large application), it takes more than 30 seconds to perform the operation.

However with v.2015.1.331.40, this operation is executed instantaneously.

Environment: i7-4770 CPU @ 3.40Gz, 24GB RAM, Windows 10 Pro, .Net 4.6.

 

    public partial class Form1 : Form
    {
        private Telerik.WinControls.UI.RadGridView rgvSites;
        private readonly BindingList<Site1> siteList = new BindingList<Site1>();

        public Form1()
        {
            InitializeComponent();

            for (int i = 1; i <= 5000; i++)
            {
                this.siteList.Add(new Site1() { Id = i, Number = i, Name = "site" + i });
            }
            this.rgvSites.DataSource = this.siteList;
        }
        private void InitializeComponent()
        {
            Telerik.WinControls.UI.GridViewCheckBoxColumn gridViewCheckBoxColumn1 = new Telerik.WinControls.UI.GridViewCheckBoxColumn();
            Telerik.WinControls.UI.TableViewDefinition tableViewDefinition1 = new Telerik.WinControls.UI.TableViewDefinition();
            this.rgvSites = new Telerik.WinControls.UI.RadGridView();
            ((System.ComponentModel.ISupportInitialize)(this.rgvSites)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.rgvSites.MasterTemplate)).BeginInit();
            this.SuspendLayout();
            // 
            // rgvSites
            // 
            this.rgvSites.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.rgvSites.CausesValidation = false;
            this.rgvSites.EnableAnalytics = false;
            this.rgvSites.EnableGestures = false;
            this.rgvSites.EnableHotTracking = false;
            this.rgvSites.EnableTheming = false;
            this.rgvSites.Location = new System.Drawing.Point(31, 31);
            // 
            // 
            // 
            this.rgvSites.MasterTemplate.AllowAddNewRow = false;
            this.rgvSites.MasterTemplate.AllowCellContextMenu = false;
            this.rgvSites.MasterTemplate.AllowColumnChooser = false;
            this.rgvSites.MasterTemplate.AllowColumnHeaderContextMenu = false;
            this.rgvSites.MasterTemplate.AllowColumnReorder = false;
            this.rgvSites.MasterTemplate.AllowColumnResize = false;
            this.rgvSites.MasterTemplate.AllowDeleteRow = false;
            this.rgvSites.MasterTemplate.AllowDragToGroup = false;
            this.rgvSites.MasterTemplate.AllowRowResize = false;
            this.rgvSites.MasterTemplate.AutoGenerateColumns = false;
            gridViewCheckBoxColumn1.AllowFiltering = false;
            gridViewCheckBoxColumn1.AllowGroup = false;
            gridViewCheckBoxColumn1.AllowHide = false;
            gridViewCheckBoxColumn1.AllowReorder = false;
            gridViewCheckBoxColumn1.AllowResize = false;
            gridViewCheckBoxColumn1.AllowSort = false;
            gridViewCheckBoxColumn1.EnableHeaderCheckBox = true;
            gridViewCheckBoxColumn1.FieldName = "Selected";
            gridViewCheckBoxColumn1.HeaderText = "Selected";
            gridViewCheckBoxColumn1.Name = "Selected";
            gridViewCheckBoxColumn1.VisibleInColumnChooser = false;
            gridViewCheckBoxColumn1.Width = 23;
            this.rgvSites.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] {
            gridViewCheckBoxColumn1});
            this.rgvSites.MasterTemplate.EnableGrouping = false;
            this.rgvSites.MasterTemplate.EnableSorting = false;
            this.rgvSites.MasterTemplate.ShowRowHeaderColumn = false;
            this.rgvSites.MasterTemplate.VerticalScrollState = Telerik.WinControls.UI.ScrollState.AlwaysShow;
            this.rgvSites.MasterTemplate.ViewDefinition = tableViewDefinition1;
            this.rgvSites.Name = "rgvSites";
            this.rgvSites.ShowCellErrors = false;
            this.rgvSites.ShowItemToolTips = false;
            this.rgvSites.ShowRowErrors = false;
            this.rgvSites.Size = new System.Drawing.Size(240, 218);
            this.rgvSites.TabIndex = 0;
            this.rgvSites.Text = "Sites";
            // 
            // Form1
            // 
            this.ClientSize = new System.Drawing.Size(284, 261);
            this.Controls.Add(this.rgvSites);
            this.Name = "Form1";
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.rgvSites.MasterTemplate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.rgvSites)).EndInit();
            this.ResumeLayout(false);
        }
    }
    class Site1
    {
        public long Id { get; set; }

        /// <summary>
        /// Site number.
        /// </summary>
        public long Number { get; set; }

        /// <summary>
        /// Site name.
        /// </summary>
        public string Name { get; set; }

        public bool Selected
        {
            get;
            set;
        }
    }

Dimitar
Telerik team
 answered on 17 Nov 2017
29 answers
1.1K+ views
I am trying to write some code for the cellDoubleClick event, but it seems that it only fires if the cells column is readonly.  Is there a way around this?  It looks like the first click will open the cell up for editing and the second click is ignored.  I want to have different code run for a single click  or a double click event.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Nov 2017
2 answers
146 views

I have RadForm-derived class that I'm adding as RadDock document windows. How do I make them stay the same size as the container? Please see attachment.

 

The code I'm using is something like this:

var view = new MyView(rule)
{
    Dock = DockStyle.Fill,
    TopLevel = false,
    FormBorderStyle = FormBorderStyle.None,
    MdiParent = this,
    Text = "blah",
};
 
view.Show();
var wnd = new DocumentWindow {Text = "blah"};
wnd.Controls.Add(view);
radDock1.AddDocument(wnd);

 

I'm using an older version of Telerik at the moment. The version of RadDock.dll is 2017.3.912.40 and Runtime version is v4.0.30319.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Nov 2017
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
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
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
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?