This is a migrated thread and some comments may be shown as answers.
radgrid button Delete command postback not working
9 Answers 146 Views
This is a migrated thread and some comments may be shown as answers.
Wella
Top achievements
Rank 1
Wella asked on 22 Nov 2013, 06:52 AM
<telerik:GridButtonColumn ButtonType="LinkButton" CommandName="Delete" Text="&lt;img src=images/Delete.gif border=0 align=absmiddle alt='Delete Item' title='Delete record'&gt;"
                                                  UniqueName="Delete" ConfirmText="Are you sure you want to delete this record?">
                            <HeaderStyle HorizontalAlign="left" Width="10%" />
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridButtonColumn>


here client side confirm message working but postback in not working 

teleric version is 2008.01.0415.35

9 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 22 Nov 2013, 07:39 AM
Hi Wella,

This is not an expected behavior.For the GridButtonColumn , when you set the CommandName, the appropriate events are raised. For the CommandName="Delete", the RadGrid raises the OnDeleteCommand event , you can access the values to be deleted in this event. Make sure you have attached the OnDeleteCommand event to the RadGrid.

Thanks,
Shinu


0
Shashi
Top achievements
Rank 1
answered on 13 Oct 2018, 09:29 AM
Still OnDeleteCommand event is not firing
0
Tsvetomir
Telerik team
answered on 17 Oct 2018, 03:21 PM
Hi Shashi,

Ensure that the CommandName property of the GridButtonColumn is set to "Delete".

<telerik:GridButtonColumn ButtonType="LinkButton" CommandName="Delete" Text="Delete" ConfirmText="Are you sure you want to delete this record?">
</telerik:GridButtonColumn>


Also, ensure that you have subscribed to the OnDeleteCommand as follows:

<telerik:RadGrid ID="RadGrid1" runat="server"  OnDeleteCommand="RadGrid1_DeleteCommand">
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="OrderID">
        <Columns>
                <%--Ommited for brevity--%>

Place a debugger at the OnDeleteCommand event handler and press the button. The breakpoint is hit.



If the issue persists, consider sending us a sample project where the issue could be produced and we will debug it locally to check where does the problem stem from.

Kind regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Jon
Top achievements
Rank 1
answered on 08 Apr 2019, 12:02 PM

I am having the same problem. The OnDeleteCommand is not firing. I put a break in the code and it is never hit. Why is this? 

 

<telerik:RadGrid RenderMode="Lightweight" runat="server" ID="RadGrid2" AllowPaging="True" AllowSorting="true"                  OnNeedDataSource="RadGrid2_NeedDataSource" OnDeleteCommand="RadGrid2_OnDeleteCommand" EnableViewState="False"  AllowAutomaticDeletes="True">     <MasterTableView DataKeyNames="ID" AutoGenerateColumns="False" >         <Columns>             <telerik:GridButtonColumn ButtonType="FontIconButton" CommandName="Delete" />             <telerik:GridBoundColumn DataField="itemName" HeaderText="Description" />             <telerik:GridBoundColumn DataField="itemPrice" HeaderText="Price" />             <telerik:GridBoundColumn DataField="itemID" Visible="False"/>         </Columns>     </MasterTableView></telerik:RadGrid>

 

 

0
Amit
Top achievements
Rank 1
answered on 24 Apr 2019, 07:35 PM

Is there any fix for the issue? I am facing same issue here. I have following code and its not firing the onDeleteCommand event 

 

<telerik:GridButtonColumn ConfirmText="Delete this data?" ConfirmDialogType="RadWindow"
                                            ItemStyle-BackColor="#99ccff" ConfirmTitle="Delete" ButtonType="LinkButton" CommandName="Delete"
                                            Text="Delete" UniqueName="DeleteColumn">
                                            <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                                        </telerik:GridButtonColumn>

0
Amit
Top achievements
Rank 1
answered on 24 Apr 2019, 08:03 PM
The issue occurs only in Chrome browser in my case. It works fine on IE and Firefox browsers.
0
Eyup
Telerik team
answered on 29 Apr 2019, 07:57 AM
Hi Amit,

This is browser behavior related to the new version of Chrome and it is already fixed in the Latest Internal Build. Could you download and test it as suggested here and share whether the issue is now resolved?
https://feedback.telerik.com/aspnet-ajax/1403193-radgrid-delete-confirmation-does-not-work-on-new-version-of-chrome-73

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Matt
Top achievements
Rank 1
answered on 16 Jul 2019, 08:10 PM
Is there a work-around for those of us who can't afford an annual license?
0
Rumen
Telerik team
answered on 19 Jul 2019, 10:02 AM
Hi Matt,

Please refer to the following document - https://docs.telerik.com/devtools/aspnet-ajax/licensing/old-versions-support-policy

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Wella
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Shashi
Top achievements
Rank 1
Tsvetomir
Telerik team
Jon
Top achievements
Rank 1
Amit
Top achievements
Rank 1
Eyup
Telerik team
Matt
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or