954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Set the size of a gridviewrow cell

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>
                                                            
                                                            <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

ssreevidya.m
Junior Poster in Training
51 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

you don't need the 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.

Cherryhomesj
Junior Poster in Training
58 posts since Sep 2011
Reputation Points: 30
Solved Threads: 17
 

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 tag.

ssreevidya.m
Junior Poster in Training
51 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: