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

Problem in binding detail table

3 Answers 99 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John John
Top achievements
Rank 1
John John asked on 03 Nov 2009, 01:16 PM
Hi
          I am facing the problem in binding the detail table which is under nested view grid.
I used RadGrid1_preRender event to bind the nestedview grid. But the problem arised during  i called the Nested grid's 

 

'DetailTableDataBind' event it goes againg to 'RadGrid1_preRender' event and bind the nested grid again, so as a result i could not see the detail table data after i expanding the nested grid row.

Please guide me at what solution help to overcome this problem

-Thanks

3 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 06 Nov 2009, 06:45 AM
Hello John,

I think PreRender is a little to late to bind your detail tables. RadGrid's DetailTableDataBind event should successfully bind all your detail tables whenever needed.

Sincerely yours,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
John John
Top achievements
Rank 1
answered on 06 Nov 2009, 07:20 AM
Hi Veli..
             I havn't been used pre-render event to bind the detail table which is inside the nested grid. I used pre-render to bind the NestedViewTemplate grid which is inside the Grid and DetailTableBind event to bind the detail table which is inside Nested Grid.

The detail table is binding perfectly i can justify it, but i am not able to view the data when i expanding the Nested Grid. The issue occures i hope the time i expand the nested grid to view the detail table data it fires the pre-render event and bind the nested view grid again. So that due to this i am not able to view the detail table beacuse of nested grid binding.

My Grid structure is follows:
 
         Parent Grid --> Used NeedDataSource to bind the grid

                        Nesteted Grid --> Used parent grid's Pre-render to bind

                                    Detail Table --> Used nested grid's DetailTableBind to bind                                                                           

So which event or code would be more helpful to bind and view whole datas without issue.

-Thanks
0
Accepted
Veli
Telerik team
answered on 09 Nov 2009, 04:39 PM
Hello John,

Try the following approach:

1. Define OnNeedDataSource event handlers for both the parent and the nested grid
2. Define OnDetailTableDataBind event handler for nested grid, as it contains child tables
3. Define OnItemCommand event handler for parent grid, as we will be rebinding the nested grid when the parent item is expanded.

I have attached a sample project you can run. The approach is demonstrated there.

Sincerely yours,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
John John
Top achievements
Rank 1
Answers by
Veli
Telerik team
John John
Top achievements
Rank 1
Share this question
or