Hello,
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
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