This is a migrated thread and some comments may be shown as answers.

Edit Issue

1 Answer 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
SDI
Top achievements
Rank 1
SDI asked on 25 Feb 2012, 11:19 PM
Hello Telerik,

Issue is user adds a new record to the RadGrid, uploads an image with the RadAsyncUpload and puts in some text. So they decide to go back in a and edit the record again. The RadAsyncUpload will not let them Update due to the image missing from the loaded files, they shouldn't have to find it and upload it again. I want the image in the RadBinaryImage field to populate the RadAsyncUpload on edit so they COULD remove it if they want to erase the image from the data record. Is this possible? If its not is there a workaround, otherwise the users are handicapped to find the image again, and they could never delete the image. Here is the ASPX code:

<telerik:GridTemplateColumn DataField="Image" HeaderText="Image" UniqueName="UploadImage" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" ItemStyle-Width="100px" ItemStyle-Height="100px">
    <ItemTemplate>                                           
        <telerik:RadBinaryImage runat="server" ID="RadBinaryImage2" DataValue='<%# Eval("Image") %>' AutoAdjustImageControlSize="false" Height="100px" Width="100px" ToolTip='<%#Eval("Name", "Product: {0}") %>' AlternateText='<%#Eval("Name", "{0}") %>' />                                           
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadAsyncUpload runat="server" ID="AsyncUpload2" OnClientFileUploaded="OnClientFileUploadedStore" AllowedFileExtensions="jpg,jpeg,png,gif" MaxFileSize="1048576" OnValidatingFile="RadAsyncUpload1_ValidatingFile" />                                           
        <asp:Label runat="server" CssClass="lblWarning" Text="To make your image appear uniform, make the dimensions squared (ie: 100W x 100H) as PNG transparent."/>
    </EditItemTemplate>
</telerik:GridTemplateColumn>

Thanks
SDI

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 29 Feb 2012, 03:42 PM
Hello,

How you are performing the Insert/Update operations in RadGrid? Most probably the problem is caused wrong insert operation. You could check this online demo application which implements similar scenario like yours.

All the best,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
SDI
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or