I have a RadGrid which has a GridButtonColumn. Until recently when clicking on the button image in the grid, the ItemCommand event was firing as expected and I was being redirected to another page as specified in the code behind. As of yesterday, nothing happens when clicking on the button image in the grid though no code changes have occurred.
The ItemCommand event for the grid does fire when filtering or sorting columns in the grid, just not when clicking on the image button.
Here's the code in the aspx page for the first part of the RadGrid and the GridButtonColumn...
I am able to see the button and the image is the one specified in the 'ImageURL'.
Here is the code in the .vb page for the ItemCommand event, note I've commented out the code that would appear in the 'If' statement with just a comment line for security/privacy reasons:
In debug mode, I have a breakpoint on the 'If' line in the ItemCommand and when sorting or filtering on the grid the breakpoint is hit. However, when clicking on the image button in the grid the breakpoint is never hit.
Could someone provide any suggestions as to what may have caused this?
Thanks!
The ItemCommand event for the grid does fire when filtering or sorting columns in the grid, just not when clicking on the image button.
Here's the code in the aspx page for the first part of the RadGrid and the GridButtonColumn...
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
GridLines
=
"None"
AllowFilteringByColumn
=
"true"
AllowPaging
=
"True"
AutoGenerateColumns
=
"False"
Skin
=
"tds"
EnableEmbeddedSkins
=
"false"
AllowSorting
=
"True"
EnableLinqExpressions
=
"false"
>
<
MasterTableView
HeaderStyle-HorizontalAlign
=
"Center"
dataKeyNames
=
"intItemID, intItemTypeID"
TableLayout
=
"Fixed"
>
<
PagerStyle
Mode
=
"NextPrevNumericAndAdvanced"
AlwaysVisible
=
"true"
Position
=
"TopAndBottom"
/>
<
Columns
>
<%--Review--%>
<
telerik:GridButtonColumn
UniqueName
=
"btnReview"
Text
=
"Review"
ButtonType
=
"ImageButton"
ImageUrl
=
"/TestDevelopment/images/review.png"
CommandName
=
"review"
HeaderStyle-Width
=
"40px"
>
</
telerik:GridButtonColumn
>
I am able to see the button and the image is the one specified in the 'ImageURL'.
Here is the code in the .vb page for the ItemCommand event, note I've commented out the code that would appear in the 'If' statement with just a comment line for security/privacy reasons:
Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
If e.CommandName = "review" Then
//redirect page here
End If
End Sub
In debug mode, I have a breakpoint on the 'If' line in the ItemCommand and when sorting or filtering on the grid the breakpoint is hit. However, when clicking on the image button in the grid the breakpoint is never hit.
Could someone provide any suggestions as to what may have caused this?
Thanks!