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
Post a Comment