在翻页事件中重新将要显示的内容绑定到DROPDOWNLIST

解决方案 »

  1.   

    private void DataGrid1_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
    {
    this.DataGrid1.CurrentPageIndex=e.NewPageIndex;
    for(int i=0;i<this.DataGrid1.Items.Count;i++)
    {
    DropDownList list=(DropDownList)DataGrid1.Items[i].FindControl("DropDownList1");
    list.DataSource=list_1;
    list.DataBind();
    }
    DataGrid1.DataSource=ds.Tables[0].DefaultView;
    DataGrid1.DataBind();
    //}
    }
    我绑了,可是还是!!!哎
      

  2.   

    应该是绑定DataGrid1后再绑定DropDownList吧