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

How to apply Multiple behaviors using server side code

1 Answer 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kiresh
Top achievements
Rank 1
Kiresh asked on 07 Jun 2013, 05:21 AM
Hi everyone,

I have one scenario where i need to apply  two behaviors Close,Move

here is my code
RadWindow RadWindow1 = new RadWindow();
RadWindow1.ID = AGCommon.ToString(item.Id);
RadWindow1.VisibleOnPageLoad = true;
RadWindow1.Width = 800;
RadWindow1.Height = 550;
RadWindow1.Behaviors = WindowBehaviors.Close;
RadWindow1.Behaviors = WindowBehaviors.Move;
RadWindow1.NavigateUrl = "Tests.aspx";
RadWindowManager1.Windows.Add(RadWindow1);
But it takes only shows Move behavior . I need both Close,Move behaviors.

Can anyone help me out.

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 07 Jun 2013, 06:13 AM
Hi Kiresh,

To apply both the behaviors together,please use the below code.
RadWindow1.Behaviors = Telerik.Web.UI.WindowBehaviors.Move | Telerik.Web.UI.WindowBehaviors.Close;

Thanks,
Princy

Tags
Grid
Asked by
Kiresh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or