Gridview中二级联动

代码
  protected   void  drpZuoyedian_SelectedIndexChanged( object  sender, EventArgs e)
 {
        DropDownList drpZuoyedian 
=  (DropDownList)sender;
        GridViewRow gvData 
=  (GridViewRow)drpZuoyedian.NamingContainer;

        
string  zuoyedian  =  drpZuoyedian.SelectedValue;
        DropDownList drpXianbie 
=  (DropDownList)gvData.FindControl( " drpXianbie " );
        
string  sqlxianbie  =   " select * from pubXianbie where parent_id=' "   +  zuoyedian  +   " ' " ;
        Util.BindDropDownList(drpXianbie, sqlxianbie, 
" name " " id " );
 }

 

你可能感兴趣的:(GridView)