在设计时添加的datagrid控件,在运行时看不到.
而项目中以前添加的datagrid控件,在运行时可以看到.

解决方案 »

  1.   

    什么怪问题?是不是什么地方把visible属性变成false了
      

  2.   

    加一句,datagrid.visible=true 也没用
      

  3.   

    帖出相关代码吧
    有无为你的datagrid数据绑定
      

  4.   

    新建一个web页面,添加的datagird控件也没用.
      

  5.   

    是不是DataGrid嵌套在Panel里啊,而Panel的visible属性为false?
    要是这样把Panel的visible属性改为true
      

  6.   

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If Session("user") <> Nothing Then
                If Not Page.IsPostBack Then
                    Dim OrderPercent As New Percent
                    OrderPercentDropDownList.DataSource = OrderPercent.GetPercent
                    OrderPercentDropDownList.DataBind()
                    Dim DBS As New DataBaseAccess
                    DBS.SetConn()
                    Dim Con As OracleConnection
                    Con = DBS.GetConn
                    Dim empid As String
                    empid = Session("empid")                NameAdapter.SelectCommand.Connection = Con
                    NameAdapter.SelectCommand.CommandText = NameAdapter.SelectCommand.CommandText & " where " & """Employ_id2""" & "='" & empid & "'"
                    Dim Ds As New DataSet
                    NameAdapter.Fill(Ds, "Name")                PuNameDropDownList.DataSource = Ds
                    PuNameDropDownList.DataMember = "Name"
                    PuNameDropDownList.DataTextField = "Name"
                    PuNameDropDownList.DataBind()                Dim FalseCondition As String
                    FalseCondition = " and 1 < 0 "
                    SetPurchaseView(FalseCondition)
                End If
            Else
                Server.Transfer("/crm/errormessage/accesserror.aspx")
            End If
      

  7.   

    是不是没有绑定数据?没有数据datagrid是看不到得~
      

  8.   

    1.是不是没有数据.
    2.是不是把datagrid中的在运行时自动创建列给勾掉了!