function openDialog(args) {
$("#AdminContent_dialog").ejDialog("open");
$("#AdminContent_dialog_lblID").text(args.data["StId"]);
$("#AdminContent_dialog_txtStatName").val(args.data["RoomStatus"]);
var colorObj = $("#AdminContent_dialog_ColoRicker").ejColorPicker().data("ejColorPicker");
colorObj.setValue(args.data["StatusColor"]);
}
[aspx]
<div id="content">
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="false" AllowSelection="true" Selectiontype="Single">
<ClientSideEvents RowSelected="rowSelected" />
<SelectionSettings SelectionMode="row" />
<Columns>
<ej:Column Field="StId" />
<ej:Column Field="RoomStatus" />
<ej:Column Field="StatusColor" />
</Columns>
</ej:Grid>
<ej:Dialog ID="basicDialog" runat="server" Title="Dialog" ShowOnInit="false" Target="#content">
<DialogContent>
<asp:Label ID="label" runat="server"></asp:Label>
<asp:TextBox ID="textbox" runat="server"></asp:TextBox>
<ej:ColorPicker ID="colorpicker" runat="server"></ej:ColorPicker>
</DialogContent>
</ej:Dialog>
</div>
[script]
function rowSelected(args) {
var dialogObj = $("#<%=basicDialog.ClientID%>").data("ejDialog");
dialogObj.open();
$("#MainContent_basicDialog_label").text(args.data["StId"]);
$("#MainContent_basicDialog_textbox").val(args.data["RoomStatus"]);
var colorObj = $("#<%=colorpicker.ClientID%>").data("ejColorPicker");
colorObj.setValue(args.data["StatusColor"]);
} |
Hi Selvamani
Again my fault, writing name of target i forgot add "#" to the name. - Target="target" instead Target="#target".
Thank You