How to Set Postback tigger for Button in side Rad Grid.At server side.

4 posts, 0 answers
  1. Sairam
    Sairam avatar
    56 posts
    Member since:
    May 2013

    Posted 21 May 2013 Link to this post


    <telerik:RadGrid>
    <telerik:GridTemplateColumn Visible="true" DataField="Signature" HeaderText="Signature"
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Signature">
                        <ItemTemplate>
                            <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" DataValue='<%#Eval("Signature") is DBNull ? null : Eval("Signature")%>'
                                AutoAdjustImageControlSize="false" ResizeMode="Fit" Height="50px" Width="120px" />
                        </ItemTemplate>
                        <InsertItemTemplate>
                            <telerik:RadAsyncUpload runat="server" ID="ImgImages2" AllowedFileExtensions=".jpg,.jpeg,.png,.gif"
                                MaxFileInputsCount="1" Skin="Outlook" Width="110px" PostbackTriggers="RbtnReset1"  />
                            <asp:Label ID="lblupload2" runat="server" Visible="true" CssClass="error"></asp:Label>
                        </InsertItemTemplate>
    </telerik:GridTemplateColumn>

     <telerik:GridTemplateColumn Visible="true" DataField="chkNumber" HeaderText="Check Number"
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="chkNumber">
                       
                        <ItemTemplate>
                            <%# Eval("chkNumber")%><%--.ToString().PadLeft(4, '0')%>--%>
                        </ItemTemplate>
                        <InsertItemTemplate>
                            <telerik:RadTextBox ID="rdtxtchkNumber1" runat="server" Width="160px" MaxLength="4"
                                onclick="shouldConfirm = true;" Text='<%# Eval("chkNumber") %>'>
                            </telerik:RadTextBox>
                            <telerik:RadButton ID="RbtnReset1" runat="server" Width="40px" CausesValidation="true"
                                Text="Reset" OnClick="RbtnResetCheckNoinInsert_Click" />
                      </InsertItemTemplate>
       </telerik:GridTemplateColumn>


    I am upload a Image ,using rad async  upload ..after that I am click on the reset button ,I don't want to loss the  image .how persist the image upload by user up to the user click on insert or update in rad grid.  using post back trigger   at server side code. plz help me.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 May 2013 Link to this post

    Hi,

    Please have a look at this documentation on Persist Uploaded Files and Preserve Uploaded Configuration. Also have a look at this demo on Uploaded File Persistence across Postbacks.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sairam
    Sairam avatar
    56 posts
    Member since:
    May 2013

    Posted 22 May 2013 Link to this post

    Thanks Shinu,
    But i am Not achieved the the async upload persistent in rad grid ,please can you help me,how to achieve  persistent in  async upload in rad grid  ,some other post back happens...Please give the sample code based on the add image.....this not only my problem,
    this type of demo's or "previous post not  a available" on grid async persistent On upload of post back trigger  .....your give a sample code for this it's useful  to "many telerik users". ....
  5. Kostadin
    Admin
    Kostadin avatar
    1708 posts

    Posted 24 May 2013 Link to this post

    Hello Sairam,

    I am afraid you could not persist the uploaded file this way in your scenario. The reason is that RadButton is still not rendered and could not be set as PostbackTriggers. What I could suggest is to disable the postback on the button and move your logic on client side.

    Regards,
    Kostadin
    Telerik
    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.
Back to Top