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

Grid/Editing/Dialog Editing - without DropDownListItem - default Dialog Mode and Template Mode

Hi

Without  select DropDownListItem ( without  DropDownListItem ) how to set (Edit Mode)  default  - open  Dialog  Mode or Template Mode 

Thanks

Pratheep


5 Replies

AS Alan Sangeeth S Syncfusion Team August 19, 2015 06:40 AM UTC

Hi Pratheep,

Thanks for using Syncfusion products.

We suspect that you have been saying about the DropdownList in the below Online Sample Browser that we have used to switch between Dialog and DialogTemplate EditMode.

http://asp.syncfusion.com/demos/web/grid/dialogonlocaldata.aspx

At initial rendering,  you can set EditMode using Grid EditSettings Property. Please refer the following code snippets.

<%--For Dialog Edit Mode--%>


<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" >


<EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True" EditMode="Dialog”></EditSettings>

               

</ej:Grid>




<%--For DialogTemplate Edit Mode--%>

<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" >


<EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True" EditMode="DialogTemplate” DialogEditorTemplateID="template"></EditSettings>

               

</ej:Grid>



<script type="text/template" id="template">

        <b>Order Details</b>

        <table cellspacing="10">

            <tr>

                <td style="text-align: right;">Order ID

                </td>


</script>




If you need to switch EditMode after Grid renders, you can use Grid option method. Please refer the following code snippets

<%--For Dialog Edit Mode--%>

$('#GridID').ejGrid("option", { "editSettings": { editMode: "dialog" } });




<%--For Dialog Edit Mode--%>

$('#GridID').ejGrid("option", { "editSettings": { editMode: "dialogtemplate", dialogEditorTemplateID: "#template" } });




Note: For DialogTempate EditMode we need to set value for DialogEditorTemplateID also.

If we misunderstood your requirement then please get back to us more information so that we could provide you a response as early as possible.

Please let us know if you need any further assistance.

Regards,
Alan Sangeeth S


PR Pratheep replied to Pratheep August 19, 2015 11:30 AM UTC

Hi

Without  select DropDownListItem ( without  DropDownListItem ) how to set (Edit Mode)  default  - open  Dialog  Mode or Template Mode 

Thanks

Pratheep


Hi  

Thank you for your replay ( i'm looking same out put what your guess)

I changed the code EditSettings Property 

<EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True"EditMode="DialogTemplate" DialogEditorTemplateID="template"></EditSettings>

but edit or add new record - dialog box showing only  header part  without showing table  content 

Please find the attachment 

Thanks
Pratheep

Attachment: Dialog_Editing_f3425229.rar


AS Alan Sangeeth S Syncfusion Team August 20, 2015 05:07 AM UTC

Hi Pratheep,

The DialogEditorTemplateID Grid EditSettings property should contain template name followed by id selector “#”. Please refer the following code snippets.

<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" >


<EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True"EditMode="DialogTemplate” DialogEditorTemplateID="#template"></EditSettings>

                

</ej:Grid>




In the previous update, we have missed to include the # tag in the code snippets and we are sorry for the inconvenience caused.

We have modified your sample and the same can be downloaded from below link.

Sample: http://www.syncfusion.com/downloads/support/forum/119960/ze/Dialog_Editing43994114

Please refer the following documentation for further reference.

http://help.syncfusion.com/ug/aspnet/Documents/dialogtemplateediting.htm

Please let us know if you need any further assistance.

Regards,
Alan Sangeeth S


PR Pratheep August 20, 2015 02:23 PM UTC

Hi

Thanks,now working fine 


Regards
Pratheep


AS Alan Sangeeth S Syncfusion Team August 21, 2015 05:04 AM UTC

Hi Pratheep,

Thanks for the update.

Please let us know if you need any further assistance. We will be happy to assist you.

Regards,
Alan Sangeeth S

Loader.
Live Chat Icon For mobile
Up arrow icon