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

RadGrid double click event firing on selected row

2 Answers 512 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jyosana
Top achievements
Rank 1
Jyosana asked on 15 Oct 2013, 11:16 AM

Hello, All

I am using telerik:RadGrid control bind all data. Currently I am issue occurring on double click event on telerik:RadGrid when I press double click event and
calling in jquery function and find out Edit button id in telerik:RadGrid and when I want to edit button id click event ,but I am find out is working fine but this is only
first row firing not any other row firing I want to selected row event not working

Thanks
Jyosana

<script language="javascript" type="text/javascript">
       function RowDblClick(sender, eventArgs) {
           var grid = $find("<%=grdLearningCenter.ClientID %>");
           var masterTable = grid.get_masterTableView();
           var row = masterTable.get_dataItems()[0];
           var button = row.findElement("lnkEdit");
           button.click();
       }
   </script>
 
<telerik:radgrid id="grdLearningCenter" runat="server" allowpaging="True" allowsorting="True"
               autogeneratecolumns="False" allowautomaticdeletes="false" allowautomaticupdates="false"
               onneeddatasource="grdLearningCenter_NeedDataSource" onitemcommand="grdLearningCenter_ItemCommand">
            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
               <ClientSettings>
                     <ClientEvents OnRowDblClick="RowDblClick" />
                </ClientSettings>
                <MasterTableView Width="100%" CommandItemDisplay="None">
                  <CommandItemSettings ShowAddNewRecordButton="false" />
                  <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                   </RowIndicatorColumn>
                   <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                   </ExpandCollapseColumn>
                    <Columns>                                                             
                           <telerik:GridBoundColumn DataField="RLCAddress" HeaderText="Address" ItemStyle-HorizontalAlign="Left"
                                      SortExpression="RLCAddress" UniqueName="RLCAddress">
                                      <ItemStyle HorizontalAlign="Left" />
                             </telerik:GridBoundColumn>
                             <telerik:GridTemplateColumn HeaderStyle-HorizontalAlign="Center" HeaderText="Action"
                                          UniqueName="printdetail">
                                   <ItemTemplate>
                                    <asp:LinkButton ID="lnkEdit" runat="server" CommandArgument='<%#Eval("RLCPK") %>'
                                              CommandName="Edit" Text="Edit"></asp:LinkButton>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" />
                              </telerik:GridTemplateColumn>
                   </Columns>
                   <EditFormSettings>
                          <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                         </EditColumn>
                    </EditFormSettings>
                 </MasterTableView>
                 <FilterMenu EnableImageSprites="False">
                 </FilterMenu>
           </telerik:radgrid>
 
 protected void grdLearningCenter_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
       {
           if (e.CommandName.Equals("Edit"))
           {
               Response.Redirect("RegistrerLearningCenter.aspx?RLCPK=" + e.CommandArgument.ToString());
           }
           else if (e.CommandName.Equals("View"))
           {
               Response.Redirect("LearningCenterDetail.aspx?RLCPK=" + e.CommandArgument.ToString());
           }
       }

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 15 Oct 2013, 12:07 PM
Hello,

Please check below link, In this i have already added demo code.

http://www.telerik.com/community/forums/aspnet-ajax/grid/how-to-detect-single-and-double-click-in-itemcommand-of-radgrid.aspx

Thanks,
Jayesh Goyani
0
Jyosana
Top achievements
Rank 1
answered on 17 Oct 2013, 05:31 AM

Thanks for your response and Resolve my issue
Thank Jayesh
Tags
Grid
Asked by
Jyosana
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Jyosana
Top achievements
Rank 1
Share this question
or