Hi,
I need to change (c#) the default editor for a column (texdbox) to a dropdownlist or other when I autogenerate column. (depend on constraint->SQLConstraint.png)
OnNeedDataSource -> RadGridEdit.Source = a dataTable;
RadGridEdit_PreRender -> Display_mode_column(true);
foreach (GridColumn col in RadGridEdit.MasterTableView.AutoGeneratedColumns)
{
[....]
if((string)rows[0][4] == "DROPDOWN" && sender != null){
foreach (GridDataItem dataItem in RadGridEdit.MasterTableView.Items)
{
DropDownList ddl = new DropDownList();
ddl.ID = "DDL_" + col.UniqueName;
ddl.DataSource = dataDefinition.Tables[1];
ddl.DataTextField = "ListValueLabel";
ddl.DataValueField = "ListValueLabel";
ddl.ControlStyle.Width = Unit.Percentage(100);
ddl.DataBind();
dataItem[col.UniqueName].Controls.Add(ddl);
}
}
This don't work, I get my showed data with a dropDown and if I click on the row, I still got this TextBox in edit mode (BatchEditYoloMode.png).
So, How can I change this edit textbox into a dropdown (timepicker , ....). (GetBatchColumnEditor?)