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

Assign CustomAttribute in code server side

1 Answer 48 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
David Penny
Top achievements
Rank 2
David Penny asked on 23 Dec 2008, 11:25 AM
Hi,

I am trying to assign a value to a CustomAttribute in code server side. 
So far everything else is working OK, but not sure if I need to take a different approach.

Dim lv As New dbLeave  
        Dim dt As New DataTable  
        dt = lv.StaffOtherLeave(StaffID, dateFrom, dateTo, Team)  
        RadScheduler1.DataKeyField = "UniqueID" 
        RadScheduler1.DataStartField = "DateFrom" 
        RadScheduler1.DataEndField = "DateTo" 
        RadScheduler1.DataSubjectField = "Subject" 
        RadScheduler1.Attributes("StaffID") = "StaffID"  
        RadScheduler1.DataSource = dt 
        RadScheduler1.DataBind() 

The RadScheduler1.Attribute("StaffID") obviously needs mapping to the StaffID column returned in the datatable, but doing the above is not going to work.  Do I need to loop through the datatable and manually assign this, or is there an easier method of allocating the StaffID column in the Datatable to the Custom Attribute of the RadScheduler?

Using RadScheduler in ASP.Net AJAX Version=2008.3.1210.20

David Penny

1 Answer, 1 is accepted

Sort by
0
David Penny
Top achievements
Rank 2
answered on 23 Dec 2008, 11:29 AM
Duh!

Ignore me, I'm a donc - I had mistyped StaffID in the SQL to get my data, so of course it would not work!
Tags
Scheduler
Asked by
David Penny
Top achievements
Rank 2
Answers by
David Penny
Top achievements
Rank 2
Share this question
or