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

Server-side binding with AdvancedForm issue

2 Answers 53 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 21 Mar 2012, 08:14 PM
So I'm successfully binding my resources to the AdvancedForm template, but there is a scenario that I haven't been able to find a solid answer for.

For one of the RadComboBox-es, I want to take the selected value, post it back, and rebind the resource dropdown below it. An example is a client has particular services assigned to them, so when the client selection changes, I need just the services they have available to be rebound.

I'm actually to the point that I have the combo box posting back and rebinding accordingly, but now for some reason, the combo box that posts back (also a resource, the Client resource) is no longer attached to the appointment. So when I insert the appointment, the 2 other resources I have are in the collection on the Appointment, but not the Client resource.

My major hang up is that the ResourceControl is used on the AdvancedForm control and I'm not really quite sure how to get directly to the ResourceControl and its child controls without doing a bunch of FindControl (which is what I'm doing now)

The strange thing is that on the SelectedIndexChanged handler that's firing, if I look at the Appointment property that I have on the code-behind class, all 3 resources are there and assigned successfully. After that event is completed and move to an insert/update, for some reason the Client resource gets dropped off the appointment.

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 21 Mar 2012, 08:47 PM
I decided to remove the event handler and just leave the Resources bound the way they are from the initial load. They are loaded into the control and selectable from the combo box, but when the Appointment is about to be saved, only 2 of the 3 resources come through.
0
David
Top achievements
Rank 1
answered on 22 Mar 2012, 02:00 PM
Solved my problem. Can't believe it was something so easily missed and simple. On my AdvancedInsert and EditTemplate tags for the RadScheduler, I forgot to include Client='<%# Bind("Client") %>'

Seems to be working properly now.

<scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'   Reminder='<%# Bind("Reminder") %>'    DSP='<%# Bind("DSP") %>' Client='<%# Bind("Client") %>' Service='<%# Bind("Service") %>' />
Tags
Scheduler
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or