MayoorPatel
Programmer
Hi there I have a datagrid
Which on clicking the delete link should call this procedure
However when I click the delete button it just posts back to the form. Debuging trace also shows it goes no where near that procedure despite me specifying the "Handles DecisionGrid.DeleteCommand"
Im tearing my hair out over this as I just cant understand why it wont call the procedure, can anyone help?
Code:
<trans:groupedgrid id="DecisionGrid" runat="server" EnableViewState="False" AutoGenerateColumns="False"
AllowCustomSorting="True" CssClass="search-results-table percent80" AllowRowHighlighting="True"
RemoveRedundantBorders="False" ReorganiseItemStyles="True" UseAccessibleHeader="True">
<Columns>
<asp:BoundColumn DataField="decision_datetime" SortExpression="decision_datetime" HeaderText="Date of Hearing"></asp:BoundColumn>
<asp:BoundColumn DataField="applicant" SortExpression="applicant" HeaderText="Applicant"></asp:BoundColumn>
<asp:BoundColumn DataField="respondent" SortExpression="respondent" HeaderText="Respondent"></asp:BoundColumn>
<asp:BoundColumn DataField="title_no" SortExpression="title_no" HeaderText="Title No"></asp:BoundColumn>
<asp:BoundColumn DataField="category" SortExpression="category" HeaderText="Category"></asp:BoundColumn>
<asp:BoundColumn DataField="subcategory" SortExpression="subcategory" HeaderText="Subcategory"></asp:BoundColumn>
<asp:BoundColumn DataField="is_published" SortExpression="is_published" HeaderText="Published"></asp:BoundColumn>
<asp:BoundColumn DataField="judgmentid" visible="false" SortExpression="judgementid" HeaderText="Judgement ID"></asp:BoundColumn>
<asp:ButtonColumn Text="Delete" CommandName="Delete">
<itemstyle HorizontalAlign="Center" />
</asp:ButtonColumn>
</Columns>
</trans:groupedgrid><trans:pager id="PagerControl" runat="server" cssclass="normal-table white percent80"></trans:pager>
Which on clicking the delete link should call this procedure
Code:
Private Sub SubCatDataGrid_DeleteCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DecisionGrid.DeleteCommand
Dim DecIDLabel As Label = e.Item.FindControl("DecIDLabel")
If Not DecIDLabel Is Nothing Then
Me.DeleteDecision(DecIDLabel.Text)
End If
End Sub
However when I click the delete button it just posts back to the form. Debuging trace also shows it goes no where near that procedure despite me specifying the "Handles DecisionGrid.DeleteCommand"
Im tearing my hair out over this as I just cant understand why it wont call the procedure, can anyone help?