Telerik Forums
UI for WinForms Forum
6 answers
173 views

Hi Everyone,

I have a radWaitingBar in my Project. As you can see in the attached image, there is a display bug. I use the breeze Theme. I tried many things, but it always looks like that.

public void show()
{
    inProgressForm.waitingBar.WaitingIndicatorWidth = 0;
    inProgressForm.waitingBar.StartWaiting();
      
    inProgressForm.ShowDialog();
}
Dobry Zranchev
Telerik team
 answered on 12 Oct 2010
15 answers
380 views

 

Hi

 

            Version: Q2 2010 SP2

            I want use custom editor.

            So in EditorRequired handler I create RadDropDownListEditor

            and in CellBeginEdit I set data source for dropdownlist.

 

In CellBeginEdit handler I want also set DropDownStyle on DropDownList but I get exception from telerik source code NullReferenceException.

 


If I do not change DropDownStyle property everything looks ok.


I tried set DropDownStyle on DropDownList in EditorRequired handler but I also got the same exception.

 


I cannot use just combo box type of column – in the same column I need display different editors.

 


Check my short source code.

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 GridViewComboBox
{
    public partial class Form1 : Form
    {
        private CompoundAssignmentExpression _list = new CompoundAssignmentExpression();
  
        public Form1()
        {
            InitializeComponent();
  
            SimpleAssignmentExpression sae = new SimpleAssignmentExpression();
            sae.AttributeName = "Test";
            sae.Value = "123";
            _list.Add(sae);
  
            sae = new SimpleAssignmentExpression();
            sae.AttributeName = "Test1";
            sae.Value = "xx";
  
            _list.Add(sae);
            bsCAE.DataSource = _list;           
        }
  
        private void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
        {
            RadDropDownListEditor comboBoxEditor = this.radGridView1.ActiveEditor as RadDropDownListEditor;
  
            if (comboBoxEditor != null
            {
                RadDropDownListEditorElement editorElement = comboBoxEditor.EditorElement as RadDropDownListEditorElement;
                editorElement.DataSource = new string[] { "aaa", "bbb", "ccc", "ddd" };
  
                //these lines cause exception:
                //editorElement.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
                //comboBoxEditor.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
            }
        }
  
        private void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e)
        {
            if ((radGridView1.CurrentRow.Index == 0) && (radGridView1.CurrentCell.ColumnIndex == 0))
            {
                RadDropDownListEditor editor = new RadDropDownListEditor();
                //exception here:
                //editor.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
                e.EditorType = typeof(RadDropDownListEditor);
                e.Editor = editor;          
  
            }
        }
    }
}

 


Regards

 

Martin Vasilev
Telerik team
 answered on 12 Oct 2010
1 answer
103 views
Hello,

my requirement is that when i select a node a second treeview should be populated.

Which event should i use after selecting a node??


Thanks!
Richard Slade
Top achievements
Rank 2
 answered on 12 Oct 2010
6 answers
285 views
Hi

can i add a close button on the ribbon tab ?
like the image ?

thank u

Emanuel Varga
Top achievements
Rank 1
 answered on 12 Oct 2010
2 answers
148 views
Can I Localize the Filtering options To Arabic ?
Because My Application Language Is Arabic And I am Using RadGridView
Thanks 
moh amm
Top achievements
Rank 1
 answered on 12 Oct 2010
10 answers
235 views
Hi
I have two columns on my gridview that need to be calculated. Column One is (A - B) Column B is (Result of Column One * Qty Ordered).
No matter how I write this I am getting an error saying "cannot remove this column because it is part of an expression "A - B""
How do I get around this issue.
Thanks
Em
Emanuel Varga
Top achievements
Rank 1
 answered on 11 Oct 2010
2 answers
221 views
Random question:

Is there a way to make this control do scrolling text?

example
textbox would contain:

"this is a.."
"his is a t"
"is is a te"
"s is a tes"
" is a test"
"is a test "

I'm not that was not necessary, but eh. 
Anyone know?'

Emanuel Varga
Top achievements
Rank 1
 answered on 11 Oct 2010
15 answers
713 views
I am trying to add an image next to the text information in the ListBox.

I have a imageList that has the images i want to display.  I tried something like this.

RadListBoxItem test1 = new RadListboxItem("ITEM" + imageList1.Images[0]);
radListBox1.Items.Add(test1);

But all i get is the "ITEMSystem.Drawing.Bitmap" instead of the image.... 
Peter
Telerik team
 answered on 11 Oct 2010
3 answers
381 views
Hi,

I have a hierarchical gridview with checkbox column. I have a checkbox in header as well.
When the header checkbox is checked/unchecked all other rows gets checked/unchecked accordingly.
But when i do the same in Child it is not working properly.
When i check/uncheck header of Child then the child rows of only expanded row should get checked/unchecked but not all the child rows.
Right now its applying changes for all child rows but i want it only for expanded row.

Below is my code:
<
private void AddCheckColumn(fc_rad_dataGridView dataGridView)
        {
            CustomCheckBoxColumn checkColumn = new CustomCheckBoxColumn();
            checkColumn.Name = "IsActive";
            checkColumn.FieldName = "Active";
            if (!dataGridView.Columns.Contains("IsActive"))
                dataGridView.Columns.Insert(dataGridView.Columns.Count - 1, checkColumn);
        }

public class CustomCheckBoxColumn : GridViewCheckBoxColumn
    {
        public override Type GetCellType(GridViewRowInfo row)
        {
            if (row is GridViewTableHeaderRowInfo)
            {
                return typeof(CheckBoxHeaderCell);
            }
            return base.GetCellType(row);
        }
    }

    public class CheckBoxHeaderCell : GridHeaderCellElement
    {
        RadCheckBoxElement checkbox;

        protected override Type ThemeEffectiveType
        {
            get
            {
                return typeof(GridHeaderCellElement);
            }
        }

        public CheckBoxHeaderCell(GridViewColumn column, GridRowElement row)
            : base(column, row)
        {

        }

        public override void Initialize(GridViewColumn column, GridRowElement row)
        {
            base.Initialize(column, row);
            column.AllowSort = false;
            column.TextAlignment = ContentAlignment.MiddleRight;
        }

        public override void SetContent()
        {
        }

        protected override void DisposeManagedResources()
        {
            checkbox.ToggleStateChanged -= new StateChangedEventHandler(checkbox_ToggleStateChanged);
            base.DisposeManagedResources();
        }

        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            checkbox = new RadCheckBoxElement();
            checkbox.ToggleStateChanged += new StateChangedEventHandler(checkbox_ToggleStateChanged);
            this.Children.Add(checkbox);
        }

        protected override SizeF ArrangeOverride(SizeF finalSize)
        {
            SizeF size = base.ArrangeOverride(finalSize);

            RectangleF rect = GetClientRectangle(finalSize);
            this.checkbox.Arrange(new RectangleF((finalSize.Width - this.checkbox.DesiredSize.Width) / 2, (rect.Height - 20) / 2, 20, 20));

            return size;
        }

        public override bool IsCompatible(GridViewColumn data, object context)
        {
            return data.Name == "IsActive" && context is GridTableHeaderRowElement
                && base.IsCompatible(data, context);
        }

        private void checkbox_ToggleStateChanged(object sender, StateChangedEventArgs args)
        {  
            if (this.ColumnInfo is GridViewCheckBoxColumn)
            {
                bool valueState = false;

                if (args.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On)
                {
                    valueState = true;
                }
                for (int i = 0; i < this.ViewTemplate.Rows.Count; i++)
                {
                    this.ViewTemplate.Rows[i].Cells[this.ColumnIndex].Value = valueState;
                }
            }
        }
    }
>

Thanks,
Pinaki
Svett
Telerik team
 answered on 11 Oct 2010
2 answers
116 views
What is the equivalent to use?:

Grid.MasterTemplate.GroupByExpressions (i). SelectFields.Count
  
Dim col As New Telerik.WinControls.UI.GridViewDataColumn()
  
Grid.MasterView.TableHeaderRow.Cells(i).CellElement
  
ByVal Group As Telerik.WinControls.UI.AggregateCollection
  
Dim headerCell As GridCellElement = grid.MasterView.TableHeaderRow.Cells(i).CellElement

In the new version.

Thanks.
Martin Vasilev
Telerik team
 answered on 11 Oct 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)
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
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
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?