I am new to asp, so please excuse me if I don't express myself correctly.
I have a RadScheduler with a Linq data source. I want to get appointments from the database based on a given id.
In my DataClasses.dbml I have four tables and (for now) two stored procedures, GetProgram() and GetProgramById(int id). The user chooses the id from a checkboxlist, and I want to call the GetProgramById(int id) from codebehind.
In markup I have configured the RadScheduler with DataSourceID="ProgramDataSource". I try to set the data source property to the result of the GetProgramById(int id), but then I get an error saying that both DataSourceID and DataSource properties are set, and that I have to remove one of them. If I remove DataSourceID="ProgramDataSource" from markup I can set DataSource=GetProgrambyID(int id), but then none of the appointments are updated to the database after closing the AdvancedEdit form of the scheduler.
There must be a way to get a subset of the appointments, and to be able to edit them, so I would be greatful if anyone could help me find it.
Regards, Jill-Connie Lorentsen
protected void RadListBoxTmp_ItemCheck(object sender, RadListBoxItemEventArgs e)
bool result = Int32.TryParse( e.Item.Value, out id);
if ( e.Item.Checked && result)
var dataContext = new DataClassesDataContext();
ProgramDataManager dataManager =
var program = new List<
program = dataManager.GetProgramByID(id);
RadScheduler1.DataSource = program;