Hello,
my project work with dynamic column. If I add a GridBinaryImageColumn I can see it at the RadGrid. But if I start the Edit or the Insert I get an exception. In your documentation you insert javascript and _ItemCreated (…) function. I see a difference to add a GridBinaryImageColumn to designtime and to runtime
GridBinaryImageColumnEditor editor = ((GridEditableItem)e.Item).EditManager.GetColumnEditor(“Upload”) as GridBinaryImageColumnEditor;
TableCell cell = (TableCell)editor.RadUploadControl.Parent; // add at rundtime = null
CustomValidator validator = new CustomValidator();
validator.ErrorMessage = "Please select file to be uploaded";
validator.ClientValidationFunction = "validateRadUpload";
validator.Display = ValidatorDisplay.Dynamic;
cell.Controls.Add(validator);
add function:
var gbic = new GridBinaryImageColumn();
gbic.HeaderText = row.ShowName;
gbic.ReadOnly = row.Edit; //true or false no difference
gbic.DataField = row.ColumnName; //Upload
gbic.UniqueName = row.ColumnName;
gbic.ImageAlign = ImageAlign.NotSet;
gbic.DataAlternateTextField = "Typ35";
gbic.DataAlternateTextFormatString = "Image of {0}";
dataGrid.MasterTableView.Columns.Add(gbic);
(Add another column type it works)
Thanks for your help
(I see the same problem with a GridBinaryImageColumn (add at designtime) if ReadOnly = true and I AddNewRecord)