protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SellerGridView.DataBind(); } }
protected void NextSet_Click(object sender, EventArgs e) { var controller = new BlackMarketController(); var data = controller.GetVehicles(); SellerGridView.DataSource = data; SellerGridView.DataBind(); }
private void PopulateSellerGridView(int skipRow) { var cars = new List <Vehicle>(); for (int index = 0; index < SellerGridView.Rows.Count; index++) { if (index != skipRow) { var row = SellerGridView.Rows[index]; string vin = SellerGridView.DataKeys[index].Value.ToString(); cars.Add(ExtractVehicleData(row, vin)); } } SellerGridView.DataSource = cars; SellerGridView.DataBind(); }