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.
Unfortunately, activation email could not send to your email. Please try again.

How to Rendering TreeView inside DropDownList within a Dialog Template

Thread ID:

Created:

Updated:

Platform:

Replies:

120817 Oct 18,2015 09:31 AM May 2,2016 09:16 AM ASP.NET Web Forms 5
loading
Tags: DropDownList
Mohammad Helal
Asked On October 18, 2015 09:31 AM

Hi Syncfusion Support Team,

I have a problem with rendering a TreeView inside DropDownList within a Dialoge Template for ejGrid control, the problem is that there is nothing happened?

this is my dialog template:
<script type="text/template" id="specialDayTemplate">
        <table cellspacing="10" dir="rtl">
          
            <tr>
             
                <td style="text-align: right">
                    <ej:DropDownList ID="ddlDepts2" ClientIDMode="Static" runat="server" DataValueField="DEPTID" Width="150px"
                        WatermarkText="-- إختر القسم --" EnableRTL="true"
                        OnPreRender="ddlDepts2_PreRender">
                        <Items>
                            <ej:DropDownListItem>
                                <ContentTemplate>
                                    <ej:TreeView ID="tvDepts2" ClientIDMode="Static" runat="server" DataTextField="DEPTNAME"
                                        DataIdField="DEPTID" DataParentIdField="SUPDEPTID"
                                        EnableRTL="true"
                                        ClientSideOnNodeExpanded="checkScroll"
                                        ClientSideOnNodeCollapsed="checkScroll">
                                    </ej:TreeView>
                                </ContentTemplate>
                            </ej:DropDownListItem>
                        </Items>
                    </ej:DropDownList>


                </td>
            </tr>
          </table>
</script>


Please help me on that!!

Regards,
M Helal


Ezhil S [Syncfusion]
Replied On October 19, 2015 08:58 AM

Hi Helal,

 

Thank you for contacting Syncfusion support.

 

In order to use Syncfusion control inside script template, we suggest you to render the control from script so that the control will be rendered in Dialog Template. We have prepared sample as per your requirement to add DropDownList with TreeView in Grid Dialog template.

For your reference check the following demo link: http://asp.syncfusion.com/demos/web/grid/dialogonlocaldata.aspx

Sample download link: http://www.syncfusion.com/downloads/support/forum/120817/ze/DialogTempGrid_f120817-1401503078

 

Please let us know if you have any other queries.

 

Regards,

Ezhil S


Mohammad Helal
Replied On October 20, 2015 03:59 AM

Thank you so much, this helped me a lot.


Ezhil S [Syncfusion]
Replied On October 21, 2015 12:12 AM

Hi Helal,

Thanks for your update.

We are glad that our solution helped you to resolve the issue at your end.

Let us know if you need further assistance.

Regards,
Ezhil S

mohammed shdaifat
Replied On May 1, 2016 09:15 AM

Hi Syncfusion Support Team,

i have a proplem in DropDownList  when i used it with treeview template  i used same demo code  , in part of demo code i should override following methods:
   ej.DropDownList.prototype._OnMouseClick = function (e) { }
            ej.DropDownList.prototype._OnMouseEnter = function (e) { }
            ej.DropDownList.prototype._OnMouseLeave = function (e) { }
            ej.DropDownList.prototype._OnKeyUp = function (e) { }
            ej.DropDownList.prototype._OnKeyDown = function (e) { }
after  that all DropDownList  in my application cannot be selected.
please is there any other way to resolve this issue.
regards,
mohammed al shdaifat

Prince Oliver [Syncfusion]
Replied On May 2, 2016 09:16 AM

Hi Mohammed,   
  
Thanks for your update.   
  
When you override the dropdown source methods it will affect the every dropdownlist in the page, so you need to copy the source methods to be overridden in variables and override the methods and when creating dropdownlist without treeview again override the methods to its default by the variables. We have attached a sample for your convenience   
  
Refer to the following link for sample:   
  
Regards,   
Prince   


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;