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

Erasing Selected Signature after Generating Server side popup.

1 Answer 36 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Venkateswarlu
Top achievements
Rank 1
Venkateswarlu asked on 24 Sep 2014, 02:22 PM
Hi Telerik Team,

I am having issue, regarding this i have described like below please go-through once.

First Screenshot: This represents given all details with Signature.

Second Screenshot: This represents after Generating required popup the Selected Signature Erased, this is the issue.

please suggest me if there is any solution.


Here is my Code Snippet:
-------------------------------------
.Aspx:
=====
<asp:UpdatePanel ID="upnl1" runat="server">
        <ContentTemplate>
            <table width="613">
                <tr>
                    <td>
                        <telerik:RadFilter runat="server" ID="RadFilter1" FilterContainerID="RadGrid1" ShowApplyButton="true"
                            ApplyButtonText="Apply Filter">
                        </telerik:RadFilter>
                    </td>
                </tr>
            </table>
            <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" AllowFilteringByColumn="false"
                AllowSorting="true" PageSize="10" OnNeedDataSource="RadGrid1_NeedDataSource"
                AllowPaging="true" Width="600px" ValidationSettings-ValidationGroup="A" CssClass="grid1"
                EnableHeaderContextMenu="true" OnInsertCommand="RadGrid1_InsertCommand" OnUpdateCommand="RadGrid1_UpdateCommand"
                OnItemCreated="RadGrid1_ItemCreated" OnItemDataBound="RadGrid1_ItemDataBound">
                <EditItemStyle BackColor="Gray" />
                <GroupingSettings CaseSensitive="false" ShowUnGroupButton="true" />
                <MasterTableView runat="server" AutoGenerateColumns="false" AllowSorting="true" AllowCustomSorting="true"
                    AllowFilteringByColumn="false" CommandItemDisplay="Top" TableLayout="Auto" DataKeyNames="id">
                    <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="true" />
                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    <CommandItemStyle CssClass="lnkNormal" />
                    <AlternatingItemStyle Height="10px" BackColor="#EAEAEA" ForeColor="#424242" Font-Size="12px" />
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" FooterText="EditCommand footer"
                            EditImageUrl="images/Edit.gif" UniqueName="id" HeaderStyle-Width="40px" />
                     
                        <telerik:GridTemplateColumn DataField="Signature1" HeaderText="Signature" AllowFiltering="false"
                            UniqueName="Signature1" FilterControlWidth="35px" HeaderStyle-Width="100px">
                            <ItemTemplate>
                                <asp:ImageButton OnClick="img_Click" Height="30" Width="80" runat="server" ImageUrl='<%#"ImageHttpHandler.ashx?ProductID="+Eval("id")%>' />
                                <%--<telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("Signature1") %>'
                            AutoAdjustImageControlSize="false" Height="30px" Width="70px" ToolTip="signature"
                            AlternateText="image" ImageUrl="~/images/emptysignature.png"></telerik:RadBinaryImage>--%>
                            </ItemTemplate>
                            <InsertItemTemplate>
                                <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" AllowedFileExtensions=".jpg,.jpeg,.png,.gif"
                                    MaxFileInputsCount="1" Width="200px" onclick="shouldConfirm = true;" PostbackTriggers="PerformInsertButton"
                                    Localization-Select="..." />
                                <asp:Label ID="lblupload1" runat="server" Visible="false" CssClass="error"></asp:Label>
                            </InsertItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadAsyncUpload ID="RadAsyncUpload2" runat="server" AllowedFileExtensions=".jpg,.jpeg,.png,.gif"
                                    MaxFileInputsCount="1" Width="200px" onclick="shouldConfirm=true;"
                                    Localization-Select="...">
                                </telerik:RadAsyncUpload>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>

                    </Columns>
                    <EditFormSettings InsertCaption="Create Impound Signatures" CaptionDataField="ServiceID"
                        CaptionFormatString="Edit Impound Signatures">
                        <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                        <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                        <FormStyle Width="150%" BackColor="WhiteSmoke" />
                        <EditColumn UniqueName="GridID" ButtonType="ImageButton" CancelImageUrl="images/Cancel.gif"
                            UpdateImageUrl="images/update.gif" InsertImageUrl="images/update.gif">
                        </EditColumn>
                        <FormTableButtonRowStyle HorizontalAlign="Center" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                    </EditFormSettings>
                </MasterTableView>
                <ClientSettings AllowColumnsReorder="true" EnableRowHoverStyle="true">
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" ScrollHeight="250px"
                        FrozenColumnsCount="1"></Scrolling>
                    <Selecting AllowRowSelect="true" />
                    <Resizing AllowColumnResize="true" AllowRowResize="false" ResizeGridOnColumnResize="true"
                        ClipCellContentOnResize="true" EnableRealTimeResize="false" AllowResizeToFit="false" />
                </ClientSettings>
                <SelectedItemStyle CssClass="rgSelectedRow"></SelectedItemStyle>
            </telerik:RadGrid>
        </ContentTemplate>
    </asp:UpdatePanel>

.Aspx.cs:
======

RadAsyncUpload RadAsyncUpload1 = (RadAsyncUpload)item.FindControl("RadAsyncUpload1") as RadAsyncUpload;

if (local_dts.Tables[0].Rows[i]["DefaultSign"].ToString()=="Yes")
                        {
                            count = 1;
                            RadWindowManager1.RadAlert("Default sign Already Selected.If u want to   choose  another please uncheck this", 330, 100, "TaxImpound", "");
                        }

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 29 Sep 2014, 12:54 PM
Hi,

I investigated the provided screenshots, however, I am not sure I completely understand what is the issue you are experiencing.

If you would like to have only one option selected (Yes/No) you might consider using RadioButton controls. This way you would not need to use additional code to keep only one option selected.

This said, would you elaborate in more detail what is the issue that you have? What are your requirements and what should be the expected result?

Regards,
Viktor Tachev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Venkateswarlu
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or