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

Issue if Datasource for Radgrid is null

1 Answer 173 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sushma lochab
Top achievements
Rank 1
sushma lochab asked on 28 Apr 2010, 12:10 PM
We have a control having a Radgrid. Dataset is provided to this grid from page. In some scenario, we are not able to provide dataset to the grid. In that case we are getting follwoing error:
this.ColGroup.Cols is null or not an object.
This error also occurs when there are no columns in the datasource.

In case when Datasource is null we have set it to:

wgEntityList.DataSource =

new Object[0];

 


But still we are facing this issue.

Also we are not able to place this control multiple times on our page because one page can not have multiple RadAjaxManagers.
Please help in this regard.

Thanks,
Sushma

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 03 May 2010, 09:11 AM
Hello Sushma,

When RadGrid requests its data source you must supply at least the structure of this data source, i.e the definition of the columns in your case. This is due to the fact that RadGrid is already bound and if there is any command triggered that requires Rebind, the control will need same data source to handle properly this command.

Best wishes,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
sushma lochab
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or