string arg;
arg=((LinkButton)sender).CommandArgument;
switch (arg)
{
case "first":
DataGrid1.CurrentPageIndex=0;
break;
case "pre":
if (DataGrid1.CurrentPageIndex!=0)
DataGrid1.CurrentPageIndex--;
break;
case "next":
if (DataGrid1.CurrentPageIndex<DataGrid1.PageCount-1)
DataGrid1.CurrentPageIndex++;
break;
case "last":
DataGrid1.CurrentPageIndex=DataGrid1.PageCount-1;
break;
}
showgrid();
arg=((LinkButton)sender).CommandArgument;
switch (arg)
{
case "first":
DataGrid1.CurrentPageIndex=0;
break;
case "pre":
if (DataGrid1.CurrentPageIndex!=0)
DataGrid1.CurrentPageIndex--;
break;
case "next":
if (DataGrid1.CurrentPageIndex<DataGrid1.PageCount-1)
DataGrid1.CurrentPageIndex++;
break;
case "last":
DataGrid1.CurrentPageIndex=DataGrid1.PageCount-1;
break;
}
showgrid();