This is a migrated thread and some comments may be shown as answers.

Missing column Issue with RadGridView when bounded to a DataSource

1 Answer 60 Views
GridView
This is a migrated thread and some comments may be shown as answers.
dnguyen
Top achievements
Rank 1
dnguyen asked on 23 May 2014, 04:15 PM
Hi,

I bind the datasource of RadGridView to a datatable.
The datatable only contains 2 rows but 260 columns.

The problem is that a column is missing in the ui grid.
 
I used the steb by steb debugger to watch values :

dt = GetData(); //dt contains 260 columns
RadGrid.DataSource = dt; //RadGrid.DataSource contains 260 columns

BUT!!!  RadGrid.DataSource.Columns contains 259 columns!!!

What's wrong?


Thank you,

Kind Regards.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 May 2014, 07:36 AM
Hello Duy,

As we informed you in the support ticket you submitted regarding the same matter, please note that the Columns collection is zero-based, hence if you are checking the index of the last column, it will be 259. Instead, you can use the Count property of the collection, which will show the correct amount of columns.

If you continue experiencing issues, please provide us with a sample where we can reproduce it and we will gladly investigate it.

Looking forward to your reply.

Regards,
Stefan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
dnguyen
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or