protected void OnRowUpdating(object sender, GridViewUpdateEventArgs e) { string departure = e.NewValues[0].ToString(); string arrival = e.NewValues[1].ToString(); string priceStr = e.NewValues[2].ToString(); if (departure == "" || arrival == "" || priceStr == "") { e.Cancel = true; return; } int price = Convert.ToInt32(priceStr); FlightsService service = Service.getInstanse().flightService; service.UpdateFlightPrice(idFlightPrice, departure, arrival, price); GridView.EditIndex = -1; UpdateAllTable(); }