System.Web.UI.WebControls.GridView.ExtractRowValues C# (CSharp) Method

ExtractRowValues() protected method

protected ExtractRowValues ( IOrderedDictionary fieldValues, GridViewRow row, bool includeReadOnlyFields, bool includePrimaryKey ) : void
fieldValues IOrderedDictionary
row GridViewRow
includeReadOnlyFields bool
includePrimaryKey bool
return void
		protected virtual void ExtractRowValues (IOrderedDictionary fieldValues, GridViewRow row, bool includeReadOnlyFields, bool includePrimaryKey)
		{
			DataControlField field;
			foreach (TableCell cell in row.Cells) {
				DataControlFieldCell c = cell as DataControlFieldCell;
				if (c == null)
					continue;
				
				field = c.ContainingField;
				if (field != null && !field.Visible)
					continue;
				
				c.ContainingField.ExtractValuesFromCell (fieldValues, c, row.RowState, includeReadOnlyFields);
			}
			if (!includePrimaryKey && DataKeyNames != null)
				foreach (string key in DataKeyNames)
					fieldValues.Remove (key);
		}