You can see in the following code I am trying to get a count for all
of the records in my gridview, which is called 'employee details'.
The problem is that it is only counting the records on the first
page.  How can I get this code to count the records on all pages?

By the way, this gridview is updated via a sql data source object on
my form..

        try
        {
            employeeDetails.DataBind();
            EnableSubmit();
            NumRows = (int)employeeDetails.Rows.Count;
            if (NumRows > 0)
            {
                numRecords.Text = "<i><font color=Black>Your search
returned " + NumRows.ToString() + "</font></i>";
            }
            else
            {
                numRecords.Text = "<i><font color=DarkRed>Your search
did not return any records</font></i>";
            }
        }
        catch(Exception ex)
        {
            dbOnError.Text = ex.Message;
        }
        numRecords.Visible = true;

Reply via email to