Hai ,

I have a gridview containing datalist in it.In the datalist i placed 2 labels.
My problem is that the content of the datalist not placed within a gridview row cell.
The design and css used is:

                                            <asp:DataList ID="DlistItem" runat="server"  
                                                    <div class="datalisthead">
                                                        <div style="padding-left: 20px; padding-top: 1px;">
                                                            <asp:Label ID="LblStaff" runat="server" Text='<%#Bind("Class") %>'></asp:Label>
                                                            <br />
                                                            <asp:Label ID="LblSubject" runat="server" Text='<%#Bind("Subject_Name") %>'></asp:Label>

Thanks in advance,

Recommended Answers

All 2 Replies

you don't need the <td> tags inside an itemtemplate. The gridview's itemtemplate should generate them automatically. Not sure that is what is causing you're problem or not though. Maybe you could post a screenshot or something so we can better tell what it's doing.

Hai ,
Thank you for your replay.

I got it correctly when running the application after cleared the history and as you said i didnt used the <td> tag.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.