asp.net,如何在后台代码对其中一列的数据进行绑定?数据是dataset中的数据

解决方案 »

  1.   

    DataGrid1.DataSource=DataSet1.DefaultView;
    DataGrid1.DataBind();
      

  2.   

    为什么是一列?直接
    DataGrid1.DataSource=DataSet1.DefaultView;
    DataGrid1.DataBind();
    不好吗?
      

  3.   

    为什么是一列?直接
    DataGrid1.DataSource=DataSet1.DefaultView;
    DataGrid1.DataBind();
    不好吗?
      

  4.   

    dim str as stringstr=dataset.Tables().Item(0).Rows(0)(0) 绑定第一列
      

  5.   

    用itembond可以改变Public Sub dgList_ItemDataBound(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs)
     If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
               
                '---  判断工作进度
                If e.Item.Cells(0).Text = 10 Then
                    If e.Item.Cells(7).Text = “b” Then
                        e.Item.Cells(5).Text = “mmm”
                    End If