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

Rebind gives error : 'There was a problem extracting DataKeyValues from the DataSource.' on Rebind

5 Answers 273 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 11 May 2011, 03:08 PM
Hi,

I am using a RadGrid with DetailTables.
I am using inline editing for each of my DetailTables.
I am able to perform Insert/Update operations. However, after the inert or update operation when I call Rebind on the RadGrid, I get the folowing error : There was a problem extracting DataKeyValues from the DataSource.
This message is displayed in Visual Studio in the catch block. However on the error page it says "

COLUMN_NAME is neither a DataColumn nor a DataRelation for table Table.

". I have data in my table. This error does not show up when the page loads normally. It only shows up when the Insert/Update event for the RadGrids DetailTable is fired.

Could someone provide a solution and tell me the reason why this is happening.

Thanks,

5 Answers, 1 is accepted

Sort by
0
Elliott
Top achievements
Rank 2
answered on 12 May 2011, 02:25 PM
perhaps you could use a NeedDataSource event handler and not try to refresh the grid yourself
0
Dennis
Top achievements
Rank 1
answered on 13 May 2011, 08:24 AM
Hi,

I have not called DataBind anywhere in my code to bind data to the RadGrid.
I have used the RadGrid's NeedDataSource and DetailTableDataBind events to bind the Top level table and the DetailTables with the DataTables. I had read so in one of teleriks postings that assigning the DataSource property null, then calling the Rebind on the RadGrid initiates the process of firing the NeedDataSource event. I need the NeedDataSource as well as the DetailTableDataBind events to be fired so that the data in the grid refreshes. I have tried not calling the Rebind on the RadGrid, but that results in absolutely no rows being displayed in the RadGrid, only the headers are shown.
0
Elliott
Top achievements
Rank 2
answered on 13 May 2011, 02:24 PM
hi David-I'm just a developer
perhaps if you post your code?  aspx and code behind?

do you have UniqueName="COLUMN_NAME" anywhere?

"when I call Rebind on the RadGrid, I get the folowing error" - what does this look like?
0
Maria Ilieva
Telerik team
answered on 18 May 2011, 01:09 PM
Hello David,

It will be very helpful if you could open a regular support ticket and send us sample runnable version of your application. Thus we will be able to debug it locally and do our best to isolate the root cause of the issue you are facing.

Kind regards,
Maria Ilieva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Roman
Top achievements
Rank 1
answered on 14 Mar 2017, 06:33 AM
Make sure you don't have any "nulls" in your datasource collection. That's what caused the issue in my case.
Tags
Grid
Asked by
Dennis
Top achievements
Rank 1
Answers by
Elliott
Top achievements
Rank 2
Dennis
Top achievements
Rank 1
Maria Ilieva
Telerik team
Roman
Top achievements
Rank 1
Share this question
or