Hi everybody,
I have a problem with the EnablePostBackOnRowClick when I also have a GridButtonColumn:
In the code behind :
When I click on a row, I have the RowClick CommandName, right.
But if I click on the ImageButton column, I have Delete CommandName and RowClick CommandName events. If I add a ConfirmText on GridButtonColumn, if I accept, I have Delete and RowClick events. If I decline, I have RowClick event.
Is there a method to disable RowClick event for GridButtonColumn to only have Delete event if I confirm action ?
Thanks.
I have a problem with the EnablePostBackOnRowClick when I also have a GridButtonColumn:
| <telerik:RadGrid runat="server" AutoGenerateColumns="False" Skin="" CssClass="list"> |
| <MasterTableView AutoGenerateColumns="False" CssClass="list" AllowSorting="true"> |
| <HeaderStyle CssClass="listheader" /> |
| <ItemStyle CssClass="listline1" /> |
| <AlternatingItemStyle CssClass="listline2" /> |
| <Columns> |
| <telerik:GridBoundColumn UniqueName="src_id" DataField="src_id" HeaderText="ID" SortExpression="src_id"> |
| <HeaderStyle Width="20px" HorizontalAlign="center" /> |
| <ItemStyle Width="20px" HorizontalAlign="center" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridButtonColumn UniqueName="DeleteColumn" ButtonType="ImageButton" CommandName="Delete" Text="Delete"> |
| <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" Width="20px" /> |
| </telerik:GridButtonColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings EnablePostBackOnRowClick="true"> |
| </ClientSettings> |
| </telerik:RadGrid> |
In the code behind :
| protected void gridSources_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| Trace.Log(e.CommandName); |
| } |
When I click on a row, I have the RowClick CommandName, right.
But if I click on the ImageButton column, I have Delete CommandName and RowClick CommandName events. If I add a ConfirmText on GridButtonColumn, if I accept, I have Delete and RowClick events. If I decline, I have RowClick event.
Is there a method to disable RowClick event for GridButtonColumn to only have Delete event if I confirm action ?
Thanks.