D
David Davis
I have a GridView with a ButtonField column set as ButtonType = Link. I want
to add a client-side script call that would cancel the GridView1_RowCommand
event.
I add the client-side script using the OnClientClick property as follows:
If e.Row.RowType = DataControlRowType.DataRow Then
Dim lnkbtnListBill As LinkButton = _
CType(e.Row.Cells(4).Controls(0), LinkButton)
lnkbtnListBill.OnClientClick =
"javascript:ClearTrackerDialog();"
End If
The resulting html source has the postback in a separate href as follows:
<a onclick="javascript:ClearTrackerDialog();"
href="javascript:__doPostBack('grdResults','ListBillLink$0')">C9101234</a>
I need to somehow combine these so my ClearTrackerDialog() comes in the href
just before the post back script so if it returns false, the post back will
not occur.
Thanks, --David
to add a client-side script call that would cancel the GridView1_RowCommand
event.
I add the client-side script using the OnClientClick property as follows:
If e.Row.RowType = DataControlRowType.DataRow Then
Dim lnkbtnListBill As LinkButton = _
CType(e.Row.Cells(4).Controls(0), LinkButton)
lnkbtnListBill.OnClientClick =
"javascript:ClearTrackerDialog();"
End If
The resulting html source has the postback in a separate href as follows:
<a onclick="javascript:ClearTrackerDialog();"
href="javascript:__doPostBack('grdResults','ListBillLink$0')">C9101234</a>
I need to somehow combine these so my ClearTrackerDialog() comes in the href
just before the post back script so if it returns false, the post back will
not occur.
Thanks, --David