Telerik Forums
UI for WinForms Forum
1 answer
125 views
Hi,

The contents of the panelBar in ExplorerBarStyle do not resize, if a scrollbar is visible. The vertical scrollbar stays at the current location until one of the contained groups is collapsed or expanded.

Steps to reproduce the problem:

1. Create a new form and add a Panelbar with DockStyle.Fill and set the GroupStyle to ExplorerBarStyle
2. Add a few groups to the Panelbar and set the EnableHostControlMode to true
3. Make sure the CanScroll Property of the Panelbar ist set to true
4. Start the Application
5. Resize the window so that the vertical scrollbar is displayed
6. Drag the right border of the window and resize it (now the scrollbars should be at the location they were before the resizing)
7. Click one of the groups to place the scrollbars in the correct location

Is this behaviour a bug or am I missing something really simple? What do I have to do to always place the Scrollbars at the right border of the window?

My System:
  • OS: Windows 7 64bit
  • Framework: Version 2 0

Edit: Sorry, wrong forum. I've posted it in the Panelbar forum.
Nikolay
Telerik team
 answered on 15 Feb 2010
1 answer
105 views
Hi,

The contents of the panelBar in ExplorerBarStyle do not resize, if a scrollbar is visible. The vertical scrollbar stays at the current location until one of the contained groups is collapsed or expanded.

Steps to reproduce the problem:

1. Create a new form and add a Panelbar with DockStyle.Fill and set the GroupStyle to ExplorerBarStyle
2. Add a few groups to the Panelbar and set the EnableHostControlMode to true
3. Make sure the CanScroll Property of the Panelbar ist set to true
4. Start the Application
5. Resize the window so that the vertical scrollbar is displayed
6. Drag the right border of the window and resize it (now the scrollbars should be at the location they were before the resizing)
7. Click one of the groups to place the scrollbars in the correct location

Is this behaviour a bug or am I missing something really simple? What do I have to do to always place the Scrollbars at the right border of the window?

My System:
  • OS: Windows 7 64bit
  • Framework: Version 2 0
  • Telerik RADControls for WinForms: Q3 2009 SP1 (2009.3.9.1203)
Uwe Honermann
Top achievements
Rank 1
 answered on 15 Feb 2010
8 answers
442 views
Hello Telerik team.

NOTE: this issue appies to  RadCheckBox (and derived/related) in general.

I've noticed that when using a RadCheckBox in either a winform or a as RadCheckBoxkElement (as custom cell edit control in a grid cell) it shows a checkmark when it is set the value Indeterminate.

This occurs as well as for invokation by the user as well as programatically.

MS's checkbox has a nice square to indicate that the value of the checkbox is indeterminate. So Telerik showing a checkmark for both checked and indeterminate is quite confusing to a user.

On a usercontrol / winform the workaround is simple: Just use the MS checkbox instead.
However, as a RadCheckBoxElement in a gridview, there is no workaround for this....??????:


Please let me know how I can use the RadCheckBoxElement in the radgridview cell and see the differnce between Checked, Unchecked and Indeterminate visually.

Kind regards,

Jack
Nikolay
Telerik team
 answered on 15 Feb 2010
1 answer
225 views
Hi Experts,
I want a solution regarding telerik gridview.

I have one Master Grid and one Child Grid view. And i Want a Conditional Column Merging in Child Grid View Template according to the value in one cell.

I have Attached two screen shots for it. 1 Named "Current - Output" is Current Output and 2nd one named "Expected - Output" is Expected  Output.
Waiting for the Positive Response.

Thank You,
Jignesh Patel.
Jack
Telerik team
 answered on 15 Feb 2010
2 answers
278 views

I have control inherited from RadTreeView.

In my constructor i have set

 

AllowDragDrop =

true;

 

void

 

TreeView_ItemDrag(object sender, RadTreeViewEventArgs e)

 

{

 

   //Does nothing

 

}

 

void

 

TreeView_DragEnter(object sender, DragEventArgs e)

 

{

e.Effect =

DragDropEffects.Move;

 

}

 

void

 

TreeView_DragDrop(object sender, DragEventArgs e)
{
  //My business logic....
}

TreeView_DragDrop even is never get executed when i drop a RadTreeNode before/after another RadTreeNode in the view.

Please help...

 

Victor
Telerik team
 answered on 15 Feb 2010
1 answer
145 views
Hi..
     I have RadGridView that takes input from user on runtime. when user clicks new row, instead of completing the first, he must be restrained to enter in new row, I am able to prompt the user to complete the input in first row, but second row is created on clicking on it. I have used Janus Grid before, it has event 'e.cancel = true' option in RowsAdded event. but no such thing in RadGridView. Any solution to restrain empty rows being entered by user..Please Help...?????
Nick
Telerik team
 answered on 15 Feb 2010
3 answers
118 views
What is the control used for the left hand menu in the Run Demo main application?
Nick
Telerik team
 answered on 15 Feb 2010
2 answers
201 views

I have created a control derived from Telerik.WinControls.UI.RadTreeView (Latest trial version)

I am also creating the RadTreeNode on fly..

I am setting below properties at runtime.

groupTreeView.AllowArbitaryItemHeight =

true;

 

 

 groupTreeView.AllowPlusMinusAnimation = 

true;

 

 

 groupTreeView.DropFeedbackColor = 

Color.Black;

 

 

 groupTreeView.Enabled = 

true;

 

 

 groupTreeView.ExpandAnimation =

ExpandAnimation.Opacity;

 

 

 groupTreeView.Focusable =

true;

 

 

 

groupTreeView.PlusMinusAnimationStep = 10;

 

groupTreeView.ShowExpandCollapse =

true;

 

 

 groupTreeView.ToggleMode =

ToggleMode.SingleClick;

 

 

 groupTreeView.UseNewLayoutSystem =

true;

but this does not show me the Expand(+) and collapse(-) sign.


Note my TreeViewXML..
<?xml version="1.0" encoding="utf-16"?>
<TreeView xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" UseDefaultSelection="true" AllowDragDrop="true" AllowPlusMinusAnimation="true" ThemeName="Office2007Black" AllowDrop="true" BackColor="Window" DropFeedbackColor="Red" LineColor="ActiveCaption">
</TreeView>
Please help..

 

 

 

 

Raj Sharma
Top achievements
Rank 1
 answered on 12 Feb 2010
1 answer
134 views
Hi

I use RadControls for WinForms Q3 2009 SP1.

In order to add a node to an existing node I need to know what the last selected node was, and SelectedNodeChanged works perfectly for this.

The problem is when I want to add a node to the root of the TreeView, I click on the TreeView itself (not on a node) and SelectedNodeChanged is *not* fired with RadTreeViewEventArgs.Node = null.  Any idea how I can get around this?

Thanks
Ralph
Victor
Telerik team
 answered on 12 Feb 2010
1 answer
146 views
If you compile and run the following snippet, and then follow the steps below;
1. Click add new row (row is defaulted with values);
2. Change the value in the Status column to 4, then hit enter;
The display value for row 5 has been updated with the same values for status and review date.  However the underlying datasource is correctly updated.  The display is different to the underlying object.
This took a while to fathom out (Ive been working with legacy code implementing new features using the Telerik controls).  The problem occurs with the fact that in our ancestor class Equals has been overriden.  In the concrete classes a field called SqlKeyString is overriden and this provides a "key" for the objects to do an equality test.
It therefore looks like the RadGridView is using "Equals" rather than "==", my question is therefore should the RadGridView really be using "==" rather than "Equals"?
My 2nd issue with the gridview, is when adding a new row the CellFormatting doesnt apply to the new row.  When you click a new row in this example a date with value DateTime.MinValue should be displayed as an string.Empty, however the actual value is displayed.
Thanks for your attention,
Dave
using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Linq; 
using System.Text; 
using System.Windows.Forms; 
using Telerik.WinControls.UI; 
 
namespace TelerikDataGridView 
    #region Form 
    public class Form1 : Form 
    { 
        public Form1() 
        { 
            InitializeComponent(); 
        } 
        /// <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.radGridView1 = new Telerik.WinControls.UI.RadGridView(); 
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).BeginInit(); 
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterGridViewTemplate)).BeginInit(); 
            this.SuspendLayout(); 
            //  
            // radGridView1 
            //  
            this.radGridView1.Dock = System.Windows.Forms.DockStyle.Fill; 
            this.radGridView1.Location = new System.Drawing.Point(0, 0); 
            this.radGridView1.Name = "radGridView1"
            this.radGridView1.Size = new System.Drawing.Size(905, 285); 
            this.radGridView1.TabIndex = 0; 
            //  
            // Form3 
            //  
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 
            this.ClientSize = new System.Drawing.Size(905, 285); 
            this.Controls.Add(this.radGridView1); 
            this.Name = "Form3"
            this.Text = "Form3"
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterGridViewTemplate)).EndInit(); 
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit(); 
            this.ResumeLayout(false); 
 
        } 
        #endregion 
 
        private Telerik.WinControls.UI.RadGridView radGridView1; 
        protected override void OnLoad(EventArgs e) 
        { 
            base.OnLoad(e); 
            CreateGrid(); 
        } 
        private void CreateGrid() 
        { 
            BindingSource source = new BindingSource(); 
            source.AllowNew = true
            source.AddingNew += new AddingNewEventHandler(source_AddingNew); 
 
            source.DataSource = new MyCollection(); 
            this.radGridView1.MasterGridViewTemplate.AutoGenerateColumns = false
            this.radGridView1.CellFormatting += new CellFormattingEventHandler(radGridView1_CellFormatting); 
            radGridView1.DataSource = source; 
 
            AddTextColumn("FundManagerId""Fund Manager"); 
            AddTextColumn("AssetClassId""Asset Class"); 
            AddTextColumn("ClientOrgId""Client"); 
            AddTextColumn("Status""Status"); 
            AddDateColumn("ReviewDate""Review Date"true); 
 
            radGridView1.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;             
        } 
 
        void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) 
        { 
            if (e.CellElement is GridDateTimeCellElement) 
            { 
                GridDateTimeCellElement cell = e.CellElement as GridDateTimeCellElement; 
                if (cell.IsEditMode) 
                    return
 
                if (((DateTime)cell.Value).Equals(DateTime.MinValue)) 
                    cell.Text = string.Empty; 
                else 
                    cell.Text = string.Format("{0:dd/MM/yyyy}", (DateTime)cell.Value); 
            }  
        } 
        int assetClass = 5; 
        void source_AddingNew(object sender, AddingNewEventArgs e) 
        { 
            e.NewObject = new MyClass(12, 5, assetClass++, 2, DateTime.MinValue); 
        } 
 
        private void AddTextColumn(string field, string header) 
        { 
            AddTextColumn(field, header, false); 
        } 
        private void AddTextColumn(string field, string header, bool readOnly) 
        { 
            GridViewTextBoxColumn column = new GridViewTextBoxColumn(field); 
            column.HeaderText = header; 
            column.ReadOnly = readOnly; 
            radGridView1.MasterGridViewTemplate.Columns.Add(column); 
        } 
        private void AddDateColumn(string field, string header) 
        { 
            AddDateColumn(field, header, false); 
        } 
        private void AddDateColumn(string field, string header, bool readOnly) 
        { 
            GridViewDateTimeColumn dateColumn = new GridViewDateTimeColumn(); 
            dateColumn.BestFit(); 
            dateColumn.FieldName = field; 
            dateColumn.FormatString = "{0:dd/MM/yyyy}"
            dateColumn.HeaderText = header; 
            dateColumn.ReadOnly = readOnly; 
            dateColumn.TextAlignment = ContentAlignment.MiddleCenter; 
            radGridView1.MasterGridViewTemplate.Columns.Add(dateColumn); 
        } 
    } 
    #endregion 
    #region DataSources 
    public class MyClass : InvestmentObject 
    { 
        public MyClass(int client, int fundManager, int assetClass, int status, DateTime statusDate) 
        { 
            FundManagerId = fundManager; 
            AssetClassId = assetClass; 
            ClientOrgId = client; 
            ReviewDate = statusDate; 
            Status = status; 
        } 
        public MyClass(int client, int fundManager, int assetClass) 
            : this(client, fundManager, assetClass, 1, DateTime.Now) 
        { 
 
        } 
        private int _fundManagerId; 
        public int FundManagerId 
        { 
            get { return _fundManagerId; } 
            set 
            { 
                _fundManagerId = value; 
                OnPropertyChanged("FundManagerId"); 
            } 
        } 
 
        private int _assetClassId; 
        public int AssetClassId 
        { 
            get { return _assetClassId; } 
            set 
            { 
                _assetClassId = value; 
                OnPropertyChanged("AssetClassId"); 
            } 
        } 
 
        private int _clientOrgId; 
        public int ClientOrgId 
        { 
            get { return _clientOrgId; } 
            set 
            { 
                _clientOrgId = value; 
                OnPropertyChanged("ClientOrgId"); 
            } 
        } 
 
        private int _status; 
        public int Status 
        { 
            get { return _status; } 
            set 
            { 
                _status = value; 
                OnPropertyChanged("Status"); 
            } 
        } 
 
        private DateTime _reviewDate; 
        public DateTime ReviewDate 
        { 
            get { return _reviewDate; } 
            set 
            { 
                _reviewDate = value; 
                OnPropertyChanged("ReviewDate"); 
            } 
        } 
 
        public override string SqlKeyString 
        { 
            get 
            { 
                return string.Format("FundManagerId={0} and AssetClassId={1} and ClientOrgId={2}" 
                  , FundManagerId, AssetClassId, ClientOrgId); 
            } 
        } 
    } 
 
    public class MyCollection : DataList<MyClass> 
    { 
        public MyCollection() 
        { 
            Add(new MyClass(12, 5, 1)); 
            Add(new MyClass(12, 5, 2)); 
            Add(new MyClass(12, 5, 3)); 
            Add(new MyClass(12, 5, 4)); 
            Add(new MyClass(12, 5, 5)); 
        } 
    } 
    #endregion 
    #region Supporting Data Objects 
    public abstract class DataList<T> : BindingList<T> 
    { 
        public void Sort(Comparison<T> comparer) 
        { 
            ((List<T>)this.Items).Sort(comparer); 
        } 
        public void Sort(IComparer<T> comparer) 
        { 
            ((List<T>)this.Items).Sort(comparer); 
        } 
    } 
    public abstract class InvestmentObject : INotifyPropertyChanged 
    { 
        #region Private Fields 
 
        private DateTime lastModified; 
        private Guid guid; 
        #endregion 
        #region Constructors 
 
        protected InvestmentObject() 
            : base() 
        { 
            lastModified = DateTime.Now; 
            guid = Guid.NewGuid(); 
        } 
        #endregion 
        #region Data Properties 
 
        public DateTime LastModified 
        { 
            get { return lastModified; } 
            protected set { lastModified = value; } 
        } 
 
        public Guid CurrentGUID 
        { 
            get { return guid; } 
            protected set { guid = value; } 
        } 
        #endregion 
 
        public override bool Equals(object obj) 
        { 
            if ((obj != null) && (obj.GetType() == this.GetType())) 
            { 
                InvestmentObject dataAccessObject = obj as InvestmentObject; 
 
                return (dataAccessObject.SqlKeyString == this.SqlKeyString); 
            } 
            else return false
        } 
        public override int GetHashCode() 
        { 
            return (this.GetType().ToString() + SqlKeyString).GetHashCode(); 
        } 
        #region Abstract 
        public abstract string SqlKeyString { get; } 
        #endregion 
        #region INotifyPropertyChanged Members 
 
        public event PropertyChangedEventHandler PropertyChanged; 
 
        protected virtual void OnPropertyChanged(string field) 
        { 
            if (PropertyChanged != null
                PropertyChanged(thisnew PropertyChangedEventArgs(field)); 
        } 
        #endregion 
    } 
    #endregion 
 
Martin Vasilev
Telerik team
 answered on 12 Feb 2010
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
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
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?