asp中GridView如何只显示最新的一条数据
<asp:GridViewID="GridView1"runat="server"EmptyDataText="没有数据显示为空"AutoGenerateColumns=...
<asp:GridView ID="GridView1" runat="server" EmptyDataText="没有数据显示为空" AutoGenerateColumns="False" DataSourceID="SqlDataSource5"
Width="234px" PageSize="1" >
<Columns>
<asp:BoundField DataField="yuefen" HeaderText="月份" SortExpression="yuefen" />
<asp:BoundField DataField="nianfen" HeaderText="年份" SortExpression="nianfen" />
<asp:BoundField DataField="gongzi" HeaderText="工资" SortExpression="gongzi" />
</Columns>
<PagerSettings PageButtonCount="1" />
</asp:GridView> 展开
Width="234px" PageSize="1" >
<Columns>
<asp:BoundField DataField="yuefen" HeaderText="月份" SortExpression="yuefen" />
<asp:BoundField DataField="nianfen" HeaderText="年份" SortExpression="nianfen" />
<asp:BoundField DataField="gongzi" HeaderText="工资" SortExpression="gongzi" />
</Columns>
<PagerSettings PageButtonCount="1" />
</asp:GridView> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询