ASP .NET Data grid binding question.

Hi I have a data grid which I bind a data table of 8 rows to via setting the grid's datasource with a Databind() statement.

Problem is, during the data bound event for the grid there are only 5 grid arguments.  Can someone explain why this is and what could be causing the grid to drop the other 3 rows during processing?  Any steps in the right direction would be great.

kapes13Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chrisrbloomCommented:
did you check the pagesize of the gridview?

0
chrisrbloomCommented:
I am assuming you meant GridView rather than DataGrid (older .net control).


<asp:GridView ID="GridView1" runat="server" PageSize="10">
</asp:GridView>

Open in new window

0
kapes13Author Commented:
Nope, it's a DataGrid, as I looked in my ASPX source file, maybe I should use a Gridview?  Too much bouncing around to keep focus on these controls!
0
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

chrisrbloomCommented:
Depends on what version of .NET you are running.  GridView is the successor to DataGrid.

see this article:  http://msdn.microsoft.com/en-us/library/05yye6k9.aspx

Either way, both controls have the "PageSize" property you can set.
0
kapes13Author Commented:
Thanks for that, I might try a Gridview as used in other projects but can you bind a DataTable directly to the Gridview, thought I wrestled with that for a few but not sure.
0
chrisrbloomCommented:
Gridview is the replacement for DataGrid.

The GridView control can be bound to a data source control (such as the SqlDataSource control or ObjectDataSource control) or to any data source collection that implements the System.Collections.IEnumerable interface, such as System.Data.DataView, System.Collections.ArrayList, System.Collections.Generic.List(Of T), or other collection types.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kapes13Author Commented:
Well I have to rewrite all the custom columns for a GridView, so just going to stick to DataGrid for now and see about the binding array because of the data I have to pull into the custom controls at binding.  Just can't get why GridArguments has a different count than DataTable.  Probably something simple I overlooked.
0
kapes13Author Commented:
Paging manipulation does not help in this case.  I know it is the indexing, but I can't grasp what is going on in the DataGrid Arguments that limits the number of rows after I bound the DataTable to them, should be equal.

Have to come back to this tomorrow.  If anyone has any ideas or can post a sample (with custom columns in DataGrid) might knock this out.

Thanks.
0
kapes13Author Commented:
Okay I got back to this with an open mind and together with Chris taking time to assist and myself going over his materials I discovered that I could omit my bind event and allow the definition of my custom columns to receive the data directly during the DataBind.  All is well!  Moving on and thank you!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.