We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Dialog setValue In ColorPicker

I have created a nice ejDialog i have put an asp: Label, asp:TextBox and ejColorPicker when selecting a row of grid it appears me a lovely ejDialog with the data of the row, but when I want to save changes in the controls there is no data, ok , Null Value
But when I add terget to ejDialog I can not setValue to ColorPicker.

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"]);

}


3 Replies

SS Selvamani Sankarappan Syncfusion Team August 14, 2017 09:06 AM UTC

Hi Tomasz, 
 
Thanks for contacting Syncfusion support. 
 
We have checked your requirement and we were unable to reproduce the reported issue at our end while using the target of dialog. Please refer to the following sample: 
 
[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"]); 
        } 
 
We have prepared the sample based on your requirement. Please refer to the following sample: 
 
If the above does not meet your requirement, kindly share modified sample based on your application to check and provide an appropriate solution at the earliest. 
 
Regards, 
 
Selvamani S. 



TO Tomasz August 14, 2017 09:26 AM UTC

Hi Selvamani

Again my fault, writing name of target i forgot add "#" to the name. - Target="target" instead Target="#target".
Thank You



SS Selvamani Sankarappan Syncfusion Team August 15, 2017 06:20 AM UTC

Hi Tomasz, 
 
Thanks for the update. 
 
Let us know if you need any further assistance. 
 
Regards, 
 
Selvamani S. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon