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

ItemCommand of nested grid

5 Answers 116 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 17 Dec 2008, 07:41 PM
Hi,

I have a RadGrid inside the NestedViewTemplate of another grid. The "outer" grid has row selection enabled with the "EnablePostBackOnRowClick" set to "true" while the "inner" grid has row selection disabled.
The problem occures when a row of the inner grid is clicked. This click triggers the OnItemCommand handler of the outer grid which results in some undefined behaviour (some other row of the outer grid is selected). If I set another OnItemCommand handler for the inner grid, still the handler of the outer grid gets called.
What's the reason for this behaviour? Is there a way to fix this?

Best regards,
Robert

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Dec 2008, 06:15 AM
Hi

I tried this on my end and I am also getting the same result. Not sure what is causing this issue. I am also looking for a fix for this issue.
   One another suggestion will be to set the Name property for both the Grid and access the Name of the Grid in the OnRowClick client event. Cancel the PostBack if the Name corresponds to nested Grid.

Shinu
0
Robert
Top achievements
Rank 1
answered on 18 Dec 2008, 03:05 PM
Hi,

I don't think this will work. I have tried to cancel the postback by adding the following line to the client events of both grids:
OnRowClick="CancelPostBack" where CancelPostback() always returns false.
The function gets called but the postback does still occur.

Robert
0
Prateek
Top achievements
Rank 1
answered on 16 Oct 2014, 01:28 PM
Hello!!

I Have also this problem. i have a nested radgrid inside a RadPageView of RadMultiPage  of radtabstrip. RadtabStrip is inside parent RadGrid.
I want to fire ItemCommand of Nested RadGrid when click on Row and on CommandItem of Nested RadGrid. RowClick and EveryThing is working fine when clicking on Parent Row of Parent Grid. But The Problem is that Nested RdGrid is not working On RowClick and MouseHover and anyThing else..                                                              I am using seperate OnItemCommand for Both grid. 'EnablePostBackOnRowClick="true" ' is for both grids. And Nested Grid is also have RadContextMenu and OnRowDrop that is not working.... One Another Thing is that I am opening Different RadWindow on RowClick of Nested Grid in Different Conditions. ..... Any Help Will be Appreciated..   Thanks...


0
Angel Petrov
Telerik team
answered on 21 Oct 2014, 11:26 AM
Hi,

I have thoroughly researched the matter and was able to reproduce row click and item command call problem. It seemed related to our internal client-side logic and I have already logged it into our system. Our developers will have the care to research it thoroughly and apply the necessary changes in the source code(you can monitor our progress on the matter from this link).

As for the other problems described they appear to be caused by a JavaScript error. Could you please ensure that such an error is not present on the page? Also can you please share with us the entire page contents so we could examine the implementation.

Finally, I want to thank you for bringing our attention to the row click and item command issue. As a token of gratitude for this I have updated your Telerik points.

Regards,
Angel Petrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Prateek
Top achievements
Rank 1
answered on 22 Oct 2014, 07:42 AM
Hi Angel,
 Thanks for ur attention!!!
I m sure that there is no javascript error on my page. i have tested it carefully on another aspx page and radwindow on tab click of nested view item inside parent grid. it is working properly.
All things are correct. finally the issue is hold on rowclick and ItemCommand of inner grid at all.
Thanks!!!!





Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Robert
Top achievements
Rank 1
Prateek
Top achievements
Rank 1
Angel Petrov
Telerik team
Share this question
or