Telerik Forums
UI for WinForms Forum
1 answer
175 views

Hi,

postgres supports arrays as column data. Is there a best practice to generically bind the grid to data tables that contain for example string[] columns?
If yes, is filtering and sorting supported by RadGridView without having to write custom code?
Currently I resorted to using array_to_string(column) in my SQL, but that leads to potentially very long / wide columns.

Regards
Erwin
Julian Benkov
Telerik team
 answered on 22 Apr 2011
4 answers
138 views
Hi all,

I have a GridView which works fine initially..   I use a command button to open an edit form and on closing it refreshes and rebind the datasource.  All the data refreshes correctly, but I lose the ability to scroll vertically using either the up/down arrows, clicking the bar itself, or using the mouse wheel. 

Clicking on the "bar" and dragging still scrolls, but that is the only way to scroll at that point.

Thanks,

Matt
Jack
Telerik team
 answered on 22 Apr 2011
1 answer
122 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
93 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
222 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
107 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
113 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
141 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
217 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
123 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
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?