Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Add Client Side Item in WebDropDown Template
posted

Hi,

I am using a WebDropDown with a custom table template.

I just want to add a new template item at cliet side using javascript or jQuery.

Please suggest.

My aspx page code given below :

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<ig:WebDropDown ID="ddlOrder" runat="server" Width="100%" DisplayMode

="DropDown"

 

 

DataSourceID="SqlDataSourceOrder" DropDownContainerHeight="300px" EnableClosingDropDownOnBlur

="true"

 

 

EnableClosingDropDownOnSelect="true" EnableLoadOnDemand="true" EnablePersistingCustomValues

="true"

 

 

PageSize="200" EnableAutoFiltering="Server" AutoFilterQueryType="Contains" EnableAutoCompleteFirstMatch

="false"

 

 

CurrentValue="" TextField="Search" ValueField

="OrderID">

 

 

<HeaderTemplate

>

 

 

<table width="100%" cellpadding="0" cellspacing

="1"

 

 

border="0"

>

 

 

<tr class

='clsHeaderDate'>

 

 

<td width

="20%">

 

 

<asp:Label ID="LBL_194_1" ToolTip="0" runat="server">Article Code</asp:Label></td

>

 

 

<td width

="20%">

 

 

<asp:Label ID="LBL_195_1" ToolTip="0" runat="server">Article Name</asp:Label></td

>

 

 

<td width

="20%">

 

 

<asp:Label ID="LBL_197_1" ToolTip="0" runat="server">Buyer Ref.</asp:Label></td

>

 

 

<td width

="20%">

 

 

<asp:Label ID="LBL_413_1" ToolTip="0" runat="server">Purchase Order No.</asp:Label></td

>

 

 

<td width

="20%">

 

 

<asp:Label ID="LBL_238_1" ToolTip="0" runat="server">Delivery Date</asp:Label></td>

 

 

</tr

>

 

 

</table

>

 

 

</HeaderTemplate

>

 

 

<ItemTemplate

>

 

 

<table style="width: 100%; border-collapse:collapse" cellspacing="1" cellpadding="0" border

="0">

 

 

<tr class="clsRowDataLabel" height

="25">

 

 

<td width

="20%">

<%

 

#DataBinder.Eval(Container.DataItem, "ArticleCode"

)%>

 

 

</td

>

 

 

<td width

="20%">

<%

 

#DataBinder.Eval(Container.DataItem, "ArticleName"

)%>

 

 

</td

>

 

 

<td width

="20%">

<%

 

#DataBinder.Eval(Container.DataItem, "BuyerReference"

)%>

 

 

</td

>

 

 

<td width

="20%">

<%

 

#DataBinder.Eval(Container.DataItem, "PONum"

)%>

 

 

</td

>

 

 

<td width

="20%">

<%

 

#DataBinder.Eval(Container.DataItem, "DeliveryDate"

)%>

 

 

</td>

 

 

<td style

="display: none">

<%

 

#DataBinder.Eval(Container.DataItem, "Search"

)%>

 

 

</td>

 

 

<td style

="display: none">

<%

 

#DataBinder.Eval(Container.DataItem, "OrderID"

)%>

 

 

</td>

 

 

</tr

>

 

 

</table

>

 

 

</ItemTemplate

>

 

 

<ClientEvents DropDownClosed

="dllSelectionChange"/>

 

 

</ig:WebDropDown

>

Parents
  • 49378
    posted

    Hi wfx,

    Thank you for posting in the community.

    If your requirement is to add a new row in the templated table inside an item's container, this can be achieved by accessing the dropdown item's element, for istance:

     ig_controls.WebDropDown1.get_items().getItem(0).get_element().children[0].insertRow(0).insertCell(0).textContent = 'This is a new cell in a new row';

    More information and instructions on how to add items in WebDropDown client-side may be found at:

    http://blogs.infragistics.com/forums/p/27710/253640.aspx

    Please let me know if this helps.

Reply Children