- Home
- Forum
- ASP.NET Web Forms
- Bind Items in accordion
Bind Items in accordion
I want bind items inside accordion
<asp:FormView runat="server" ID="formEditNNPP" DataKeyNames="IdNNPP" ItemType="Web_NNPP.Modelos.Datos.NNPP" DefaultMode="Edit"
SelectMethod="GetNNPP" UpdateMethod="formEditNNPP_UpdateItem">
<EditItemTemplate>
<asp:TextBox runat="server" ID="TextBox1" Text="<%# BindItem.Proyecto %> %>" />--%>
<ej:Accordion ID="Accordion" runat="server" >
<Items>
<ej:AccordionItem Text="Bloque Inicial">
<ContentSection>
<div>
<label>Proyecto</label>
<asp:TextBox runat="server" ID="txtProyecto" Text="<%# BindItem.Proyecto %>" />
</div>
</ContentSection>
</ej:AccordionItem>
</Items>
</ej:Accordion>
</EditItemTemplate>
</asp:FormView>
In the first textBox I cand do binding, but inside accordion I get an error
I need set over 50 controls to binding inside different accordion items
How can I do it?
I like binding items in accordion with formview data for validations
Hi Manolo,
Thanks for using Syncfusion Products,
As per your use case scenario, In order bind the FormView data inside the Accordion control, we suggest you to render the Accordion control in client-side, please refer the below code snippet:
[ASPX]
<code>
<asp:FormView ID="test" runat="server" SelectMethod="GetData" ItemType="DatePickerNull.Data" RenderOuterTable="false">
<ItemTemplate>
<div id="basicAccordion" style="width: 400px">
<h3>
<a rel='nofollow' href="#">Sample</a></h3>
<div>
<ej:DatePicker ID="one" runat="server" Value="<%# BindItem.Date %>"></ej:DatePicker>
<asp:TextBox runat="server" ID="txtProyecto" Text="<%# BindItem.Date %>" />
</div>
</div>
</ItemTemplate>
</asp:FormView>
<script>
$("#basicAccordion").ejAccordion();
</script>
</code>
In order to get more information about the EJ Accordion control please refer the below mentioned UG Documentation:
http://help.syncfusion.com/ug/js/Documents/createyourfirstaccordioninjavascript.htm
We have prepared the accordion sample and attached it in bellow:
http://www.syncfusion.com/downloads/support/forum/118845/Accordion-526480138.zip
Please let us know if you have any other queries.
Regards,
Muralishankar
Thank you for the example. it works fine
Hi Manolo,
Thanks for your update,
Please let us know if you have further queries.
Regards,
Muralishankar
- 4 Replies
- 2 Participants
-
MA Manolo
- Apr 15, 2015 08:17 AM UTC
- Apr 20, 2015 01:12 PM UTC