I Have One GridViewTextBox Column in a grid and One ComboBox Column based on selection in a combobox column I need cells of TextBox Column to contain either string or integer value how I can do this please help me.
already used below mentioned code but having issue with that I cannot able to put values more than 100 in that and getting up/down arrows to increases and decrease values but I dont need them.
radGridView1.EditorRequired += new Telerik.WinControls.UI.EditorRequiredEventHandler(radGridView1_EditorRequired); // binding event on grid
void radGridView1_EditorRequired(object sender, Telerik.WinControls.UI.EditorRequiredEventArgs e)
{
if (this.radGridView1.Columns[1].IsCurrent)
{
var a = TextCodes.SingleOrDefault(t => t.Name.Equals(this.radGridView1.CurrentRow.Cells[0].Value));
if (a == null)
return;
if (a.TextCodeType == TextCodeTypeEnum._datetime)
{
e.Editor = new RadDateTimeEditor();
e.EditorType = typeof(RadDateTimeEditor);
}
else if (a.TextCodeType == TextCodeTypeEnum._string && a.TextCodeValueList == null)
{
e.Editor = new RadTextBoxEditor();
e.EditorType = typeof(RadTextBoxEditor);
}
else if (a.TextCodeType == TextCodeTypeEnum._string && a.TextCodeValueList != null)
{
e.Editor = new RadDropDownListEditor();
try
{
((RadDropDownListEditor)e.Editor).DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
}
catch (System.Exception)
{
}
e.EditorType = typeof(RadDropDownListEditor);
}
else if (a.TextCodeType == TextCodeTypeEnum._number)
{
e.Editor = new GridSpinEditor();
e.EditorType = typeof(GridSpinEditor);
}
}
}
For Numeric Data what type of editor I can choose I am using GridSpinEditor But Problem Is that after I put value more than 100 it again automatically re-setted to 100.
My requirement is to just have cell in grid which can hold only integer data