如何在Gridview中向左和剩下的列中显示第一列?
答案 0 :(得分:6)
尝试使用css
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.gridview tr td
{
text-align: right;
}
.gridview tr td:first-child
{
text-align: left;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" CssClass="gridview" runat="server">
</asp:GridView>
</div>
</form>
</body>
</html>
希望它有所帮助!!!