The telerik grid example:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/raduploadinajaxifiedgrid/defaultcs.aspx?product=upload
has the following:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridEditableItem && e.Item.IsInEditMode) |
{ |
GridBinaryImageColumnEditor editor = ((GridEditableItem)e.Item).EditManager.GetColumnEditor("Upload") as GridBinaryImageColumnEditor; |
TableCell cell = (TableCell)editor.RadUploadControl.Parent; |
CustomValidator validator = new CustomValidator(); |
validator.ErrorMessage = "Please select file to be uploaded"; |
validator.ClientValidationFunction = "validateRadUpload"; |
validator.Display = ValidatorDisplay.Dynamic; |
cell.Controls.Add(validator); |
} |
} |
how do I add a required field validator to the upload if I am doing this:
<telerik:gridtemplatecolumn uniquename="Upload" HeaderText="File Name"> |
<itemtemplate> |
<asp:HyperLink ID="hlFile" runat="server" Target="_blank" /> |
</itemtemplate> |
<edititemtemplate> |
<telerik:radupload id="RadUpload1" runat="server" ControlObjectsVisibility="None" InitialFileInputsCount="1" /> |
</edititemtemplate> |
</telerik:gridtemplatecolumn> |
I noticed this example:
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/gridattachmentcolumn/defaultcs.aspx
what about validation on the attachment column?