Great Akshay, but more help me, please
I was using older version in my code (javascript and C#): C1WindowPosition, VerticalPosition and HorizontalPosition
C1.Web.UI.Controls.3, Version=3.5.20101.174, Culture=neutral, PublicKeyToken=9b75583953471eea
namespace C1.Web.UI.Controls.C1Window
{
public enum C1WindowPosition
{
// Default position of the C1Window.x = y = 0
ByDefault = 0,
// Center of the page.
Page = 1,
// Center of the parent element of the dialog window.
Parent = 2,
// Position determines by the C1.Web.UI.Controls.C1Window.C1Window.X and C1.Web.UI.Controls.C1Window.C1Window.Y properties.
Manual = 3,
// OffSet Mode
OffSet = 4
}
}
public enum VerticalPosition
{
// Top region
Top = 0,
// Middle region
Middle = 1,
// Bottom region
Bottom = 2
}
public enum HorizontalPosition
{
// Left region
Left = 0,
// Center rgion
Center = 1,
// Right region
Right = 2
}
Now, new version C1Dialog about Position property , help reference:
- a single string representing position within viewport: ‘center’, ‘left’, ‘right’, ‘top’, ‘bottom’.
- a string with array format containing an x,y coordinate pair in pixel offset from left, top corner of viewport (e.g. “[350,100]”)
- a string with array format containing x,y position string values (e.g. “[‘right’,‘top’]” for top right corner).
I try change code from older C1Windows to new C1Dialog:
// Position determines by the C1.Web.UI.Controls.C1Window.C1Window.X and C1.Web.UI.Controls.C1Window.C1Window.Y properties.
C1WindowPosition: Manual = 3,
dialog.set_startPosition(position);
dialog.set_x(200);
dialog.set_y(250);
I think this will be the new code:
//Option 2 for setting X and Y
dialog.c1dialog({position:'[200,250]'});
// Center of the page.
C1WindowPosition: Page = 1,
// Middle region
VerticalPosition: Middle = 1,
// Center rgion
HorizontalPosition: Center = 1,
dialog.set_startPosition(C1.Web.UI.Controls.C1Window.C1WindowPosition.page);
dialog.set_verticalAlign(C1.Web.UI.Controls.C1Window.VerticalPosition.middle);
dialog.set_horizontalAlign(C1.Web.UI.Controls.C1Window.HorizontalPosition.center);
I dont know if this will be the new code??
dialog.c1dialog({position:'center'}); ??
// or
dialog.c1dialog({position:'["center","center"]'}); ??
Please, any help ? thx a lot!!