Hi,
I got some issue with the autogenerated features :
I generated column dynamically with a StoredProcedure.
1. Change the default DatePicker of autogenerated DateTimeColumn :
I'm able to change the columnEditor with a customEditor. But here it is already a RadDateTimeColumnEditor, I need to find how change the default picker(datePicker) with a DateTimePicker.
protected
void
RadGridEdit_CreateColumnEditor(
object
sender, Telerik.Web.UI.GridCreateColumnEditorEventArgs e)
{
GridBoundColumn col = e.Column
as
GridBoundColumn;
if
(col !=
null
&& col.UniqueName!=
"Item"
&& Session[
"DataDef"
]!=
null
)
{
DataSet ds = (DataSet)Session[
"DataDef"
];
DataRow[] drDeff =
null
;
if
(ds.Tables[0].AsEnumerable().Any(row => col.UniqueName == row.Field<String>(
"ListColumnNameFr"
)))
{
drDeff = ds.Tables[0].Select(
"ListColumnNameFr='"
+ col.UniqueName +
"'"
);
}
else
{
drDeff = ds.Tables[0].Select(
"ListColumnNameFr='"
+ (col.UniqueName).Replace(
" "
,
""
) +
"'"
);
}
if
(drDeff.Length == 0)
return
;
switch
(drDeff[0][4]
as
string
)
{
case
"DROPDOWN"
:
e.ColumnEditor =
new
CustomDropDownListEditor((ds.Tables[1].Select(
"ColumnKey='"
+ drDeff[0][1] +
"'"
)).CopyToDataTable());
break
;
default
:
if
(e.ColumnEditor
is
GridTextBoxColumnEditor)
{
GridTextBoxColumnEditor txt = e.ColumnEditor
as
GridTextBoxColumnEditor;
txt.TextBoxMode = TextBoxMode.MultiLine;
}
else
if
(e.ColumnEditor
is
GridDateTimeColumnEditor)
{
GridDateTimeColumnEditor gdtce = e.ColumnEditor
as
GridDateTimeColumnEditor;
gdtce.PickerControl.GetType();
}
break
;
}
}
}
2. Change autogenerated filters :
Where and when can I change it?
Thx,
Bouyez.