datagrid页码自定义问题
各位高手:
我想在datagrid控件中实现页码自定义,就是在下拉列表框中选择一个数字后就可以定向到那一页,请问怎么实现啊?
------解决方案--------------------if(this.TextBox1.Text!= " ")
{
int SelCount=Convert.ToInt32(this.TextBox1.Text.Trim());
if(SelCount> 0 && SelCount <= DataGrid1.PageCount)
{
this.DataGrid1.CurrentPageIndex=SelCount-1;
this.BindDataGrid(ds);
lblCurrentIndex.Text = "第 " + this.TextBox1.Text.Trim() + " 页 ";
}
else
{
Response.Write( " <script language=javascript> alert( '输入的值必须大于0并且小于总页数!! ') </script> ");
}
}
else
{
Response.Write( " <script language=javascript> alert( '输入的值不能为空!! ') </script> ");
}