The gridview fired event rowupdating which wasn t handled

protected void Grid View1_Row Editing(object sender, Grid View Edit Event Args e) { Grid View1. New Edit Index; Sql Connection con = new Sql Connection("Data Source=MEHDI-PC\SQLEXPRESS; Initial Catalog=PIMS; Integrated Security=True"); string sql = "select [Dwg Reg ID],[Ref],[Dwg_Ref],[Title],[Dwg_Received_Date],[Rev],[Trade],[Type],[Produced_Date],[Produced_By],[Submittal_Ref],[Issued_To],[Date_Issued],[Purpose],[Status],[Action_Date] from dbo.

Open(); Sql Data Adapter adp = new Sql Data Adapter(sql, con); Data Set ds = new Data Set(); adp.

You are likely binding your DAL to your Grid View using something like this or maybe conditionally if it isn’t a postback: The Grid View does NOT set the Sort Direction property in this event handler unless an Data Source object is set. This is a bug in my mind, but I think Microsoft just says it is by design (or bad design if you ask me). Raise Post Back Event(String event Argument) 210 System. Raise Post Back Event(String event Argument) 13 System. Here is my Object Data Source that I defined for the Data Access Layer we defined above.If you want to work a little harder you can implement the logic using the Grid View and no Object Data Source.

Leave a Reply