+1-888-365-2779
Try Now
More in this section

RadDatePicker

10 posts, 0 answered
  1. vinamra
    vinamra avatar
    45 posts
    Registered:
    23 Oct 2012
    24 May 2010
    Link to this post
    hi

    i am extending the page myprofile in admin and adding a new feild DateOfBirth

    i hav also included it in web.config

     <add name="DateOfBirth" />

    now if i use

     <telerik:RadDatePicker ID="DateOfBirth" runat ="server" />

    on myprofile page it shows and selects the date but when i saves it, it does't save it in db.
    if i replace raddatepicker with simple textbox it saves and shows the date.

    how to solve this problem..

    thanks
    Vinamra Bhatnagar
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 May 2010
    Link to this post
    Hello vinamra,

    The ManageProfile does not support controls of type RadDateTimePicker. SetProfileProperties method can work with controls of type ITextControl. You could solve the problem by persisting the data manually for the selected profile by using SetPropertyValue and GetPropertyValue methods.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. vinamra
    vinamra avatar
    45 posts
    Registered:
    23 Oct 2012
    25 May 2010
    Link to this post
    hi

    thanks for the reply

    i understand that controls of type ITextControl can only be used if process is automated.

    and i hav to use SetPropertyValue and GetPropertyValue to solve it.
    i hav found the event in myprofile cmdSaveUser_Command where i can do all stuff
    but i cant find the event in code file for user.aspx

    thanks
    vinamra bhatnagar
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 May 2010
    Link to this post
    Hi vinamra,

    You could subscribe for manageUsers_UpdatedUser and manageUsers_CreatingUser events in  Sitefinity\Admin\CmsAdmin\Users.aspx.cs

    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. vinamra
    vinamra avatar
    45 posts
    Registered:
    23 Oct 2012
    25 May 2010
    Link to this post
    hi

    i have place raddatepicker in user.aspx page

    inside ManageUsers >EditTemplate>ManageProfile>EditTemplate

    now i am unable to fine this control on pageload. how to find this control.

    plz help any code example will be help full.

    thanks
    vinamra bhatnagar
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 May 2010
    Link to this post
    Hi vinamra,

    Please take  a  look at this post saving profile and membership data

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. vinamra
    vinamra avatar
    45 posts
    Registered:
    23 Oct 2012
    25 May 2010
    Link to this post
    hi

    i am doing this
    public void manageProfile_Load(object sender, EventArgs e)
       {
     
           
           RadDatePicker dtPicker = (RadDatePicker) ((ManageProfile) sender).Controls[0].FindControl("DateOfBirth");
                   if (dtPicker != null)
                   {
                       dtPicker.SelectedDate = DateTime.Parse(Profile.DateOfBirth);
                   }
       }


    but in raddatepicker doesnt get populated.
  8. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    06 Oct 2010
    Link to this post
    Hi,

    I am also doing some thing like this. I have an user control 
    inside ManageUsers >EditTemplate>ManageProfile>EditTemplate>usercontrol

    I just need to pass username or user id in the control. I also tried the both event manageProfile_Load as well manageProfile_OnDataBinding. On manageProfile_Load event the user control load two times at the secont time the username found null so that does not populate and manageProfile_OnDataBinding event
     does not fire at all.

    I also tried this as well but user control not found
    case ManageUsers.Modes.Edit:
                   {
                       this.ControlPanelTitle.InnerText = String.Format("{0} > {1}", (string)GetLocalResourceObject("Users"), (string)GetLocalResourceObject("Edit"));
                       SetFaqVisibility();
                       Telerik.Security.WebControls.ManageUsers.EditContainer eContainer = manageUsers.GetCurrentContainer() as Telerik.Security.WebControls.ManageUsers.EditContainer;
                       if (eContainer != null)
                       {
                           UserControls_UserAKA useraks = (UserControls_UserAKA)eContainer.FindControl("useraka");
                           useraks.Username = eContainer.UserNameTextBox.Text.
                       }
                       break;
                   }

    How to populate user control??

    Thanks,
    Tarun


  9. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    06 Oct 2010
    Link to this post
    Hi Guys,

    I figured that out but now having an another problem.
    Please see attached screenshot there I added an UserAkA info grid now I want to add one some functionality on this. In the grid there are some username in first two column I want link username to admin user profile(Users >Edit) page. i.e. clicking on the username will open its profile page at the same page it was clicked.

    Please check attached screenshot.

    Thanks,
    Tarun

  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    07 Oct 2010
    Link to this post
    Hello Tarun,

    You have to add the following logic inside OnPreRender of Users.aspx.cs file

    protected override void OnPreRender(EventArgs e)
       {
           base.OnPreRender(e);
     
        Telerik.Security.WebControls.ManageUsers.EditContainer editContainer = manageUsers.GetCurrentContainer() as Telerik.Security.WebControls.ManageUsers.EditContainer;
        if (editContainer != null)
        {
            this.manageUsers.Mode = ManageUsers.Modes.List;
            this.manageUsers.UserName = "Pass the username here.";
            this.manageUsers.Mode = ManageUsers.Modes.Edit;
        }
     
       }

    You have to set the UserName property of manageUsers control when you click a name from your Grid.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
10 posts, 0 answered