RadDateTimePicker in layout template firing InitInsert command

3 posts, 1 answers
  1. Jacek
    Jacek avatar
    31 posts
    Member since:
    Sep 2011

    Posted 21 Sep 2012 Link to this post


    I would like the RadDateTimePicker located in LayoutTemplate to fire InitInsert command.
    The problem is, RadDateTimePicker does not have CommandName property (and CommandArguments), so the only way to do that would be to fire command from SelectedDateChanged.

    I understand that RadListViewDataItem can use FireCommandEvent method, but how to get RadListViewDataItem when the RadListVIew is empty?

    In other words, how to make the following to start working as intended above

    protected void myDatePicker_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
                RadListViewDataItem r = new RadListViewDataItem(myRadListView, 0);
                r.FireCommandEvent("InitInsert", String.Empty);


  2. Answer
    Eyup avatar
    3320 posts

    Posted 25 Sep 2012 Link to this post

    Hello Jacek,

    You could use the following method:
    As demonstrated in the following demo:

    An alternative approach would be to use a client-side fireCommand:

    That should do the trick. Please give it a try and let me know about the result.

    Kind regards,
    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.
  3. Jacek
    Jacek avatar
    31 posts
    Member since:
    Sep 2011

    Posted 25 Sep 2012 Link to this post

    Great, thanks!
Back to Top