This topic demonstrates how to position igDialog
™.
The following topics are prerequisites to understanding this topic:
igDialog Overview: The topic introduces the user to the igDialog
control’s main features.
Adding igDialog: This topic demonstrates how to add the igDialog
control to a web page.
This topic contains the following sections:
The following table lists the configurable aspects of the igDialog
control. Additional details are available after the table.
Configurable aspects | Details | Properties |
---|---|---|
Configuring igDialog Position |
The properties that need to be configured to position the igDialog . |
position |
Configure igDialog stack order |
The property that specifies the stack order of the dialog. | zIndex |
The igDialog
can be positioned according to its parent. The control API has a property called position
that can be configured and modified dynamically. The following table will show you how to use this property and what values it accepts.
The table below demonstrates what type of format property position
accepts:
Format | Example | Type |
---|---|---|
{ left: leftPos, top: topPos } | { left: 100, top: 200 } | JavaScript object |
{ my: “position”, at: “position”, of: “parent”, offset: “left top”, collision: “alternative position” using: function(){} } |
{ my: “left top”, at: “left top”, of: window, offset: “100 200”} | object (supported by jQuery UI position() method) |
The code below demonstrates how the igDialog
can be positioned using object:
In JavaScript:
$("#dialog").igDialog({
position: { left: 100, top: 200 }
});
In C#:
<%= Html.Infragistics()
.Dialog()
.Position(100,200)
.Render()
%>
The code below demonstrates how the igDialog
can be positioned using specially defined objects supported by jQuery UI .position()
:
In JavaScript:
var dialogPosition = {
my: “left top”,
at: “left top”,
of: window,
offset: “100 200”
}
$("#dialog").igDialog({
position: dialogPosition
});
By default, the igDialog
window appears at the top of the page stack. Its default zIndex
value is 1000, which means if you don’t modify any other DOM elements with value higher than 1000, the dialog will appear at the top of the page. If you want to change this default value because you want to show the element over or underneath another element, you can do this by changing the zIndex
value.
The code below demonstrates how to change the zIndex
:
In JavaScript:
$("#dialog").igDialog({
zIndex: 1001
});
In C#:
<%= Html.Infragistics()
.Dialog()
.ZIndex(1001)
.Render()
%>
The following topics provide additional information related to this topic:
igDialog Overview: The topic introduces the user to the igDialog
control’s main features.
Adding igDialog: This topic demonstrates how to add the igDialog
control to a web page.
The following samples provide additional information related to this topic:
View on GitHub