datagrid , SQL Reader and Paging... Datagrid disappears

Discussion in 'ASP .Net' started by Roger, Dec 28, 2004.

  1. Roger

    Roger Guest

    I have some code that uses a SQL Stored procedure to return some rows. I
    would then like to have these rows show up in a datagrid.

    sqlCmd = New SqlClient.SqlCommand("R_GetSiphonDetail", sCon)
    sqlCmd.CommandType = CommandType.StoredProcedure
    rdr = sqlCmd.ExecuteReader(CommandBehavior.Default)
    DataGrid1.DataSource = rdr
    DataGrid1.DataBind()

    This works just fine as long as I don't turn on paging.

    As soon as I check the paging option, then the grid will not show up at all.
    Why?????


    Thanks,

    Rog
    Roger, Dec 28, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    4,318
  2. Guilherme Grillo

    reader inside a reader

    Guilherme Grillo, Nov 7, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    525
    sloan
    Nov 7, 2007
  3. Leonard

    DataGrid Disappears After Paging

    Leonard, Aug 17, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    228
    Stevie_mac
    Aug 17, 2003
  4. Alan

    Paging problem in VS.Net - datagrid disappears

    Alan, Aug 31, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    133
  5. Pokkai Dokkai
    Replies:
    1
    Views:
    232
    Hassan Schroeder
    Mar 24, 2008
Loading...

Share This Page