asp.net - Can i change alignment style of a particular column in asp grid that already has a default css style where columns where alligned left -


<asp:gridview id="reports" runat="server" autogeneratecolumns="false"      cssclass="datatable" enableviewstate ="true" llowpaging="true" allowsorting="true"      cellpadding="0" cellspacing="0" borderwidth="0" gridlines="none"      sortedascendingheaderstyle-cssclass="sortasc"      sorteddescendingheaderstyle-cssclass="sortdesc" sortedascendingcellstyle-cssclass="sortasc"                 sorteddescendingcellstyle-cssclass="sortdesc" pagesize="10"                                                         onpageindexchanging="gvreports_pageindexchanging">   

yes, can change alignment of templatecolumn in asp.net grid. see following code template column properties.

<asp:templatecolumn headertext="sr. no." itemstyle-width="4%" itemstyle-verticalalign="top"     itemstyle-horizontalalign="center" headerstyle-verticalalign="middle" headerstyle-horizontalalign="center"     headerstyle-cssclass="tablehead">   <itemtemplate>  </itemtemplate> </asp:templatecolumn> 

hope help..


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -