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 333 'Infragistics.Web.UI.LayoutControls.TabItemCollection' does not contain a definition for 'FromKeyTab' and no extension method 'FromKeyTab' accepting a first argument of type 'Infragistics.Web.UI.LayoutControls.TabItemCollection' could be found (are you missing a using directive or an assembly reference?)
Below error is there while fixing the code:
uGrid.DisplayLayout.Bands[0].Columns[colCount].FieldLen = Int32.Parse(dr[3].ToString()); switch (dr[4].ToString()) { case "DATE": uGrid.DisplayLayout.Bands[0].Columns[colCount].DataType = "System.DateTime"; WebDateTimeEditor editor_dtOnly = (WebDateTimeEditor) contentTab.Tabs.FromKeyTab(tabIndex.ToString()).ContentPane.FindControl("WebDateTimeEditor_DateOnly" + tabIndex); editor_dtOnly.Visible = true; uGrid.DisplayLayout.Bands[0].Columns[colCount].EditorControlID = editor_dtOnly.UniqueID; uGrid.DisplayLayout.Bands[0].Columns[colCount].IsBound = true; uGrid.DisplayLayout.Bands[0].Columns[colCount].AllowUpdate = AllowUpdate.Yes; uGrid.DisplayLayout.Bands[0].Columns[colCount].Type = ColumnType.Custom; break;
Hello,
I'm just following up to see if you need any further assistance with this issue. If so please let me know.
Hi Jack,
uGrid.Columns.FromKey(column) returns object from type ControlDataField.
You can cast it to type GridField:
GridField gCol = uGrid.Columns.FromKey(column) as GridField
Or you can use GridField gCol = uGrid.Columns[column], which returns GridField.
Please let me know if I can provide any further assistance.
In below code, still I am getting error: I am trying to use "GridField" instead of "UltraGridColumn". UltraGridColumn is commented and still I am getting below error: I have bold the line where the error is coming. Please try to give solution which can fix below functionality itself without going through any long route......
Cannot implicitly convert type 'Infragistics.Web.UI.GridControls.ControlDataField' to 'Infragistics.Web.UI.GridControls.GridField'. An explicit conversion exists (are you missing a cast)?
private void GridFindReplace(string column, string searchStr, string caseSensitive, string replaceTxt, string btnAction) { int index = contentTab.SelectedIndex + 1; string alertMsg = ""; WebDataGrid uGrid = (WebDataGrid)contentTab.Tabs[index - 1].FindControl("grid_" + index); int rwCnt = uGrid.Rows.Count; int checkCol = column.IndexOf("."); if (checkCol > 0) { column = column.Substring(checkCol + 1, column.Length - checkCol - 1); } //UltraGridColumn gCol = uGrid.Columns.FromKey(column); GridField gCol = uGrid.Columns.FromKey(column); //here the error is coming FYI... int chrLen = searchStr.Length; string fndExp; Regex fndRexp; bool flgReplace = false; int cntModified = 0; bool flgNotFound = true;
Thank you for using our forum!
You can access tab items directly by their index. For example contentTab.Tabs[tabIndex].
To find control in the tab you have to call FindControl (The Content property does not exist in the webTab).
In you sample the code will look like this:
contentTab.Tabs[tabIndex].FindControl("WebDateTimeEditor_DateOnly" + tabIndex);
Let me know if I may be of further assistance.