0

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:

<ItemTemplate>                                                            
                                        <td>
                                            <asp:DataList ID="DlistItem" runat="server"  
                                                RepeatDirection="Horizontal">
                                                <ItemTemplate>
                                                    <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>
                                                        </div>
                                                    </div>
                                                </ItemTemplate>
                                            </asp:DataList>
                                        </td>                                   
                            </ItemTemplate>
.datalisthead
{
	width:150px;
	height:auto;
	border-right:1px;
	border-right-color:Black;
	border-right-style:solid;
}

Thanks in advance,
Sreevidya

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by ssreevidya.m
0

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.

0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.