but if i want to display product in grid according to category id so which one i should have to use...currently i am using featured products grid for displaying products according to category.
but the problem with this is when i add any new product at that time i have to click 0n to featured check box....i am using
ProductList.DataSource = ProductDataSource.GetRandomFeaturedProducts(0, true, this.Size);
is there any other way to do this same task?
Thanks and Regard
Atul khare
Display product in grid
Re: Display product in grid
Find out the product id for which you want to display the featured products and place the id in place of 0 in the following statement
Code: Select all
ProductList.DataSource = ProductDataSource.GetRandomFeaturedProducts(yourcategoryid, true, this.Size);
Re: Display product in grid
i am using
ProductList.DataSource = ProductDataSource.GetFeaturedProducts(int.Parse(Request.QueryString["cID"].ToString()), true);
instead of
productsDataSource.GetRandomfeaturedproducts(-,-,-)
is it correct or not?
Thanks And Regards
Atul khare
ProductList.DataSource = ProductDataSource.GetFeaturedProducts(int.Parse(Request.QueryString["cID"].ToString()), true);
instead of
productsDataSource.GetRandomfeaturedproducts(-,-,-)
is it correct or not?
Thanks And Regards
Atul khare
Re: Display product in grid
Try the following code
Where 8 is the size value you can provide your own size.
Code: Select all
int categoryId = PageHelper.GetCategoryId();
ProductList.DataSource = ProductDataSource.GetFeaturedProducts(categoryId, true,8);