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(); }
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