hiding radDatePicker in edit mode - General Discussions - General Discussions - Progress Community
 General Discussions

hiding radDatePicker in edit mode

  • hiding radDatePicker in edit mode
  • I want to programmatically hide my raddatepicker when in edit mode.  This is what I have so far and I think I am close, but I get an error.  Any suggestions....?



    Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.WebControls.GridCommandEventArgs) Handles RadGrid1.ItemCommand






    If e.CommandName = "Edit" Then



    Each item As GridDataItem In RadGrid1.MasterTableView.Items





    Dim txtBox As RadDatePicker = DirectCast(item("Metricmonth").FindControl("txtEdit2"), RadDatePicker)


    txtBox.Visible =










     End If






  • Hi Aret,

    When the edit command is fired the edit form is not created yet, so it is too early to look for its controls there. You would better handle the ItemCreated or ItemDataBound event for that purpose. Check the below article:

    Iana Tsolova
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now