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

Saving the dock results into a db

3 Answers 51 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Rick
Top achievements
Rank 1
Rick asked on 15 Sep 2008, 03:19 PM
So I am creating rad dock zones dynamically and the rad docks dynamically as well.

I want to store in a db the dockzone that the dock is stored in

each dock represents an employee and each zone represents a schedule.

I build each dockzone with this code
RadDockZone buildDocs(DataRow dr)  
    {  
        RadDockZone thisDoc = new RadDockZone();  
        thisDoc.ID = dr["schedule_rec"].ToString();  
        thisDoc.Height = 50;  
        thisDoc.Width = 280;  
        return thisDoc;  
    } 

I build each doc with this code
DataView dv = (DataView)SqlDataSource2.Select(DataSourceSelectArguments.Empty);  
        DataTable dt = dv.ToTable();  
        foreach (DataRow dr in dt.Rows)  
        {  
            RadDock thisDoc = new RadDock();  
            thisDoc.ID = dr["UserID"].ToString();  
            thisDoc.Height = 50;  
            thisDoc.DockMode = DockMode.Docked;  
            thisDoc.Collapsed = true;  
            thisDoc.Title = dr["firstName"].ToString() + " " + dr["lastName"].ToString();  
            thisDoc.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.None;            
            radZoneEmployees.Controls.Add(thisDoc);  
        } 

So I want to store the UserID and the sched_rec in the database however  can't seem to find them or there relationship.

Anyhelp?

3 Answers, 1 is accepted

Sort by
0
Sophy
Telerik team
answered on 16 Sep 2008, 02:56 PM
Hi,

Thank you for contacting us.
From the code snippets you have sent us I see how you are dynamically creating a RadDockZone and a RadDock, however, I am not able to understand what is the exact problem you experience. Please, explain in more details what you mean under "I want to store the UserID and the sched_rec in the database however  can't seem to find them or there relationship". How do you try to find the UserID and the sched_rec and what do you mean under their relationship? What is the exact problem you encounter? Having more information about your requirements and being able to understand the issue I will do my best to help you.

Best regards,
Sophy
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rick
Top achievements
Rank 1
answered on 19 Sep 2008, 02:00 PM
the sched rec is here = thisDoc.ID = dr["schedule_rec"].ToString();

and the UserID is here = thisDoc.ID = dr["UserID"].ToString();

they are the ID of the zone and the doc respectively.
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 19 Sep 2008, 02:56 PM
Do you know for the telerik's RadScheduler?!?..You can find RadScheduler's online examples here:
http://demos.telerik.com/ASPNET/Prometheus/Scheduler/Examples/BlackPearl/DefaultCS.aspx

I am not sure that I could understand your problem, but keep in mind that if you create RadDocks dynamically you should recreate them on each postback/callback too as in the following example:
http://demos.telerik.com/ASPNET/Prometheus/Dock/Examples/DynamicDocks/DefaultCS.aspx
Tags
Dock
Asked by
Rick
Top achievements
Rank 1
Answers by
Sophy
Telerik team
Rick
Top achievements
Rank 1
Obi-Wan Kenobi
Top achievements
Rank 1
Share this question
or