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

Radgrid with radgrid on the edit template

2 Answers 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 2
Erik asked on 07 Nov 2008, 12:26 PM
Hi Telerik,

Yesterday I encountered a problem, it seems a little bug.

Scenario: I have a grid with a popup edit. In the edit template i have an other grid with paging on. The user can select an item (over 1500 rows...)
All well, but: The main grid has
EnablePostBackOnRowClick="true" 
while the secound grid in the popup edit "window" has not.

Behaviour: the secound grid is posting back on row click!

2 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 10 Nov 2008, 12:44 PM
Hello Proovit,

Indeed, this issue is present.
I have alerted our developers, and they will soon look into this issue.

Kind regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Yavor
Telerik team
answered on 01 Dec 2008, 08:44 AM
Hi Proovit,

Here is the promised follow up.
Presently, there is no option to automatically handle this scenario.
However, here is one option.
You can use the onclick handler for the inner grid to cancel out the bubbling of the rowclick. This may look something like this:

.aspx
<EditItemTemplate> 
                                <telerik:RadGrid runat="server" ID="RadGrid1" DataSourceID="AccessDataSource1" GridLines="None">  
                                    <HeaderContextMenu EnableTheming="True">  
                                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                    </HeaderContextMenu> 
                                    <MasterTableView AutoGenerateColumns="False" DataKeyNames="CategoryID" DataSourceID="AccessDataSource1">  
                                        <RowIndicatorColumn> 
                                            <HeaderStyle Width="20px" /> 
                                        </RowIndicatorColumn> 
                                        <ExpandCollapseColumn> 
                                            <HeaderStyle Width="20px" /> 
                                        </ExpandCollapseColumn> 
                                        <Columns> 
                                            <telerik:GridEditCommandColumn> 
                                            </telerik:GridEditCommandColumn> 
                                            <telerik:GridBoundColumn DataField="CategoryID" DataType="System.Int32" HeaderText="CategoryID" 
                                                ReadOnly="True" SortExpression="CategoryID" UniqueName="CategoryID">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName" 
                                                UniqueName="CategoryName">  
                                            </telerik:GridBoundColumn> 
                                        </Columns> 
                                    </MasterTableView> 
                                    <FilterMenu EnableTheming="True">  
                                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                    </FilterMenu> 
                                    <ClientSettings> 
                                        <ClientEvents OnRowClick="rowClick" /> 
                                    </ClientSettings> 
                                </telerik:RadGrid> 
                                <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb" 
                                    SelectCommand="SELECT TOP 3 [CategoryID], [CategoryName], [Description] FROM [Categories]">  
                                </asp:AccessDataSource> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 

.Js
  <script type="text/javascript">  
                  
                function rowClick(sender, eventArgs)  
                {  
                if(!e) var e = window.event;                      
                    e.cancelBubble = true;  
                    e.returnValue = false;       
                }  
        
            </script> 

I hope this helps.

Sincerely yours,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Erik
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Share this question
or