While the Infragistics NetAdvantage tool set provides some great features, handling the data updates from the web using your stored procedure and custom validation needs to be handled in the myGrid_RowUpdating(object sender, Infragistics.Web.UI.GridControls.RowUpdatingEventArgs e) event.
First, if you want to access the ID of a row and use it, you will have to setup the DataKeyFields of the grid, such as for the ID of the row. You can do this through the Properties window. Then you can access the ID in the event by using the following:
Int32
You can then handle custom data validation by getting the values from the fields by doing the following:
string myFieldVal = e.Values["ProductTitle"].ToString();
Of course, you can setup the data source to handle the update to the stored procedure...but forcing business logic or rules can't be done before the update occurs.
rowID = Convert.ToInt32(e.Row.DataKey[0].ToString());
Share This To :
0 comments:
Post a Comment