Hello all.
I have the following bit of code that gives me the number of rows in a gridview bound to an object data source.
protected void odsProduct_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
lblHowManyRows.Text = ((List<tblProduct>)e.ReturnValue).Count.ToString();
Lovely.
However, how would I go about essentially doing the same count but before the object data source produces the gridview output?
What I am trying to do is give the user the chance to check how many rows would be returned before they actually create the gridview (bound to the object data source)
Is there something that lies within the ods or should I just write another linq statement and bind it to that?
Apologies for my ignorance