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

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

3 Answers 245 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sairam
Top achievements
Rank 1
Sairam asked on 21 May 2013, 01:58 PM

<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.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 May 2013, 04:27 AM
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.
0
Sairam
Top achievements
Rank 1
answered on 22 May 2013, 06:26 AM
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". ....
0
Kostadin
Telerik team
answered on 24 May 2013, 09:27 AM
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.
Tags
General Discussions
Asked by
Sairam
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Sairam
Top achievements
Rank 1
Kostadin
Telerik team
Share this question
or