8 Answers, 1 is accepted
Sorry, I tried ".Resizable()" and it worked.
But I put a Grid in the Window, the Grid's height could not fill the Window when the Window resized.
Is there any setting need to do this?
See the following article (the second example), which shows how the Grid can be resized when it is nested in a Window:
What about if the Window needs to have an OK and Cancel buttons below the grid. How can this be achieved?
If you want to have OK/Cancel buttons within the Window they can be added to the Window's content, for instance:
Since these are custom buttons added to the Window any logic that needs to be executed on clicking them would have to be implemented in the respective button click handler.
Alternatively you could consider using the Dialog instead of the Window, since it has built-in support and specific configuration options for such buttons. See this demo for example.
What I was asking was the styling of the grid and the button div so that the grid be resizing within the window but the buttons remain at the bottom.
Also the Dialog does not offer the same functionality as Window so it is not a solution for my case.
Here is a styling that I have but it only works on IE11. On all the other browsers (Chrome, Opera, Edge, Firefox) The buttons are not visible on the window and also the content placed on the window seems to be bigger than the window size
The following two changes to your dojo fix the issue:
1. Added missing div closing tag:
2. Set #grid element's height to 90% instead of 100%. Since both it and the #dialog-buttons div are in the same container if the first is set to occupy 100% of that container the second will not be visible.
Thank you so much for the help. For some reason it works even if I change the dialog buttons to have a greater height of 10%.