Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo

  Windows Forms datagrid won't show more than 255 rows. (Friday, October 08, 2004)




Found the following interesting discussion in the Newsgroups:

Windows Forms datagrid won't show more than 255 rows.
by:Ken Dopierala Jr.

Hi,

I'm filling a datagrid from a dataset but only the first 255 rows in the
dataset show up in the grid. Is there a 255 row limit on the datagrid?
I've searched the properties but can't find anything that would limit it to
255. Is paging the only workaround? Thanks! Ken.


 Reply:
by:Cor Ligthert

 Hi Ken,

I tried this.

\\ Dim dt As New DataTable
Dim dc As New DataColumn
dt.Columns.Add(dc)
For i As Integer = 0 To 300
dt.Rows.Add(dt.NewRow)
dt.Rows(i)(0) = i.ToString
Next
DataGrid1.DataSource = dt
//

That gives a datagrid with 301 rows from 0 to 300.

I hope this helps anyway,

Cor


 Reply:
by:One Handed Man \( OHM#\)

 Are you sure that your bound source has more than 255 rows in it ?

OHM


 Reply:
by:Cor Ligthert

 Hi OHM,

Good to see you, Armin is also active again.

I am not that greath datagrid expert, however when he is always away, step
by step I become that give me a hint?

Cor


 Reply:
by:hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])

 
"Post code!"

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>








0 Comments:

Post a Comment

 
Previous Posts
    - How to create an About Dialog
    - equivalent of a Session variable in Windows Forms?...
    - Webbrowser and Fake filename into the IMG src attr...
    - How to send Crystal Reports report by email
    - Hiding a form's Close ControlBox button
    - How to Deactivate all MDI child forms
    - Typed dataset and the grid control
    - About Events in datagrid and SelectedIndexChanged
    - How to get SQL Server Timestamp value
    - How to disable F1 Thru F12

Archives
    - 10/03/2004 - 10/10/2004
    - 10/10/2004 - 10/17/2004
    - 10/17/2004 - 10/24/2004
    - 10/24/2004 - 10/31/2004
    - 10/31/2004 - 11/07/2004
    - 11/21/2004 - 11/28/2004
    - 11/28/2004 - 12/05/2004
    - 12/05/2004 - 12/12/2004
    - 12/12/2004 - 12/19/2004
    - 12/19/2004 - 12/26/2004
    - 12/26/2004 - 01/02/2005
    - 01/23/2005 - 01/30/2005
    - 01/01/2006 - 01/08/2006
    - 09/24/2006 - 10/01/2006

Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland