请问你的datagrid的visible的属性设置为true了吗?或者你有没有把datagrid放在别的控件内(该控件的visible?)?。我觉得一般不会看不见的。

解决方案 »

  1.   

    (C#、VB#、J#都试过了):
    也就不是控件的问题了。你的代码八成没有帮定数据源,或数据为空。
      

  2.   

    创建Web Application, 拖放DataGrid控件 to Web页面上...
    并DataBind(). 然后Start without Debugging,但Datagrid在web下就显示不出来,同时也不报错? 为什么?(C#、VB#、J#都试过了)
      

  3.   

    数据已Bind,datagrid的visible的属性也设置为true!
    其实就是在web页面上用DataGrid显示数据,没几句代码!public class Component1 extends System.ComponentModel.Component
    {
    private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
    private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
    private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
    private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
    private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
    private System.Data.SqlClient.SqlConnection sqlConnection1;
    /**
     * Required designer variable.
     */
    private System.ComponentModel.Container components = null; public Component1(System.ComponentModel.IContainer container)
    {
    // Required for Windows.Forms Class Composition Designer support
    container.Add(this);
    InitializeComponent(); //
    // TODO: Add any constructor code after InitializeComponent call
    //
    } public Component1()
    {
    // Required for Windows.Forms Class Composition Designer support
    InitializeComponent(); //
    // TODO: Add any constructor code after InitializeComponent call
    //
    } public void FillDataSet(myDataSet dSet)
    {
    sqlDataAdapter1.Fill(dSet);
    }----------------------------------public class WebForm1 extends System.Web.UI.Page
    {
    protected mywebform.myDataSet myDataSet1;
    protected System.Web.UI.WebControls.DataGrid DataGrid1; protected Component1 myComponent = new Component1(); private void Page_Load(System.Object sender, System.EventArgs e)
    {
    // Put user code to initialize the page here
    if (! get_IsPostBack())
    {
    myComponent.FillDataSet(myDataSet1);
    DataGrid1.DataBind();
    }
    } protected void OnInit(System.EventArgs e)
    {
    //
    // CODEGEN: This call is required by the ASP.NET Web Form Designer. Donot remove this.
    //
    InitializeComponent();
    super.OnInit(e);
    }
      

  4.   

    datagrid的datasource是不是没结果?????
      

  5.   

    if (! get_IsPostBack())
    {
      myComponent.FillDataSet(myDataSet1);
      DataGrid1.DataBind();
    }好像错了!
      

  6.   

    myComponent.FillDataSet(myDataSet1);  DataGrid1.DataSourse=......?
      DataGrid1.DataBind();
      

  7.   

    检查IIS和.NET的一致性。要保证IIS事先安装,或者使用FrameWork Repair.