This is a migrated thread and some comments may be shown as answers.

raddatepicker readonly

1 Answer 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Savyo
Top achievements
Rank 1
Savyo asked on 27 Aug 2012, 11:24 AM
Hai,
     I have a raddatepicker in the edititemtemplate of my radgrid. I want it to be read-only in edit-mode. Any help will be appreciated.
Thanks
Savyo

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Aug 2012, 11:26 AM
Hi,

Try the following code to make the RadDatePicker ReadOnly in edit mode.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
  if (e.Item is GridEditableItem && e.Item.IsInEditMode)
  {
    GridEditableItem item = (GridEditableItem)e.Item;
    RadDatePicker Datepicker = (RadDatePicker)item.FindControl("RadDatePicker1");
    Datepicker.DateInput.ReadOnly = true;
  }
}

Thanks,
Shinu.
Tags
Grid
Asked by
Savyo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or