IM sure there’s an easy way round this….
If I populate a gridview by eg, selecting a value from a dropdown list, then I want to show the total number of records in that gridview, i have a textbox which i set to
lbTotal.Text = Convert.ToString(gridview.Rows.Count);
Problem is, is only shows the total for what was previously in the gridview, not whats in there currrently.
You might want to look into how/where you are doing any databinding to the grid. It seems to me that what’s happening is that you are checking the row count before the new databinding is occuring. If that’s the case try setting the label/textbox in the BindingContextChanged event of the datagridview.
This is just a guess based on what you have said, posting more information would be useful though :P.