InlineInsertTemplate Resource binding problem

2 posts, 0 answers
  1. Sekowski
    Sekowski avatar
    1 posts
    Member since:
    Aug 2005

    Posted 13 Apr 2015 Link to this post

    I have problem with resources in Telerik scheduler custom template, to be specific InlineInsertTemplate.

    I don't use separate ascx file for appointment layout.
    Everything is in one aspx file and one cs file.

    I can find the controls with resources and their values,in RadScheduler1_AppointmentCommand command insert I can put them inside a test label and the values are correct.
    I make global public variables from resources so I should be able to add manually the resources but I tried many things and everything failed.

    Main problem is i can not add resources. In default template everything works fine, resources are added to database.

    Some of my tries:

    protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
        if (e.Container.Mode == SchedulerFormMode.Insert)   
        Resource resPracownik = new Resource();//i create manually resource
        resPracownik.Key = "Pracownik";
        resPracownik.Text = TextBoxPracownik.ToString();
        e.Appointment.Resources.Add(resPracownik);//this doesn't
        TextBox TitleTextBox = (TextBox)e.Container.FindControl("TitleTextBox");
        TitleTextBox.Text = e.Appointment.Subject;//this works

    protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)
        if (e.CommandName == "Insert"){
                RadComboBox RadComboBoxPracownik = (RadComboBox)e.Container.FindControl("RadComboBoxPracownik");//finding combobox withj resource value
                TextBox TextBoxPracownik = (TextBox)e.Container.FindControl("TextBoxPracownik");//finding hidden helping text box
                TextBoxPracownik.Text = RadComboBoxPracownik.SelectedItem.Value.ToString();//setting text box value same as combobox so i can easier bind it
                tempPracownik = RadComboBoxPracownik.SelectedItem.Value.ToString();//setting global variable
                Label1.Text = "status= " + tempStatus + "\npracownik= " + tempPracownik + "\ntyp= " + tempTyp;//this shows that the values are correct, the just dont bind
  2. Plamen
    Plamen avatar
    2793 posts

    Posted 13 Apr 2015 Link to this post


    In case when Custom Advanced Template is used and you need to need to use Resources with RadComboBox we strongly recommend using the separate usercontrol as for example it is done in the demo and in the sample page here.


    See What's Next in App Development. Register for TelerikNEXT.

Back to Top