走路应该留下脚印

人生的代码我来书写

导航

Infragistics WebGrid 中列的WebCombo应用

      grd1.Columns.FromKey("WebCombo").Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDownList;
      grd1.Columns.FromKey(
"WebCombo").AllowUpdate = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes;
      
      
string strSQL = "Select Text,Value  from dbName  
      DataTable dt = SQL.ExecuteSQL_fill(strSQL);

      Infragistics.WebUI.UltraWebGrid.ValueList vl 
= new Infragistics.WebUI.UltraWebGrid.ValueList();
      vl.DataSource 
= dt;
      vl.DisplayMember 
= "Text";
      vl.ValueMember 
= "value";
      vl.DataBind();
      grd1.Columns.FromKey(
"WebCombo").ValueList = vl;

posted on 2008-02-28 11:06  wingfay  阅读(466)  评论(1编辑  收藏  举报