Hi folks,
Got a small problem with my grid.
I have a grid with a template column as follows:
<ItemTemplate>
<asp:Label ID="lblDiscountname" runat="server" Text=""></asp:Label>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/edit_icon.gif" CommandName="Edit" CausesValidation="False"
CommandArgument=<%# Eval("DiscountID") %> />
<asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/delete_icon.gif" CausesValidation="False" CommandName="Delete" ToolTip="Delete Discount"
CommandArgument=<%# Eval("DiscountID") %> />
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" TargetControlID="ImageButton2" ConfirmText="Are you sure you want to delete this Discount?">
</cc1:ConfirmButtonExtender>
</ItemTemplate>
This works great in a page I have, where I use the gridDiscounts_DeleteCommand
and
gridDiscounts_EditCommand
to do deletes and edits.
Now, on another page, I have embedded a clone of the grid into a databound standard microsoft accordion.
The events of course, no longer have the Handles clause on them, but they do fire.
The problem is, they fire every OTHER click.
So, If I click on record 1's edit button, I can see the event fire, If I click on any records edit buton again, it does NOT fire.
A third click again fires the appropriate edit command.
Here is the entire contents of the edit_command
Sub gridMenuItems_EditCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)
e.Item.Edit = False
GetItemForEditing(e.CommandArgument)
Dim grid As RadGrid = source
grid.DataBind()
End Sub
As you can see, I thought it was maybe stuck in edit mode, so the buttons were all disabled behind the scenes, but setting item.edit = false had no effect.
I've tried debugging my way around the client, but had no luck so far.
If anyone has any idea what is eating the event, please let me know.
Or, if anyone can tell me where to set a breakpoint so I can find it, I'll take that too.
I would package this up, but the page is insane complex, so please don't ask.
I might try putting two standalone grids in 2 accordion panes and see if it does the same thing or not.
thanks in advance for any ideas.
Got a small problem with my grid.
I have a grid with a template column as follows:
<ItemTemplate>
<asp:Label ID="lblDiscountname" runat="server" Text=""></asp:Label>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/edit_icon.gif" CommandName="Edit" CausesValidation="False"
CommandArgument=<%# Eval("DiscountID") %> />
<asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/delete_icon.gif" CausesValidation="False" CommandName="Delete" ToolTip="Delete Discount"
CommandArgument=<%# Eval("DiscountID") %> />
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" TargetControlID="ImageButton2" ConfirmText="Are you sure you want to delete this Discount?">
</cc1:ConfirmButtonExtender>
</ItemTemplate>
This works great in a page I have, where I use the gridDiscounts_DeleteCommand
and
gridDiscounts_EditCommand
to do deletes and edits.
Now, on another page, I have embedded a clone of the grid into a databound standard microsoft accordion.
The events of course, no longer have the Handles clause on them, but they do fire.
The problem is, they fire every OTHER click.
So, If I click on record 1's edit button, I can see the event fire, If I click on any records edit buton again, it does NOT fire.
A third click again fires the appropriate edit command.
Here is the entire contents of the edit_command
Sub gridMenuItems_EditCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)
e.Item.Edit = False
GetItemForEditing(e.CommandArgument)
Dim grid As RadGrid = source
grid.DataBind()
End Sub
As you can see, I thought it was maybe stuck in edit mode, so the buttons were all disabled behind the scenes, but setting item.edit = false had no effect.
I've tried debugging my way around the client, but had no luck so far.
If anyone has any idea what is eating the event, please let me know.
Or, if anyone can tell me where to set a breakpoint so I can find it, I'll take that too.
I would package this up, but the page is insane complex, so please don't ask.
I might try putting two standalone grids in 2 accordion panes and see if it does the same thing or not.
thanks in advance for any ideas.