gridview repeating tag

R8VI
R8VI used Ask the Experts™
on
Hi,

I have a nested gridview, in which the grid inside displays images. I have used the jquery from the link this link http://galleria.aino.se/

I want the jquery to be repearted everytime a picture happens in the inside grid but for some reason the jquery tage only get picked up once.

The jquery tag is <div id="galleria">

Please help

Thanks,

R8VI
<asp:GridView ID="GridViewOutside" runat="server" DataSourceID="SqlDataSource6" AutoGenerateColumns="false"
                    OnRowDataBound="gridviewoutside_RowDataBound">
                    <Columns>
                        <asp:TemplateField HeaderText="Y">
                            <ItemTemplate>
                                <asp:Label ID="lblDescription" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Y") %>'>></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <div id="galleria">
                                    <asp:GridView ID="InsideGridView" runat="server" AutoGenerateColumns="false" DataSourceID="SqlDataSource7">
                                        <Columns>
                                            <asp:TemplateField HeaderText="Picture">
                                                <ItemTemplate>
                                                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# DataBinder.Eval(Container, "DataItem.Name") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
R8VI,

Can you send me the page source of the rendered page? This will help me identify what tag is rendered by the gridview control.

Thanks,

Marc

Author

Commented:
Hi,

Please see attached file

Thanks,

r8VI
Test-Wizard.txt
r8VI,

I believe if you put  the attribute runat="server" on that "div" tag it will create unique id for each instance.
Otherwise you could replace the "div" tag with an "asp:Panel" tag and for sure the Id generated will be unique.

Let me know,

Marc

Author

Commented:
hi Marc,

Thanks for the help so i put div runt=server
but i think this still causes a problem as know the id is galleria + clientid i think the client id goes before.
I have attached the source file again for your reference.

I am assuming that if i put update panel the same problem will occur

please help

Thanks,

R8vi
Test-Wizard.txt
Amit TripathiSharePoint Architect

Commented:
just do one thing change your select query...
lIke Select '<div> ' + ColumnName +'</dv>' as colname now bind the column with any of the label control..
check this .. Idea..

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial