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

[Solved] Binding in an event other than the page load

1 Answer 84 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Chris Trina
Top achievements
Rank 1
Chris Trina asked on 17 Dec 2009, 01:16 AM
I have a schedule control on a page where I cannot bind the control until the user has performed some actions on the page.  In the event where I can bind the control I have the following  code:

Me.rdSchedule.Visible = True   
Me.rdSchedule.DataSource = goDataTable   
Me.rdSchedule.DataKeyField = "DataKey"   
Me.rdSchedule.DataStartField = "StartDate"   
Me.rdSchedule.DataEndField = "EndDate"   
Me.rdSchedule.DataSubjectField = "DisplayText"   
Me.rdSchedule.DataBind() 

 


My problem is, the following error is being thrown prior to the page actually being displayed the first time.
 

 

Message: DataKeyField, DataSubjectField, DataStartField and DataEndField are required for databinding

Source: Telerik.Web.UI


Any hints?  I understand that these fields are needed to do the bind, but I don't want the bind to occur yet.

Also, is there a way to programattically add items onto the schedule versus binding?

Thanks

Chris

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Chris Trina
Top achievements
Rank 1
answered on 17 Dec 2009, 12:43 PM
Nevermind, I solved this by binding to a temp table on the page load, and then rebinding later once I had real data to bind to
Tags
Scheduler
Asked by
Chris Trina
Top achievements
Rank 1
Answers by
Chris Trina
Top achievements
Rank 1
Share this question
or