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 325 'Infragistics.Web.UI.GridControls.GridField' does not contain a definition for 'CellStyle' and no extension method 'CellStyle' accepting a first argument of type 'Infragistics.Web.UI.GridControls.GridField' could be found (are you missing a using directive or an assembly reference?)
Below is the old code which I am trying to fix but above error is coming....
foreach (DataRow dr in ds.Tables[0].Rows) { uGrid.DisplayLayout.Bands[0].Columns[colCount].Header.Caption = dr[1].ToString(); uGrid.Columns[colCount].CellStyle.BackColor = Color.LightGray; colCount++; }
Hello Jack,
In order to set some style to a cell through the code behind my suggestion is to access Row Items collection. Each Item represents cell from the Grid. You can access its Value, Column and event CssClass. Use this CssClass in order to change the style of the cell:
Grid.Rows[0].Items[0].CssClass
Related reference:
http://es.infragistics.com/community/forums/t/81006.aspx
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; uGrid.DisplayLayout.Bands[0].Columns[colCount].CellStyle.Padding.Right = Unit.Pixel(3); uGrid.DisplayLayout.Bands[0].Columns[colCount].CellStyle.HorizontalAlign = HorizontalAlign.Right; uGrid.DisplayLayout.Bands[0].Columns[colCount].Width = Unit.Pixel(150); break;
The above I am trying to fix old code of UltraWebGrid to new WebDataGrid............