// validation

                        gridBoundColumn.ColumnValidationSettings.EnableRequiredFieldValidation = true;
                        gridBoundColumn.ColumnValidationSettings.RequiredFieldValidator.Text = "This field is required!";
                        gridBoundColumn.ColumnValidationSettings.RequiredFieldValidator.ErrorMessage = "This field is required!";
                        gridBoundColumn.ColumnValidationSettings.RequiredFieldValidator.ForeColor = Color.Red;
                    }