This is a migrated thread and some comments may be shown as answers.

Attributes

1 Answer 68 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Michel Laforce
Top achievements
Rank 1
Michel Laforce asked on 02 Oct 2011, 09:49 PM
Hi

 

EnableCustomAttributeEditing="true"

 

 

CustomAttributeNames="Color

 


I have added an attribute wich I Bind and it work fine

 

protected void rdsSchedule_FormCreated(object sender, SchedulerFormCreatedEventArgs e)

 

{

 

if((e.Container.Mode == SchedulerFormMode.AdvancedEdit) || (e.Container.Mode == SchedulerFormMode.AdvancedInsert))

 

{

ddlColor.SelectedValue = e.Appointment.Attributes[

"Color"];

 

}

}

but it is empty in the update, my database receives an empty string for Color

 

 

protected void rdsSchedule_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)

 

{

 

this.SqlProcessor.AddParameter("ID", e.Appointment.ID);

 

 

this.SqlProcessor.AddParameter("Users_ID", this.CurrentUserId);

 

 

this.SqlProcessor.AddParameter("Subject", e.ModifiedAppointment.Subject);

 

 

this.SqlProcessor.AddParameter("Description", e.ModifiedAppointment.Description);

 

 

this.SqlProcessor.AddParameter("Color", e.ModifiedAppointment.Attributes["Color"]);

 

 

this.SqlProcessor.AddParameter("DateStart", xStart.ToString("yyyy-MM-dd HH:mm"));

 

 

this.SqlProcessor.AddParameter("DateEnd", xEnd.ToString("yyyy-MM-dd HH:mm"));

 

 

this.SqlProcessor.Execute("stpUsersSchedule", CommandType.StoredProcedure);

 

}

Am I missing something

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 05 Oct 2011, 11:06 AM
Hello Michel,

I could not quite understand what seems to be the problem so I am sending you a working demo project that shows how custom attributes are used. Make sure that the name of the attribute is the same like the name of the field in the database. 

If you still experience the problem please try to explain it via the sent project.
 
All the best, Plamen Zdravkov
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
Tags
Scheduler
Asked by
Michel Laforce
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or