Telerik Forums
UI for WinForms Forum
1 answer
148 views

I have a column defined in my gridview.  It's name is "Energy".

I use the following code to bind my object to it.  The object is a generic List<> of other objects.

 

 

((

 

GridViewComboBoxColumn)m_grd.Columns["Energy"]).DataSource = m_snc.Configuration.CurrentRadiationDevice.Energies;

 

 

 

 


The binding seems to work fine as far as display is concerned.  Each "Energy" object has a ToString() override which allows me to see what I want in cases where I bind it to drop down's (like in this case).  The combo box is filled with the appropriate display values; however when I select an item from the combo box and check to see the value's type, it is always a System.String instead of the object type of the item that is selected.  In this case the expected behavior of the following method would be my custom object's type instead of System.String.

 

 

row.Cells["Energy"].Value.GetType()

Alexander
Telerik team
 answered on 22 Apr 2011
1 answer
113 views
Using the RadControls for WinForms Dock Visual Studio IDE example program simply do the following:
Drag the RadButton Toolbox onto the Document panel.

The Toolbox is now shown as a Document and it is not possible to drag it back to where it was before the move.

Found the answer myself:

The context menu (right click on the tab) contains more entries than the normal document windows one of which is "Floating".
Selecting this function returns it back into a Toolbox window.
Nikolay
Telerik team
 answered on 22 Apr 2011
6 answers
247 views

Hi,

The new BackStageView of PageView control is awesome. But the Office2007Black theme doesn't work on it !

My question is how can we reduce the width of the left pane (where the buttons for each page is listed) ?

Thanks

Akhil
Top achievements
Rank 1
 answered on 21 Apr 2011
1 answer
128 views
Hi,
         I have a Ribbion bar in that i have i RadGallery  now in that i need to add some colors and on selecting a particular color the whole application shld change to that color.


Thanks
Divya
Nikolay
Telerik team
 answered on 21 Apr 2011
3 answers
148 views
I am looking to extend the grid so it behaves like one the web control counterparts for presenting details in a form like manner.  I want to customize the grid so adding/editing a row can be done inline using the details view real estate. An example of the desired layout can be found looking at telerik asp example: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx . Does anyone have an example that accomplishes  this?
Nikolay
Telerik team
 answered on 21 Apr 2011
1 answer
194 views
Hi,
           I have 10 checkboxes in my comobox if i check the first checkbox then all other remaining 9 checkboxes sld get checked by themselves and when i uncheck then all 9 shld uncheck .How can i do this,can anyone explain me


Thanks
Divya
Richard Slade
Top achievements
Rank 2
 answered on 21 Apr 2011
1 answer
253 views
hi I'm trying to add  a summary row but it's not showing, through the builder in properties or code as per the documentation:  Here is the code:

Dim summaryItem As New GridViewSummaryItem()
summaryItem.Name = "Quantity"
summaryItem.Aggregate = GridAggregateFunction.Sum

Dim summaryRowItem As New GridViewSummaryRowItem()
summaryRowItem.Add(summaryItem)

Me.RadGridView1.SummaryRowsTop.Add(summaryRowItem)
Me.RadGridView1.SummaryRowsBottom.Add(summaryRowItem)


Thanks for any help
Alexander
Telerik team
 answered on 21 Apr 2011
1 answer
147 views
Hello!

I found a couple of problems with sorting in the latest WinForms RadGridView (2011.1.11.315). I use Visual Studio 2008 with .NET 3.5. 

I have created a single form with a RadGridView.

Form1.cs
using System.Collections.Generic;
using System.Windows.Forms;
  
namespace Test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
  
            List<DataItem> list = new List<DataItem>();
            list.Add(new DataItem() { Name = "Item 1" });
            list.Add(new DataItem() { Name = "Item 3" });
            list.Add(new DataItem() { Name = "Item 2" });
  
            radGridView1.DataSource = list;
        }
    }
  
    public class DataItem
    {
        public string Name { get; set; }
    }
}

Form1.Designer.cs

namespace Test
{
    partial class Form1
    {
        /// <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()
        {
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn1 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
            Telerik.WinControls.Data.SortDescriptor sortDescriptor1 = new Telerik.WinControls.Data.SortDescriptor();
            this.radGridView1 = new Telerik.WinControls.UI.RadGridView();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterTemplate)).BeginInit();
            this.SuspendLayout();
            // 
            // radGridView1
            // 
            this.radGridView1.BackColor = System.Drawing.SystemColors.Control;
            this.radGridView1.Cursor = System.Windows.Forms.Cursors.Default;
            this.radGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.radGridView1.EnableCustomSorting = true;
            this.radGridView1.Font = new System.Drawing.Font("Segoe UI", 8.25F);
            this.radGridView1.ForeColor = System.Drawing.SystemColors.ControlText;
            this.radGridView1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.radGridView1.Location = new System.Drawing.Point(0, 0);
            // 
            // radGridView1
            // 
            gridViewTextBoxColumn1.FieldName = "Name";
            gridViewTextBoxColumn1.FormatString = "";
            gridViewTextBoxColumn1.HeaderText = "Name";
            gridViewTextBoxColumn1.Name = "Name";
            this.radGridView1.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] {
            gridViewTextBoxColumn1});
            sortDescriptor1.PropertyName = "Name";
            this.radGridView1.MasterTemplate.SortDescriptors.AddRange(new Telerik.WinControls.Data.SortDescriptor[] {
            sortDescriptor1});
            this.radGridView1.Name = "radGridView1";
            this.radGridView1.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.radGridView1.Size = new System.Drawing.Size(284, 264);
            this.radGridView1.TabIndex = 0;
            this.radGridView1.Text = "radGridView1";
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(284, 264);
            this.Controls.Add(this.radGridView1);
            this.Name = "Form1";
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterTemplate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit();
            this.ResumeLayout(false);
        }
        #endregion
  
        private Telerik.WinControls.UI.RadGridView radGridView1;
    }
}

The grid sorting is set in the Property Builder. But when line

((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit();

is executed, the SortDescriptors collection is cleared and the grid becomes unsortable. This worked well in v.2010.3.10.1215.

Another problem concerns the custom sorting. I found that the CustomSorting handler is not called if the SortDescriptors collection is empty. I think this is not correct behavior, because the custom sorting logic is coded explitly and it should not depend on the grid sort descriptiors. If we note the first problem listed above, the CustomSorting handler is not called until the SortDescriptors collection is explicitly populated with the application code, or the column header is clicked by user.

Thank you.

Alexander
Telerik team
 answered on 21 Apr 2011
3 answers
190 views
In standard DataGridView i can get items value by this code : Ivalue = DataGridView1.Item(i, j).Value .
Please help me how to i do this by RadGridView.
Thank you.
Richard Slade
Top achievements
Rank 2
 answered on 20 Apr 2011
1 answer
143 views
Good Evening

I am using the 2010 Q3 controls and i have created some buttons within a Vertical Button Group.  However the controls that i have had on there and assigned code to and everything have suddenly vanished and keetp vanishing even when i recreate them however i have to create them with a different name.

They are in the designed code:
Me.btnSetVATFigure = New Telerik.WinControls.UI.RadLabelElement
and 
'
        'RadRibbonBarButtonGroup4
        '
        Me.RadRibbonBarButtonGroup4.Items.AddRange(New Telerik.WinControls.RadItem() {Me.RadButtonElement18,   Me.btnRemoveProject, Me.RadButtonElement17, Me.btnPricingRemoveProject, Me.btnPricingEditPrices, Me.RadButtonElement20, Me.btnSetVATFigure})
        Me.RadRibbonBarButtonGroup4.Name = "RadRibbonBarButtonGroup4"
        Me.RadRibbonBarButtonGroup4.Orientation = System.Windows.Forms.Orientation.Vertical
        Me.RadRibbonBarButtonGroup4.Text = "RadRibbonBarButtonGroup4"
note end of the first line me.btnSetVATFigure

However as you can see from the attached screen shot the button is not visible on the form.

Can someone please explain this to me as its getting very annoying now as I'm sure you will appreciate.

Thank you in advance

Luke Frost
Peter
Telerik team
 answered on 20 Apr 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)
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?