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

Rad.Rebind throwing error

1 Answer 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gopal
Top achievements
Rank 1
Gopal asked on 16 Jun 2013, 12:28 AM
Hi.  I have a Radgrid with a MasterTableView and 2 Detail Tables (total of 3 levels).  I have each GridTableView set to
HierarchyLoadMode="Client" and I am binding the tables in my code-behind.  I have an OnNeedDataSource method as well as an OnDetailTableDataBind method to do all the binding.  On the first page load, the grids/tables all bind correctly.  In the 3rd level detail table, I have a GridButtonColumn that will call a server-side RadGrid_Delete event that will remove that row from the data in the database.  I then want to refresh the entire RadGrid to show that the row was removed, which may affect the upper 2 levels if it was the last row removed.  So, at the end of the RadGrid_Delete event in the code-behind, I try calling the Rebind() method on my RadGrid.  Both the OnNeedDataSource and the OnDetailTableBind methods get fired and at the end of OnDetailTableBind event it is thowing error like "Cannot find the column [<column of parent table>]". When I refresh the browser, however, the data does refresh and the row is gone. 

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 19 Jun 2013, 11:55 AM
Hi,

Are you calling anywhere in your project the DataBind() method? If this is the case please remove the calls from your code and replace it with Rebind() method calls. Then check whether the issue still replicates.

If the issue still persist, please share your full page source code along with the code-behind file content. Thus all the people who want to help you will have better understanding of your code.

Regards,
Andrey
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Gopal
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or