Assign CustomAttribute in code server side

2 posts, 0 answers
  1. David Penny
    David Penny avatar
    174 posts
    Member since:
    Jun 2006

    Posted 23 Dec 2008 Link to this post

    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
  2. David Penny
    David Penny avatar
    174 posts
    Member since:
    Jun 2006

    Posted 23 Dec 2008 Link to this post

    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!
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top