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 380 'Infragistics.Web.UI.GridControls.GridRecord' does not contain a definition for 'Band' and no extension method 'Band' 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.Band.Columns[cnt].Header.Caption == "Updated By" && e.Band.Columns[cnt].DataType == "System.String" && e.Cells[cnt + 1].IsEditable() == false) e.Cells[cnt].Value = Context.User.Identity.Name; else if (e.Band.Columns[cnt].Header.Caption == "Last Update Date" && e.Band.Columns[cnt].DataType == "System.DateTime" && e.Band.Columns[cnt].IsEditable() == false) e.Cells[cnt].Value = DateTime.Now;
Hello,
I'm just following up to see if you need any further assistance with this issue. If so please let me know.
Hello Jack,
The old UltraWebGrid and the new Aikido WebDataGrid and WenHierarchicalDataGrid does not share the same design and implementation and do not expose the same methods/classes and so on. IF a lot of code needs to be fixed then it is better to rewrite it from scratch then looking for alternatives for each line, since alternatives are not always available.
You can refer to http://help.infragistics.com/Help/Doc/ASPNET/2015.1/CLR4.0/html/Infragistics4.Web.v15.1~Infragistics.Web.UI.GridControls.GridRecord_members.html to se the GridRecord class members. As you can see Tag is available, but Band, BandIndex, DataChanged and isEditbale are not.
Instead of BandIndex try to use e.Level, and try to get the band from e.RowIslands.
However it the suggested does not help you, it will be better if you explain what are you trying to achieve, when ( at what event) so that I can suggest accordingly.
Best Regards,Hristo AnastasovAssociate Software DeveloperInfragistics, Inc.
The reply is not solving the issue. Here 'e' means parameter GridRecord e
Pasting again the code, please have a look and let me know what I can use instead of BandIndex, DataChanged, Band, IsEditable, Tag Due to fact that it is small code pasting here but overrall too much code is there related to this functionality, so please try to give alternatives of above as mentioned.
private void StoreGridChanges(int totalCol, string gridID, Infragistics.Web.UI.GridControls.GridRecord e, DataTable dt) { try { int rowID = e.BandIndex; // Here it "GridRecord" does not contain definition for "BandIndex" in GridRecord DataRow dr = dt.NewRow(); bool rowexists = false; foreach (DataRow modDR in dt.Rows) { if (modDR[totalCol].ToString() == rowID.ToString()) { dr = modDR; rowexists = true; } } int cnt; int index = contentTab.SelectedIndex + 1; string Update = ViewState[index + "_flgUPDT"].ToString(); for (cnt = 1; cnt < totalCol; cnt++) { if (e.DataChanged.ToString() != "Deleted") //"GridRecord" does not contain definition for "DataChanged" { if (e.Band.Columns[cnt].Header.Caption == "Updated By" && e.Band.Columns[cnt].DataType == "System.String" && e.Items[cnt + 1].IsEditable() == false) e.Items[cnt].Value = Context.User.Identity.Name; //"GridRecord" does not contain definition for "Band" else if (e.Band.Columns[cnt].Header.Caption == "Last Update Date" && e.Band.Columns[cnt].DataType == "System.DateTime" && e.Band.Columns[cnt].IsEditable() == false) e.Items[cnt].Value = DateTime.Now; } if (dr[cnt - 1].ToString() == "Added") e.Items[cnt].Tag = e.Items[cnt].Value; //"GridRecordItem" does not contain definition for "Tag"
Hi,
You can call .Bands on the Infragistics.Web.UI.GridControls.WebHierarchicalDataGrid class, so it seems like "e" is not of that type. Please let me know what is "e" here or try to get the columns with syntax similar to:
this.WebHierarchicalDataGrid.Bands[0].Columns[2].Header.Text
this.WebHierarchicalDataGrid.Bands[0].Rows[0].Items[0].Value
Please let me know if you have further questions on the matter.