Telerik Forums
UI for WinForms Forum
1 answer
205 views
I would like to change the data source of a Rad Grid Combo Box dynamically. Does anyone have an example of this?

Thanks, 
Chuck
Svett
Telerik team
 answered on 29 Jun 2011
1 answer
83 views
I want remove the default text "Click here...".
And,I want to focus the fisrt cell as add a new row.
Please provide the alternative solution to achieve this functionality.
Nikolay
Telerik team
 answered on 28 Jun 2011
1 answer
109 views

Hi,

I need to have a grid which can simulate the pivoting behavior of a pivot grid. I know Telerik does not have a pivot grid in Winforms, but would like to know if such a thing can be implemented somehow.

In the snapshot attached, pivoting has been done on 2 columns "Designation" and "Age". The remaining columns can either show the count of values or the sum of values.

Hoping for your help,

Thanks and regards,

Nihar.

Jack
Telerik team
 answered on 28 Jun 2011
1 answer
123 views
Hi there,

I have been looking at the RadScheduler for WinForms (Q3 2010), and noticed that there is a TimeZoneInfo class inside Telerik.WinControls.UI.

Using this class it appears I can convert between Time Zones used in the .NET Framework, which is very helpful.

However, the target framework for my project is .NET 2.0 - which normally does not have this functionality (Microsoft only introduced the ability to convert between time zones in the TimeZoneInfo class of .NET 3.5).

So, have Telerik completely re-implemented the TimeZoneInfo class of .NET 3.5 so it can be used in .NET 2.0?  

Is this class as accurate as the one in .NET 3.5?  I would just like a bit more information about it.

Regards,
Eddie
Ivan Todorov
Telerik team
 answered on 28 Jun 2011
1 answer
62 views
Hi,
i am missing the Telerik.WinControls.Docking.DLL in the current version of the winforms controls suite. Is this control obsolete? What must I do to fix the problem?
Kind regards
Christian
Nikolay
Telerik team
 answered on 27 Jun 2011
7 answers
567 views
Hello guys,

I am having a problem with the shortcut control. I want to assign a shortcut key for a radbutton within a radform
so i added a radbutton and a shortcut control in the radform. 

In the shortcut control i add input bindings for the radbutton
-  Chord       == CTRL+N
-  Command == ActionCommand
-  Context     == radbutton1

so its suppose to fire the click event for the radbutton. but sadly im not getting any response.

So i tried another control which is the radtextbox doing all the same procedure as i did for the radbutton. the only difference is the
input binding command == FocusCommand. Surprisingly when i press the shortcut for focus which is (CTRL+F) the textbox was focused successfully?

Am i missing something? What are the possible solutions/workaround for this problem. i attached the source code.

BTW i am using Winforms Q3 2009


Here is my source code

    public partial class SPRadButton : Telerik.WinControls.UI.RadForm 
    { 
        public SPRadButton() 
        { 
            InitializeComponent(); 
        } 
 
        private void radButton1_Click(object sender, EventArgs e) 
        { 
            RadMessageBox.Show("success"); 
        } 
    } 


    partial class SPRadButton 
    { 
        /// <summary> 
        /// Required designer variable. 
        /// </summary> 
        private System.ComponentModel.IContainer components = null
 
        /// <summary> 
        /// Clean up any resources being used. 
        /// </summary> 
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 
        protected override void Dispose(bool disposing) 
        { 
            if (disposing && (components != null)) 
            { 
                components.Dispose(); 
            } 
            base.Dispose(disposing); 
        } 
 
        #region Windows Form Designer generated code 
 
        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor. 
        /// </summary> 
        private void InitializeComponent() 
        { 
            this.components = new System.ComponentModel.Container(); 
            Telerik.WinControls.Keyboard.InputBinding inputBinding1 = new Telerik.WinControls.Keyboard.InputBinding(); 
            Telerik.WinControls.Keyboard.Chord chord1 = new Telerik.WinControls.Keyboard.Chord(); 
            Telerik.WinControls.Keyboard.ChordModifier chordModifier1 = new Telerik.WinControls.Keyboard.ChordModifier(); 
            Telerik.WinControls.Elements.ClickCommand clickCommand1 = new Telerik.WinControls.Elements.ClickCommand(); 
            Telerik.WinControls.Keyboard.InputBinding inputBinding2 = new Telerik.WinControls.Keyboard.InputBinding(); 
            Telerik.WinControls.Keyboard.Chord chord2 = new Telerik.WinControls.Keyboard.Chord(); 
            Telerik.WinControls.Keyboard.ChordModifier chordModifier2 = new Telerik.WinControls.Keyboard.ChordModifier(); 
            Telerik.WinControls.Elements.FocusCommand focusCommand1 = new Telerik.WinControls.Elements.FocusCommand(); 
            Telerik.WinControls.Keyboard.InputBinding inputBinding3 = new Telerik.WinControls.Keyboard.InputBinding(); 
            Telerik.WinControls.Keyboard.Chord chord3 = new Telerik.WinControls.Keyboard.Chord(); 
            Telerik.WinControls.Keyboard.ChordModifier chordModifier3 = new Telerik.WinControls.Keyboard.ChordModifier(); 
            Telerik.WinControls.Elements.ClickCommand clickCommand2 = new Telerik.WinControls.Elements.ClickCommand(); 
            this.radButton1 = new Telerik.WinControls.UI.RadButton(); 
            this.radTextBox1 = new Telerik.WinControls.UI.RadTextBox(); 
            this.shortcuts1 = new Telerik.WinControls.Keyboard.Shortcuts(this.components); 
            ((System.ComponentModel.ISupportInitialize)(this.radButton1)).BeginInit(); 
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).BeginInit(); 
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); 
            this.SuspendLayout(); 
            //  
            // radButton1 
            //  
            chordModifier1.AltModifier = false
            chordModifier1.ControlModifier = true
            chordModifier1.ShiftModifier = false
            chord1.ChordModifier = chordModifier1
            chord1.Keys = "Ctrl+N"
            inputBinding1.Chord = chord1
            clickCommand1.ContextType = null
            clickCommand1.ImageList = null
            clickCommand1.Name = "ActionCommand"
            clickCommand1.OwnerType = typeof(Telerik.WinControls.RadItem); 
            clickCommand1.Text = "This command rises the Click event of a selected RadItem instance."
            clickCommand1.Type = ""
            inputBinding1.Command = clickCommand1
            inputBinding1.CommandContext = this.radButton1; 
            this.radButton1.CommandBindings.AddRange(new Telerik.WinControls.Keyboard.InputBinding[] { 
            inputBinding1}); 
            this.radButton1.Location = new System.Drawing.Point(30, 23); 
            this.radButton1.Name = "radButton1"
            this.radButton1.Size = new System.Drawing.Size(237, 23); 
            this.radButton1.TabIndex = 0
            this.radButton1.Text = "CTRL+N"
            this.radButton1.Click += new System.EventHandler(this.radButton1_Click); 
            //  
            // radTextBox1 
            //  
            this.radTextBox1.Location = new System.Drawing.Point(30, 52); 
            this.radTextBox1.Name = "radTextBox1"
            this.radTextBox1.NullText = "Press CTRL+F to focus"
            this.radTextBox1.Size = new System.Drawing.Size(237, 20); 
            this.radTextBox1.TabIndex = 1; 
            //  
            // shortcuts1 
            //  
            chordModifier2.AltModifier = false
            chordModifier2.ControlModifier = true
            chordModifier2.ShiftModifier = false
            chord2.ChordModifier = chordModifier2
            chord2.Keys = "Ctrl+F"
            inputBinding2.Chord = chord2
            focusCommand1.ContextType = null
            focusCommand1.ImageList = null
            focusCommand1.Name = "FocusCommand"
            focusCommand1.OwnerType = typeof(Telerik.WinControls.RadItem); 
            focusCommand1.Text = "This command gives the focus to a selected RadItem instance."
            focusCommand1.Type = ""
            inputBinding2.Command = focusCommand1
            inputBinding2.CommandContext = this.radTextBox1; 
            chordModifier3.AltModifier = false
            chordModifier3.ControlModifier = true
            chordModifier3.ShiftModifier = false
            chord3.ChordModifier = chordModifier3
            chord3.Keys = "Ctrl+N"
            inputBinding3.Chord = chord3
            clickCommand2.ContextType = null
            clickCommand2.ImageList = null
            clickCommand2.Name = "ActionCommand"
            clickCommand2.OwnerType = typeof(Telerik.WinControls.RadItem); 
            clickCommand2.Text = "This command rises the Click event of a selected RadItem instance."
            clickCommand2.Type = ""
            inputBinding3.Command = clickCommand2
            inputBinding3.CommandContext = this.radButton1; 
            this.shortcuts1.InputBindings.AddRange(new Telerik.WinControls.Keyboard.InputBinding[] { 
            inputBinding2, 
            inputBinding3}); 
            thisthis.shortcuts1.Owner = this; 
            //  
            // SPRadButton 
            //  
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 
            this.ClientSize = new System.Drawing.Size(293, 88); 
            this.Controls.Add(this.radTextBox1); 
            this.Controls.Add(this.radButton1); 
            this.Name = "SPRadButton"
            //  
            //  
            //  
            this.RootElement.ApplyShapeToControl = true
            this.Text = "RadForm1"
            this.ThemeName = "ControlDefault"
            ((System.ComponentModel.ISupportInitialize)(this.radButton1)).EndInit(); 
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).EndInit(); 
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); 
            this.ResumeLayout(false); 
            this.PerformLayout(); 
 
        } 
 
        #endregion 
 
        private Telerik.WinControls.UI.RadButton radButton1; 
        private Telerik.WinControls.Keyboard.Shortcuts shortcuts1; 
        private Telerik.WinControls.UI.RadTextBox radTextBox1; 
    } 



Thanks in advance

Nikolay
Telerik team
 answered on 27 Jun 2011
8 answers
187 views
How can I ensure that a Form that has been docked to an MDIForm doesn't get docked a 2nd time?  That is, I need a Form to only be visible once.  I tried making it a singleton class, but calling the DockControl of the RadDock still added a same form , though one was an empty shell.
Julian Benkov
Telerik team
 answered on 27 Jun 2011
2 answers
99 views
Hi,
I have an unbound radgridview and i am trying to add some on-demand (unbound) hierarchical child/grid to it. It seems i have to "load data in the grid" twice to see data. The first time around, i get to see the columns in the master grid but no data. When i "load data in grid" again, i then get the data.

It seems that when the Master Gird is bound and then i create the on-demand child grid, i can see the data. I must be missing some step in the unbound mode and cannot figure out what. Please could you help?

My code (VS2008) is shown below. The issue is i have to click the Button1 twice to get data .
Thanks
Don

Imports Telerik.WinControls.UI
 
Public Class Form1
 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
 
        'clear all data (since we have to click twice to see the data)
        gridReview.Columns.Clear()
        gridReview.Rows.Clear()
 
        'set up columns
        gridReview.Columns.Add(New GridViewTextBoxColumn("ID"))
        gridReview.Columns.Add(New GridViewTextBoxColumn("Employee"))
        gridReview.Columns.Add(New GridViewTextBoxColumn("Code"))
        gridReview.Columns.Add(New GridViewTextBoxColumn("Total Hours"))
        gridReview.Columns.Add(New GridViewCheckBoxColumn("Review"))
 
 
        'setup some grid proerties
        gridReview.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill
        gridReview.AllowAddNewRow = False
        gridReview.AllowDeleteRow = False
        gridReview.ShowGroupPanel = False
        gridReview.Columns(0).ReadOnly = True
        gridReview.Columns(1).ReadOnly = True
        gridReview.Columns(2).ReadOnly = True
 
        'load sample data
        gridReview.Rows.Add(1111, "John Smith", 423, 40.2, False)
        gridReview.Rows.Add(2222, "Jane Doe", 421, 10.2, False)
        gridReview.Rows.Add(3333, "Larry Smith", 423, 23.5, False)
        gridReview.Rows.Add(4444, "Lori Smith", 425, 26.1, False)
 
 
 
 
        'create the hierarchical grid
 
        Dim template As New GridViewTemplate()
        'setup hierarchical grid columns
        Dim id As New GridViewTextBoxColumn("ID")
        Dim shiftdate As New GridViewTextBoxColumn("DisplayDate")
        Dim in1 As New GridViewTextBoxColumn("In1")
        Dim out1 As New GridViewTextBoxColumn("Out1")
        Dim hours As New GridViewTextBoxColumn("Hours")
 
        'setup some hierarchical grid properties
        template.Columns.AddRange(id, shiftdate, in1, out1, hours)
        template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill
        template.AllowAddNewRow = False
        template.AllowDeleteRow = False
        template.AllowEditRow = False
 
        gridReview.Templates.Add(template)
        template.HierarchyDataProvider = New GridViewEventDataProvider(template)
        'not specified relation as its on-demand.
        'code will be put in gridReview_RowSourceNeeded
 
 
 
    End Sub
 
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        AddHandler gridReview.RowSourceNeeded, AddressOf gridReview_RowSourceNeeded
 
    End Sub
 
    Private Sub gridReview_RowSourceNeeded(ByVal sender As Object, ByVal e As GridViewRowSourceNeededEventArgs)
        MessageBox.Show("Show some data")
 
 
    End Sub
 
 
End Class
Alexander
Telerik team
 answered on 27 Jun 2011
1 answer
160 views
Hey at Telerik

I subscibe to the event below and would like to show in the GridExpanderItem next to the plussign/minussign the number of child elements that exists in child GridViewTemplate.

All i can do is change the SignStyle, but there is no option for adding text.
I have tried to change the Text property, the size property and setting DrawTet to true, but with no luck.

Is there any way to add the text for instance "17" next to the plussign in GridExpanderItem ?

Perhaps it should be a setting that the number of child elements is shown near the expander.

I hope you can help me it's very important that the number is shown here to help people save time from expanding the element.

The tooltip just doesn't get the job done.

Sincerly Jan


private

 

void rgvEjendomme_ViewCellFormatting(object sender, CellFormattingEventArgs e)

 

{

 

GridGroupExpanderCellElement cell = e.CellElement as GridGroupExpanderCellElement;

 

 

if (cell != null && e.CellElement.RowElement is GridDataRowElement)

 

{

 

cell.Expander.Visibility = Telerik.WinControls.ElementVisibility.Visible;

cell.Expander.ToolTipText =
"Matrikler: " + ((Ejendom)e.Row.DataBoundItem).Matrikler.Count.ToString();

 

}

 

if (e.CellElement is GridDetailViewCellElement && e.CellElement.Children.Count != 0)

 

{

 

var pageView = e.CellElement.Children[0] as RadPageViewStripElement;

 

 

if (pageView == null)

 

{

 

return;

 

}

}

}

Svett
Telerik team
 answered on 27 Jun 2011
2 answers
234 views
Hi,

I'm using Winform Q1 2011 SP1 and VS2008.
While trying RadTreeView.SaveXML(@"TreeView.xml") , I noticed that information such as forecolor, strikeout fontstyle ...for each individual node is not saved in the XML document.
When using RadTreeView.LoadXML(@"TreeView.xml")), and while information such as CheckState="On" is in the XML document next to some nodes, the RadTreeView is loaded without any of the node's checkboxes being 'checked (they're all left unchecked).
Also and if I add manually Forecolor="Green" in the TreeView.xml document next to some nodes, the LoadXML method will assign correctly the color green to some nodes.

As I plan to let the user decide of the data to be added in the RadTreeView, it sounded like a promising feature, so is there anyway to correct the above (get checkboxes checked or unchecked, forecolor...)? 
SaveXML allows for some extra types to be saved. What are they? Any documentation on this?

The help file mentions also that 'For direct access to the tree view XML as text use the TreeViewXML property.'. How is this implemented concretely?

Best regards,
Alain Cavenaile

Alain
Top achievements
Rank 1
 answered on 25 Jun 2011
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?