Datagrid not displaying in apsx webpage

Discussion in 'ASP .Net Web Controls' started by .Net Sports, Jun 29, 2005.

  1. .Net Sports

    .Net Sports Guest

    I'm trying to display my datagrid (everything is named correctly in the
    datagrid headers), but when running , it doesnt show the datagrid on
    the aspx webpage:

    //////////

    //sql statements are on *this* line

    SqlCommand objCommand = new SqlCommand(strSQL, objConn);

    objConn.Open();
    SqlDataReader objReader = objCommand.ExecuteReader();


    // assign the DataReader object as the source

    // for the "dglvoff" grid


    // set the source of the data for the datagrid control and bind it


    dglvoff.DataSource = objReader;

    da = new SqlDataAdapter(strSQL, objConn);

    ds = new DataSet( );

    da.Fill(ds);

    dglvoff.DataSource = ds;

    dglvoff.DataBind();

    ///////////////
    ???
    ..netsports
     
    .Net Sports, Jun 29, 2005
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.