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

Saving Multiple Dock States

1 Answer 50 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Carolus
Top achievements
Rank 1
Carolus asked on 07 May 2009, 05:02 PM
I have successfully saved the dock state into a database, howver this occurs without any user interaction, so the dock state constantly saves even if the user doesn't want to save the state. I have looked through the Examples on the site, however I see nothing about saving the state with a Button Click. For example:

DockName: MyCoolDockLayout
Button: Save 

Database Table: Userid,DockName,DockLayout

I have been trying to Raise the  Telerik.Web.UI.DockLayoutEventArgs with a button click but I get Event Argument Errors. How can I get the DockLayoutEventArgs to pass through a Button Click Event, to then Trigger the RadDockLayout_SaveDockLayout Sub?

Thanks...

1 Answer, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 11 May 2009, 10:42 AM
You could use a flag which will indicate if the user is pressed save button or not. If the user is pressed the button then the state will be saved, e.g.

bool

 

isButtonSaveStateClicked = false;

 

...

 

protected void btnSaveState_Click(object sender, EventArgs e)

 

{
    isButtonSaveStateClicked = true;

 

}

....

 

protected void RadDockLayout1_SaveDockLayout(object sender, DockLayoutEventArgs e)

 

{

     if(isButtonSaveStateClicked == true)
        {
            ...SaveState here
        }
}


Tags
Dock
Asked by
Carolus
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Share this question
or