Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        using (ProductsProvider provider = new ProductsProvider()) {
            ProductsGridView.DataSource = provider.GetList();
            ProductsGridView.DataBind();

            if (!ProductsGridView.IsCallback)
            {
                Product focusedRow = ProductsGridView.GetRow(ProductsGridView.FocusedRowIndex) as Product;
                if (focusedRow != null)
                {
                    ProductDetails.LoadContent(focusedRow.Id);
                }
            }
        }
    }