System.Web.UI.WebControls.DataGrid.ApplyColumnStyle C# (CSharp) Method

ApplyColumnStyle() public method

public ApplyColumnStyle ( System.Web.UI.WebControls.TableCellCollection cells, ListItemType type ) : void
cells System.Web.UI.WebControls.TableCellCollection
type ListItemType
return void
		void ApplyColumnStyle (TableCellCollection cells, ListItemType type)
		{
			int ncells = Math.Min (cells.Count, render_columns.Length);
			if (ncells <= 0)
				return;

			for (int i = 0; i < ncells; i++) {
				Style style = null;
				TableCell cell = cells [i];
				DataGridColumn column = render_columns [i];
				if (!column.Visible) {
					cell.Visible = false;
					continue;
				}

				style = column.GetStyle (type);
				if (style != null)
					cell.MergeStyle (style);
			}
		}