Posted 17 Jul 2012 Link to this post
<
Columns
>
telerik:GridBoundColumn
DataField
=
"ID"
HeaderText
UniqueName
</
telerik:GridTemplateColumn
ItemTemplate
asp:TextBox
ID
"TextBox1"
runat
"server"
></
telerik:GridEditCommandColumn
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item.IsInEditMode && e.Item
is
GridEditableItem)
GridEditableItem item = e.Item
as
GridEditableItem;
(item[
].Controls[0]
TextBox).Text =
"Your Text"
;
// bound column
(item.FindControl(
)
// template column
}
Posted 18 Jul 2012 Link to this post
Posted 13 Apr 2016 Link to this post
How could I insert today's date as a default value on page load in a GridTemplateColumn?
Thanks,
Posted 18 Apr 2016 Link to this post
AutoPostBackOnFilter
"true"
ReadOnly
"Date"
telerik:RadDatePicker
"RadDatePicker"
SelectedDate='<%# System.DateTime.Today %>'>
EditItemTemplate
Posted 20 Apr 2016 in reply to Maria Ilieva Link to this post
Thanks!
what about defaulting a value of a drop down list?
so when grid is in edit/view mode the value of the drop down list is selected and drop down is disabled.
And Is there a feature of hiding a specific row from a radgrid?
Thank You,
Posted 25 Apr 2016 Link to this post
Posted 02 Aug 2016 in reply to Jayesh Goyani Link to this post
Hi
can you please help me to set default value in popup on radgrid add new record click event.
Posted 05 Aug 2016 Link to this post
If the column is not a GridTemplateColumn, you can specify a default value using the column's DefaultInsertValue property, like this:
GridTemplateColumn
DefaultInsertValue
<<telerik:GridBoundColumn DefaultInsertValue="12/21/2012" DataType="System.DateTime" DataField="Column1" UniqueName="Column1"></telerik:GridBoundColumn>
"12/21/2012"
DataType
"System.DateTime"
"Column1"
Otherwise, if it is a GridTemplateColumn, take a look at the following Telerik article :
Inserting Values Using InPlace and EditForms Modes