I have a web page that has a gridview on it. The gridview allows for editing, updating and deleting records. I have two labels that appear outside the gridview that inform the user as to whether the gridview is or isn't in balance over has to many lines. Currently, I have the code attached to a submit button which fires correctly, but only when you hit the submit button which is only used to call the transaction. Also if I use GridView1.Databind() on the page load it causes my footer in the GridView to double the dollar that the transaction is off. The transaction is to net to zero.
So the 500 Point question is how do I fire those labels without using the submit button each time after a row has been updated.
Just so you know I am using a standard VS 2005, canned GridView with the ShowEdit and ShowDelete buttons, so nothing fancy.
<div style="text-align:center"><asp:Label Text="1st WARNING" ForeColor="red" Font-Bold="true" Visible="false" ID="Warning" runat="server" /></div>
<div style="text-align:center"><asp:Label Text="2nd WARNING" ForeColor="red" Font-Bold="true" Visible="false" ID="Warning2" runat="server" /></div>
ASPX.VB Code - Submit Button
Protected Sub SubmitBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SubmitBtn.Click
RowCount.Text = GridView1.Rows.Count
If CType(RowCount.Text, Integer) > 50 Or GetTotal() <> "0.00" Then
IndexBtn.Visible = False
Warning.Visible = True
Warning.Text = ("THE TRANSACTION IS EITHER OUT OF BALANCE OR EXCEEDS 50 LINES," _
& " CHECK THE TOTAL AND NUMBER OF RECORDS IN THE GRID!!!")
IndexBtn.Visible = True
Warning.Visible = False