How many records will a datagrid display?

I have an Access DB (backend) with 200 records in it. Then I have a form w/ a datagrid that loads the dataset when the form loads. The problem is that only 100 or so records are filled into the datagrid. I have a label assigned to a record count, it shows the correct number or records in the DB. Why aren't all the records being loaded into the datagrid? Someone please advise........

Comments

  • : I have an Access DB (backend) with 200 records in it. Then I have a form w/ a datagrid that loads the dataset when the form loads. The problem is that only 100 or so records are filled into the datagrid. I have a label assigned to a record count, it shows the correct number or records in the DB. Why aren't all the records being loaded into the datagrid? Someone please advise........
    :

    maybe increase the PageSize property.
  • : : I have an Access DB (backend) with 200 records in it. Then I have a form w/ a datagrid that loads the dataset when the form loads. The problem is that only 100 or so records are filled into the datagrid. I have a label assigned to a record count, it shows the correct number or records in the DB. Why aren't all the records being loaded into the datagrid? Someone please advise........
    : :
    :
    : maybe increase the PageSize property.
    :
    Here's some more info:

    I just read on MSDN that there really arn't any limits on the number of rows a datagrid can display. I am not using any filtering in the SELECT stmt. In fact I am using all the columns in a datatable. Its pretty weird. I open my database and all the records are there, but all of them aren't being displayed in the datagrid. Here's how I have it set up:

    Datagrid --> binded to a datasource (Ds.mytable)
    Then I use the form's load event to fill the datagrid.

    Another weird note: I have enabled an UPDATE button on the form (w/ the datagird). I scroll down to the first empty row (ID 200 or so). I then enter information, hit update. After I check my Db the new record is there! But when I open the form w/ the datagrid it isn't!! What's going on?



  • : : : I have an Access DB (backend) with 200 records in it. Then I have a form w/ a datagrid that loads the dataset when the form loads. The problem is that only 100 or so records are filled into the datagrid. I have a label assigned to a record count, it shows the correct number or records in the DB. Why aren't all the records being loaded into the datagrid? Someone please advise........
    : : :
    : :
    : : maybe increase the PageSize property.
    : :
    : Here's some more info:
    :
    : I just read on MSDN that there really arn't any limits on the number of rows a datagrid can display. I am not using any filtering in the SELECT stmt. In fact I am using all the columns in a datatable. Its pretty weird. I open my database and all the records are there, but all of them aren't being displayed in the datagrid. Here's how I have it set up:
    :
    : Datagrid --> binded to a datasource (Ds.mytable)
    : Then I use the form's load event to fill the datagrid.
    :
    : Another weird note: I have enabled an UPDATE button on the form (w/ the datagird). I scroll down to the first empty row (ID 200 or so). I then enter information, hit update. After I check my Db the new record is there! But when I open the form w/ the datagrid it isn't!! What's going on?
    :
    :
    :
    :

    Everytime u make changes to the datagrid u must call the datagrids DataBind method after the changes. Here is the typical pattern.


    [code]
    Private Sub Page_Load(ByVal s As Object, ByVal e As EventArgs)
    If Not Page.IsPostBack Then
    Call BindDataGrid()
    End If
    End Sub

    Private Sub BindDataGrid()
    ' Lets Assume GetData returns a data source
    with dgrdSomeDataGrid
    .DataSource = GetData()
    .DataBind
    End With
    End Sub

    Private Sub Update()
    ' CODE TO UPDATE DATASOURCE
    Call BindDataGrid()
    End Sub
    [/code]






  • Thanks for the replies! I resolved the problem. It was a poorly excuted SQL stmt. Thanks again!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories