css - Gridview using html in ASP.NET -
i have doubt in gridview design can me. have created gridview, when im giving text grid cell grid design changing. question how give fixed height gridview if entering text 1 cell or no: of cells. , here code. thank in advance.
<asp:gridview id="grvschoolname1" runat="server" allowpaging="true" pagesize="4" height="30px" backcolor="white" bordercolor="#999999" borderstyle="solid" borderwidth="1px" cellpadding="3" gridlines="vertical" cssclass="grvclass" autogeneratecolumns="false" forecolor="black" onpageindexchanging="grvschoolname1_pageindexchanging"> <pagersettings mode="numericfirstlast" pagebuttoncount="4" firstpagetext="first" lastpagetext="last"/> <alternatingrowstyle backcolor="#cccccc" /> <columns> <asp:templatefield headertext="emergency alert" headerstyle-height="30px"> <itemtemplate> <div style="overflow:auto; height:60px;"> <asp:label id="label1" runat="server" text='<% #eval("alertmessage") %>' ></asp:label> </div> </itemtemplate> </asp:templatefield> </columns> <footerstyle backcolor="#cccccc" /> <headerstyle backcolor="black" font-bold="true" forecolor="white" /> <pagerstyle backcolor="#999999" forecolor="black" horizontalalign="center" /> <selectedrowstyle backcolor="#000099" font-bold="true" forecolor="white" /> <sortedascendingcellstyle backcolor="#f1f1f1" /> <sortedascendingheaderstyle backcolor="#808080" /> <sorteddescendingcellstyle backcolor="#cac9c9" /> <sorteddescendingheaderstyle backcolor="#383838" /> </asp:gridview> </div>
give css class itemstyle template. same works header :)
.net
<itemstyle cssclass="items"> </itemstyle> <itemtemplate> stuff </itemtemplate>
css.
.items{width:200px;}
Comments
Post a Comment