I am converting Infragistics 2010 v2 CLR3.5 to Infragistics 2014 v2 using 4.5 CLR using Visual Studio 2013 Professional Update 4. I am getting following error while building the project. Please reply immediately..........
Error 196 'Infragistics.Web.UI.GridControls.GridRecord' does not contain a definition for 'DataChanged' and no extension method 'DataChanged' accepting a first argument of type 'Infragistics.Web.UI.GridControls.GridRecord' could be found (are you missing a using directive or an assembly reference?)
Below error is there while fixing the code:
if (e.Row.DataChanged.ToString() != "Added" && Update == "Y") { foreach (DataRow modDR in dt.Rows) { int rowID = e.Row.BandIndex; if ((modDR[totalCol - 1].ToString() == rowID.ToString() && e.Row.DataChanged.ToString() != "Deleted") || (Int32.Parse(modDR[totalCol - 1].ToString()) == e.Row.Band.Grid.Rows.Count && !rowexists)) { dr = modDR; rowexists = true; } } }
Hi Jack,
Row.DataChanged was removed. There are now separate events for RowUpdating/ed, RowAdding/ed and RowDeleting/ed. For example if you want to execute your code you when new row is added you have to enable the "RowEditing" behavior and you have to add "OnRowAdded" handler like this:
<Behaviors> <ig:EditingCore> <Behaviors> <ig:RowEditing> </ig:RowEditing> </Behaviors> </ig:EditingCore></Behaviors>
<ig:WebDataGrid ID="WebDataGrid1" runat="server" OnRowAdded="WebDataGrid1_RowAdded">
Hello Jack,
I'm just following up to see if you need any further assistance with this issue. If so please let me know.
Hi,
Can you explain more with example in Design page and code behind both so that I get complete idea of implementation which will be helpful in my current project. Plzzz reply soon.......
I need to implement "Add, Update, Delete"
Code is given below for your reference..which I am trying to upgrade.
/// New rows will be added to dataset on any postback event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void grid_AddRowBatch(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e) { StoreGridChanges(e); } /// <summary> /// Any changes to existing row will be updated in data set on any postback. If user updates newly added row then simply modify /// that row and keep the row state as added. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void grid_UpdateRowBatch(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e) { if (e.RowID.DataChanged.ToString() == "Modified") //on .RowID - it is coming as RowEventArgs does not contain a definition for RowID StoreGridChanges(e); } /// <summary> /// All deleted rows will be added to dataset on any postback event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void grid_DeleteRowBatch(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e) { StoreGridChanges(e); }