In this example, the ASPxGridView's unbound column contains hyperlinks (ASPxHyperLink controls).
<dx:GridViewDataTextColumn FieldName="Url" UnboundType="Object" VisibleIndex="6">
<DataItemTemplate>
<dx:ASPxHyperLink ID="ASPxHyperLink" OnLoad="ASPxHyperLink_Load" runat="server" Target="_blank" Text="No data uploaded">
</dx:ASPxHyperLink>
</DataItemTemplate>
<%--...--%>
</dx:GridViewDataTextColumn>
The links are initially empty. The column's EditItemTemplate contains ASPxUploadControl, which allows users to upload files in edit mode.
<dx:GridViewDataTextColumn FieldName="Url" UnboundType="Object" VisibleIndex="6">
<%--...--%>
<EditItemTemplate>
<dx:ASPxUploadControl ID="ASPxUploadControl1" ShowProgressPanel="true" UploadMode="Auto" AutoStartUpload="true" FileUploadMode="OnPageLoad"
OnFileUploadComplete="ASPxUploadControl1_FileUploadComplete" runat="server">
<ValidationSettings MaxFileSize="4194304" MaxFileSizeErrorText="Size of the uploaded file exceeds maximum file size" AllowedFileExtensions=".jpg,.jpeg">
</ValidationSettings>
<ClientSideEvents FileUploadComplete="OnFileUploadComplete" />
</dx:ASPxUploadControl>
<%--...--%>
</EditItemTemplate>
</dx:GridViewDataTextColumn>
The Url column displays the uploaded image names. Click a name to open the image.
- Default.aspx (VB: Default.aspx)
- Default.aspx.cs (VB: Default.aspx.vb)