I have a form and one data grid view ....
I am filling the datagrid view by uisng the below method
private void EquipmentFinder_Load(object sender, EventArgs e)
{
productgridview.RowTemplate.Height = 130;
var productsbycount = dbentity.products.GroupBy(x => x.product_Id)
.Select(a => new
{
productid = a.Key,
productnam = a.FirstOrDefault().product_Name,
productimage = a.FirstOrDefault().product_Image,
productdescr = a.FirstOrDefault().product_Description,
stockavailable = a.Select(x=>x.product_Id).Distinct().Count()
productprice = a.FirstOrDefault().product_Price
});
productbindingsource.DataSource = productsbycount;
productgridview.DataSource = productbindingsource;
}
that was fine ....
now I want to find the total number of rows in the datagrid view(Row Count) and i want to represent this in label......
would any one pls help on this by giving any solution.....
Many Thanks ......