Telerik Forums
UI for WinForms Forum
2 answers
316 views

Hello.

Please, could you give me an adwace how to use RadWaitingBarElement in RadGridView and run this element. I have try used it in cell_formating, but it do not work.

(it is trial Version: 2010.1 504 , C#, vs 2008 express)

Thank you for advice or source code.

void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)   
{   
if (e.CellElement.RowIndex < 0) return;   
if (((GridViewDataColumn)e.CellElement.ColumnInfo).FieldName == "test")   
{   
RadWaitingBarElement element = new RadWaitingBarElement();   
element.StretchHorizontally = true;   
element.StretchVertically = true;   
element.waitingTimer = this.timer1;//timer is running   
e.CellElement.Children.Add(element);   
}  
Tomas Novak
Top achievements
Rank 1
 answered on 05 Jun 2010
8 answers
891 views
Hi

I posted previously with no reply

I have a RadShapedForm having a custom background image set. The background image contains a gradient color theme (blue). How do I make the form have round corner? I can't find an option to set that. Putting the round corner in the background image together with setting TransparencyKey works in some cases, but it's hard to find a value for TransparencyKey that works all on machines as my gradient background color may be rendered differently on different machines.

Also, how do I make the RadShapedForm have shadows around the border, just like the standard .NET Windows forms?
mdanh
Top achievements
Rank 1
 answered on 05 Jun 2010
1 answer
158 views
Hi,

I am creating a CAB application using Telerik controls and the CAB enabling kit.  The modal dialogs are using standard Windows Forms (as opposed to a RadForm) as they are displayed using the Window Workspace from within CAB.  This provides an inconsistant look and feel as the Shell form uses the Telerik RadForm type.

I can't find a Telerik equivalent to the Window Workspace - is there one available as part of the CAB enabling kit or is it something I need to create myself?

Cheers
Steve
Victor
Telerik team
 answered on 04 Jun 2010
3 answers
220 views
Hello,

I am using the Office2007Black in a WinForms application.

On my Main form's Initialization I have put the following line:
ThemeResolutionService.ApplicationThemeName = "Office2007Black";

The problem is that for all the combo boxes, be it either a stand alone RadComboBox control or a GridViewComboBoxColumn inside a RadGridView, the background on the drop down list is dark gray (almost black) while the text is black, which makes it unreadable.

As far as I can tell, even though it seems off, this is the default theme behavior...

How would one fix this issue?

Thanks,
Cristi
Victor
Telerik team
 answered on 04 Jun 2010
1 answer
174 views
What is the point of the spy control? I can view the controls properties at design time, why do I need to see them at run time?
Deyan
Telerik team
 answered on 04 Jun 2010
3 answers
288 views
Greetings,

I have a custom object that I am using for databinding. I tried to post the sample as a zip file to repeat the problem I am seeing. Maybe I did my custom objects wrong, I really dont know. However, my problem is this, when binding to Hierarchy data if you select a row and expand the child data is shown, however if you select the next row and expand it, then the first child result loses its binding, and you have no data. I am considering purchasing your product for a project, and need your advice...is this a bug? or is my code incorrect? I have custom objects, and I am not using DataSets or DataTables...nor do I want to use those, so those examples really dont help.



Sample Code:

Form1.cs
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;

namespace TelerikWindowsTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private BusinessTestList _testItemList;

        private void Form1_Load(object sender, EventArgs e)
        {
            _testItemList = new BusinessTestList();

            BusinessTestItem item = new BusinessTestItem();
            item.Name = "Joe";
            item.SubItems.Add(new SubItem() { Count = 22, Date = DateTime.Now });
            item.SubItems.Add(new SubItem() { Count = 1, Date = DateTime.Now });
            item.SubItems.Add(new SubItem() { Count = 56, Date = DateTime.Now });
            item.SubItems.Add(new SubItem() { Count = 75, Date = DateTime.Now });
            item.SubItems.Add(new SubItem() { Count = 84, Date = DateTime.Now });
            _testItemList.Add(item);

            BusinessTestItem secondItem = new BusinessTestItem();
            secondItem.Name = "Jack";
            secondItem.SubItems.Add(new SubItem() { Count = 1, Date = DateTime.Now });
            secondItem.SubItems.Add(new SubItem() { Count = 2, Date = DateTime.Now });
            secondItem.SubItems.Add(new SubItem() { Count = 45, Date = DateTime.Now });
            secondItem.SubItems.Add(new SubItem() { Count = 67, Date = DateTime.Now });
            secondItem.SubItems.Add(new SubItem() { Count = 89, Date = DateTime.Now });
            _testItemList.Add(secondItem);

            radGridView1.DataSource = _testItemList;
            radGridView1.MasterGridViewTemplate.ChildGridViewTemplates[0].DataMember = "SubItems";
            radGridView1.MasterGridViewTemplate.ChildGridViewTemplates[0].DataSource = _testItemList;
        }

    }

    public class BusinessTestList : BindingList<BusinessTestItem>
    {

    }

    public class BusinessTestItem : INotifyPropertyChanged
    {
        public BusinessTestItem()
        {
            subItems = new SubItemList();

            subItems.ListChanged += new ListChangedEventHandler(subItems_ListChanged);
        }

        private string name = string.Empty;
        private SubItemList subItems;

        public SubItemList SubItems
        {
            get
            {
                return subItems;
            }
        }

        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                if (value != this.name)
                {
                    this.name = value;
                    OnPropertyChanged("Name");
                }
            }
        }

        public double Total
        {
            get
            {
                var value = this.SubItems.Sum(x => x.Count);
                return value;
            }
        }

        #region INotifyPropertyChanged Members

        public void OnPropertyChanged(string property)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        }

        public void subItems_ListChanged(object sender, ListChangedEventArgs e)
        {
            OnPropertyChanged("Total");
        }

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }

    public class SubItemList : BindingList<SubItem>
    {

    }

    public class SubItem : INotifyPropertyChanged
    {
        private double count = 0;
        private DateTime date = DateTime.Now;

        public double Count
        {
            get
            {
                return count;
            }
            set
            {
                if (value != this.count)
                {
                    this.count = value;
                    OnPropertyChanged("Count");
                }
            }
        }

        public DateTime Date
        {
            get
            {
                return this.date;
            }
            set
            {
                if (value != this.date)
                {
                    this.date = value;
                    OnPropertyChanged("Date");
                }
            }
        }

        #region INotifyPropertyChanged Members

        public void OnPropertyChanged(string property)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }

}

Form1.Designer.cs:

namespace TelerikWindowsTest
{
    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()
        {
            this.components = new System.ComponentModel.Container();
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn3 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
            Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn4 = new Telerik.WinControls.UI.GridViewTextBoxColumn();
            Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn4 = new Telerik.WinControls.UI.GridViewDecimalColumn();
            Telerik.WinControls.UI.GridViewRelation gridViewRelation2 = new Telerik.WinControls.UI.GridViewRelation();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn3 = new Telerik.WinControls.UI.GridViewDecimalColumn();
            Telerik.WinControls.UI.GridViewDateTimeColumn gridViewDateTimeColumn2 = new Telerik.WinControls.UI.GridViewDateTimeColumn();
            this.radGridView1 = new Telerik.WinControls.UI.RadGridView();
            this.miscellaneousTheme1 = new Telerik.WinControls.Themes.MiscellaneousTheme();
            this.buisnessTestListBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.gridViewTemplate1 = new Telerik.WinControls.UI.GridViewTemplate();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterGridViewTemplate)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.buisnessTestListBindingSource)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridViewTemplate1)).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.Font = new System.Drawing.Font("Microsoft Sans Serif", 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);
            //
            //
            //
            this.radGridView1.MasterGridViewTemplate.ChildGridViewTemplates.AddRange(new Telerik.WinControls.UI.GridViewTemplate[] {
            this.gridViewTemplate1});
            gridViewTextBoxColumn3.DataType = typeof(TelerikWindowsTest.SubItemList);
            gridViewTextBoxColumn3.FieldAlias = "SubItems";
            gridViewTextBoxColumn3.FieldName = "SubItems";
            gridViewTextBoxColumn3.HeaderText = "SubItems";
            gridViewTextBoxColumn3.IsAutoGenerated = true;
            gridViewTextBoxColumn3.IsVisible = false;
            gridViewTextBoxColumn3.ReadOnly = true;
            gridViewTextBoxColumn3.UniqueName = "SubItems";
            gridViewTextBoxColumn3.Width = 88;
            gridViewTextBoxColumn4.FieldAlias = "Name";
            gridViewTextBoxColumn4.FieldName = "Name";
            gridViewTextBoxColumn4.HeaderText = "Name";
            gridViewTextBoxColumn4.IsAutoGenerated = true;
            gridViewTextBoxColumn4.UniqueName = "Name";
            gridViewTextBoxColumn4.Width = 96;
            gridViewDecimalColumn4.DataType = typeof(double);
            gridViewDecimalColumn4.FieldAlias = "Total";
            gridViewDecimalColumn4.FieldName = "Total";
            gridViewDecimalColumn4.HeaderText = "Total";
            gridViewDecimalColumn4.IsAutoGenerated = true;
            gridViewDecimalColumn4.ReadOnly = true;
            gridViewDecimalColumn4.UniqueName = "Total";
            gridViewDecimalColumn4.Width = 115;
            this.radGridView1.MasterGridViewTemplate.Columns.Add(gridViewTextBoxColumn3);
            this.radGridView1.MasterGridViewTemplate.Columns.Add(gridViewTextBoxColumn4);
            this.radGridView1.MasterGridViewTemplate.Columns.Add(gridViewDecimalColumn4);
            this.radGridView1.MasterGridViewTemplate.DataSource = this.buisnessTestListBindingSource;
            this.radGridView1.Name = "radGridView1";
            gridViewRelation2.ChildColumnNames = ((System.Collections.Specialized.StringCollection)(resources.GetObject("gridViewRelation2.ChildColumnNames")));
            gridViewRelation2.ChildTemplate = this.gridViewTemplate1;
            gridViewRelation2.ParentColumnNames = ((System.Collections.Specialized.StringCollection)(resources.GetObject("gridViewRelation2.ParentColumnNames")));
            gridViewRelation2.ParentTemplate = this.radGridView1.MasterGridViewTemplate;
            gridViewRelation2.RelationName = "RelationShip";
            this.radGridView1.Relations.Add(gridViewRelation2);
            this.radGridView1.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.radGridView1.Size = new System.Drawing.Size(442, 273);
            this.radGridView1.TabIndex = 0;
            this.radGridView1.Text = "radGridViewPreview";
            this.radGridView1.ThemeName = "Office2007Blue";
            //
            // buisnessTestListBindingSource
            //
            this.buisnessTestListBindingSource.DataSource = typeof(TelerikWindowsTest.BusinessTestList);
            this.buisnessTestListBindingSource.Position = 2;
            //
            // gridViewTemplate1
            //
            gridViewDecimalColumn3.DataType = typeof(double);
            gridViewDecimalColumn3.FieldAlias = "Count";
            gridViewDecimalColumn3.FieldName = "Count";
            gridViewDecimalColumn3.HeaderText = "Count";
            gridViewDecimalColumn3.IsAutoGenerated = true;
            gridViewDecimalColumn3.UniqueName = "Count";
            gridViewDateTimeColumn2.DataType = typeof(System.DateTime);
            gridViewDateTimeColumn2.FieldAlias = "Date";
            gridViewDateTimeColumn2.FieldName = "Date";
            gridViewDateTimeColumn2.HeaderText = "Date";
            gridViewDateTimeColumn2.IsAutoGenerated = true;
            gridViewDateTimeColumn2.UniqueName = "Date";
            this.gridViewTemplate1.Columns.Add(gridViewDecimalColumn3);
            this.gridViewTemplate1.Columns.Add(gridViewDateTimeColumn2);
            this.gridViewTemplate1.DataMember = "SubItems";
            this.gridViewTemplate1.DataSource = this.buisnessTestListBindingSource;
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(442, 273);
            this.Controls.Add(this.radGridView1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterGridViewTemplate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.buisnessTestListBindingSource)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridViewTemplate1)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private Telerik.WinControls.UI.RadGridView radGridView1;
        private Telerik.WinControls.Themes.MiscellaneousTheme miscellaneousTheme1;
        private System.Windows.Forms.BindingSource buisnessTestListBindingSource;
        private Telerik.WinControls.UI.GridViewTemplate gridViewTemplate1;
    }
}

 






Thank you,
Jeff
Julian Benkov
Telerik team
 answered on 04 Jun 2010
1 answer
126 views
I have run into an interesting issue.

I have a datagrid that I have linked to an OrganizationName data source. Inside the OrganizationName object, we have setup a link to another object called OrgnanizationNameType.

On the datagrid, I want to have two columns. The first column is linked to the OrganizationName data source and the second column is linked to the OrganizationNameType data source.

When the datagrid loads, I need to to have the value of the OrganizationNameType to be linked to the value inside the OrganizationName object. I need this done in a drop down for easy editing.

Is this possible?
Jack
Telerik team
 answered on 04 Jun 2010
3 answers
173 views
Hi!

I've reinstalled my computer, and now my project won't build.
"The type or namespace name 'RadPopupForm' could not be found (are you missing a using directive or an assembly reference?)"  

I'm using VS 2005 and WinForms 2010.1.10.308_dev

If I comment out this section, everything else is ok. And it was ok before reinstalling windows7.

        private void radComboBoxAgreement_DropDownOpened(object sender, EventArgs e) 
        { 
            //getting the popup form which size should be set   
            RadPopupForm popup = (RadPopupForm)radComboBoxAgreement.Items[0].ElementTree.Control; 
 
            int desiredWidth = (int)radComboBoxAgreement.ComboBoxElement.ListBoxElement.Viewport.DesiredSize.Width; 
            RadScrollLayoutPanel scrollPanel = (RadScrollLayoutPanel)radComboBoxAgreement.ComboBoxElement.ListBoxElement.Children[2]; 
 
            if (desiredWidth > radComboBoxAgreement.Width) 
            { 
                if (scrollPanel.CanVerticalScroll) 
                { 
                    desiredWidth += radComboBoxAgreement.ComboBoxElement.ListBoxElement.ScrollThickness; 
                } 
 
                //adding border width (both left and right) of the inner listbox element.    
                desiredWidth += radComboBoxAgreement.ComboBoxElement.ListBoxElement.BorderThickness.Horizontal; 
 
                popup.Size = new Size(desiredWidth, popup.Height); 
            } 
        } 

Deyan
Telerik team
 answered on 04 Jun 2010
1 answer
113 views
I am using a custom theme built in VSB for an application. However, the RadListBox does not get any theming. The XML is present and the ThemeManager has it loaded. What is the deal with these controls?
Victor
Telerik team
 answered on 04 Jun 2010
1 answer
128 views

I write the program in VB.
I have a RadGrid with some GridViewMaskBoxColumns with Mask="n3" and MaskType=Numeric.
When i put negative values in that cell afer i finish the edit the minus symbol disappears.
How can i put negative values in those cells?
Alexander
Telerik team
 answered on 04 Jun 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
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?