私はasp.net webformにgridviewを持っています。allowPaging = trueのときのgridviewのエラー
私はこのようにGridViewに私のデータベースをバインドします
SQL = "SELECT id,Fname,Lname FROM MEN";
dsView = new DataSet();
adp = new SqlDataAdapter(SQL, Conn);
adp.Fill(dsView, "MEN");
adp.Dispose();
GridView1.DataSource = dsView.Tables[0].DefaultView;
GridView1.DataBind();
と私はGridViewの中に入れ、この:allowPaging = true
をそのグリッド内のデータを示し、しかし、私は2ページ目に押すと... 3 ..
と私は、このエラーました:事前に
The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.
おかげで
感謝!!私はそれを試してエラーはないが、次の10 ... 20 ....レコードを表示する方法? – Gali
あなたが投稿したコードは、データバインディングを行います。これをメソッドに入れ、イベントで呼び出します。 – kd7
私はこれを試してみます - しかし、私は同じレコードを参照してください次の10..20 ..ないレコード – Gali