C
Cas
Hello,
My gridview has the option ShowDeleteButton="True".
There is also a label which renders the amounts of records.
What i'm trying tot do is: when i delete a row, the amount of records must
be adapted in function of the value of a field.
If the value of the field="black" then it must be decreased with 1,
otherwise it must be decreased with 2.
In the code-behind, i started with this, but cant' go further:
Friend rec As integer
Protected Sub GridView1_RowDeleted(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewDeletedEventArgs) Handles
GridView1.RowDeleted
dim a as ??
a = gridview1. ??? .ToString
if a="black" then
rec = rec - 1
else
rec=rec-2
end if
Label1.Text = rec
End Sub
I guess i use the right event (or is it GridView1_RowDeleting?).
If you can replace the ?? with the appropriate code, it would be great!
Thanks
Cas
My gridview has the option ShowDeleteButton="True".
There is also a label which renders the amounts of records.
What i'm trying tot do is: when i delete a row, the amount of records must
be adapted in function of the value of a field.
If the value of the field="black" then it must be decreased with 1,
otherwise it must be decreased with 2.
In the code-behind, i started with this, but cant' go further:
Friend rec As integer
Protected Sub GridView1_RowDeleted(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewDeletedEventArgs) Handles
GridView1.RowDeleted
dim a as ??
a = gridview1. ??? .ToString
if a="black" then
rec = rec - 1
else
rec=rec-2
end if
Label1.Text = rec
End Sub
I guess i use the right event (or is it GridView1_RowDeleting?).
If you can replace the ?? with the appropriate code, it would be great!
Thanks
Cas