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

Bind Items in accordion

Hi,

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?



4 Replies

MA Manolo April 16, 2015 06:42 PM UTC

Any idea?

I like binding items in accordion with formview data for validations


MS Muralishankar Sundaram Syncfusion Team April 17, 2015 12:02 PM UTC

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



MA Manolo April 17, 2015 05:07 PM UTC

Hi,

Thank you for the example. it works fine


MS Muralishankar Sundaram Syncfusion Team April 20, 2015 01:12 PM UTC

Hi Manolo,

Thanks for your update,

Please let us know if you have further queries.

Regards,

Muralishankar


Loader.
Live Chat Icon For mobile
Up arrow icon