|
Rank: Newbie Groups: Member
Joined: 7/11/2009 Posts: 8
|
Dear Sir,
I try to bind datasource in VS2005 Datagrid and EO.Web Datagrid. Inside VS2005 Datagrid, I have 54 records, but I only see 53 Records in EO.Web Datagrid.
I do not sure where go wrong. But I wouldn't find the last record (54th) in EO.Web Datagrid. Thanks !!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I am not sure what can cause that, but as a test, you can modify your DataSource to return less rows and see EO.Web Grid still is one row less. For example, if your original SQL is "select * from items", you can use "select top 5 * from items" to reduce the number of row returned.
The other thing you want to check is the number of rows the Grid has after you populate the Grid in your code (for example, after Grid1.DataBind() call). You can set a break point there and then check Grid1.Items.Count to see if it has the correct value.
Please let us know how those test turns out.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/11/2009 Posts: 8
|
Hi,
Select Top 5 I can see all 5 Rows. But when I Query with my Datasource which is RecordCount=54, I can see only 53 Rows. But if I use ASP.NET origin Datagrid, I can see 54 Rows.
|
|
Rank: Newbie Groups: Member
Joined: 7/11/2009 Posts: 8
|
Hi,
If I Hide Horizontal Scoll Bar, I realize that I will short 1 Record. But if I put scroll bar = BOTH, then i will get full record. Is it a bug of the component ?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, We are not aware of such a bug. Try to bind the Grid to an empty array this way:
Code: C#
Grid1.DataSource = new object[54];
Grid1.DataBind();
Note you will need to clear your GridColumn's DataField to try this code. If the problem still occurs with this code, then the problem has nothing to do with your data. In that case you can create a test page, copy the Grid and above code in the page and verify whether the same problem occurs with the test page. If it does occur, post the page and we will take a look. If the page also rely on other files such as CSS file, please includes those files as well. If the problem occurs in your regular page but does not occur in your test page, then it mostly has to do with other elements in your page, most likely your CSS styles. Try to comment out those block by block and you should be able to quickly locate the offending part. If the problem only occurs when the Grid is bound to your data, then we will need to see the problem either through remote desktop or by running test app provided by you here but connecting to your database. We may eventually need a reproducing app from you in order to debug it at here. However this case is much less likely. Nevertheless please let us know if that’s the case so that we can go further from there. Thanks!
|
|