Aug 10, 2012, 8:02 AM
Create a button to close a window
Hey,
I'm totally new in ext.net, and i've some difficulties to find documentation to help me, so sorry if the question seems too easy.
I work with MVC, and I want to use the different helpers to create a windows with a button to close it in a renderpartial.
I not find how to specify a function for the button, like "Window.Close()"
How can i do this ?
Here is my simple peace of code :
Thanks in advance,
I'm totally new in ext.net, and i've some difficulties to find documentation to help me, so sorry if the question seems too easy.
I work with MVC, and I want to use the different helpers to create a windows with a button to close it in a renderpartial.
I not find how to specify a function for the button, like "Window.Close()"
How can i do this ?
Here is my simple peace of code :
var popup = Ext.Net.Html.X().Window()
.ID("popup_error")
.Title("An error occurs")
.StyleHtmlContent(true)
.ApplyBodyStyles("color : red")
.Height(200)
.Width(500)
.AutoScroll(true)
.AutoFocus(true);
popup.Buttons((buttoncollection) =>
{
var button = Ext.Net.Html.X().Button().Text("ok");
buttoncollection.Add(button);
});
popup.Render();
Just want to make the "ok" button make close the windows without writing javascript function to do itThanks in advance,