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

Usercontrol Edit Form/Form Decoration in RadGrid

7 Answers 200 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
aung maw
Top achievements
Rank 1
aung maw asked on 09 Mar 2009, 03:58 PM

I'm trying to add RadUpload control into Usercontrol edit form in RadGrid. When I do that I dont' see Select button and text box. I only see Add & Delete buttons. Secondly, I'm trying to do FormDecoration in Usercontrol edit form for RadGrid and for some reason it is not working. Meaning, checkbox'es would not appear. But, If I remove Decoration then they would appear. Any help is greatly appreciated.

7 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 12 Mar 2009, 09:47 AM
Hello aung,

I tried to replicate the problem in a simple scenario but with no success. Could you paste some of your markup so I can get a better idea of what you are doing?

Kind regards,
Pavel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
aung maw
Top achievements
Rank 1
answered on 12 Mar 2009, 08:51 PM

Hi Pavel, Thanks for your reply.  I originally posted that I had a problem with UserControl edit form, but I tried with FormTemplate and I'm having same issue as shown below.  As you can see I have two RadUpload Controls and first one is outside of RadGrid and it works fine, meaning I can see Select button to upload a file. But, the one inside of a RadGrid does not show Select button.  I only see Add & Delete buttons.  When I click Add nothing happens. 

I forget to mention that I'm calling this page (Custom User Conrol) from Sitefinity.  I'm using Community edition and Master Page is CommunityHome and Theme is Template Theme which comes out of the box.

Many Thanks,


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Report.ascx.cs" Inherits="Custom_Report" %>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

                <script type="text/javascript">
                function mngRequestStarted(ajaxManager, eventArgs)
                {
                  if(eventArgs.EventTarget == "mngBtnExcel" || eventArgs.EventTarget == "mngBtnWord" || eventArgs.EventTarget == "mngBtnCSV" || eventArgs.EventTarget == "mngBtnPDF")
                  {
                     eventArgs.EnableAjax = false;
                  }
                }
                function pnlRequestStarted(ajaxPanel, eventArgs)
                {
                  if(eventArgs.EventTarget == "pnlBtnExcel" || eventArgs.EventTarget == "pnlBtnWord" || eventArgs.EventTarget == "pnlBtnCSV" || eventArgs.EventTarget == "pnlBtnPDF")
                  {
                     eventArgs.EnableAjax = false;
                  }
                }
                </script>
</telerik:RadCodeBlock>
           
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
   
    onajaxsettingcreating="RadAjaxManager1_AjaxSettingCreating">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"
    Width="75px" Transparency="20">
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
        style="border: 0px;" />
</telerik:RadAjaxLoadingPanel>
<table style="width:100%;">
    <tr>
        <td>
    <asp:Label ID="lblMission" runat="server" style="font-weight: 700"></asp:Label>
            <telerik:RadMenu ID="RadMenu1" Runat="server" Skin="Vista"
                onitemdatabound="RadMenu1_ItemDataBound">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
            </telerik:RadMenu>
        </td>
        <td>
            <asp:LinkButton ID="pnlBtnExcel" runat="server" onclick="pnlBtnExcel_Click">Export
            Excel</asp:LinkButton>
        </td>
        <td>
            <asp:Button ID="pnlBtnPdf" runat="server" onclick="pnlBtnPdf_Click"
                style="margin-left: 0px" Text="I need Pdf" Visible="False" />
        </td>
    </tr>
</table>
<p>
    </p>
<telerik:RadUpload ID="RadUpload1" Runat="server">
</telerik:RadUpload>
<telerik:radajaxpanel id="RadAjaxPanel1" runat="server" clientevents-onrequeststart="pnlRequestStarted"
    height="200px" width="450px">
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"
        AllowSorting="True" AutoGenerateEditColumn="True" GridLines="None"
        oncolumncreated="RadGrid1_ColumnCreated" onitemcommand="RadGrid1_ItemCommand"
        onneeddatasource="RadGrid1_NeedDataSource"
        onupdatecommand="RadGrid1_UpdateCommand" PageSize="20" ShowGroupPanel="True"
        Skin="Office2007" Width="767px">
        <headercontextmenu>
            <collapseanimation duration="200" type="OutQuint" />
        </headercontextmenu>
        <PagerStyle Mode="NextPrevAndNumeric" />
        <mastertableview>
            <Columns>
                <telerik:GridButtonColumn CommandName="Confirm" Text="Confirm"
                    UniqueName="btnConfirm">
                </telerik:GridButtonColumn>
            </Columns>
            <editformsettings editformtype="Template">
                <formtemplate>
                    <div id="zone1">
                        <table>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <asp:TextBox ID="ReportId" runat="server" Text='<%# Bind( "ReportId" ) %>'
                                        Visible="false"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    IndexNo</td>
                                <td>
                                    <asp:TextBox ID="xxx" runat="server" ReadOnly="true"
                                        Text='<%# Bind( "xxx" ) %>'></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Valid</td>
                                <td>
                                    <asp:CheckBox ID="Valid" runat="server" Checked='<%# Bind( "Valid" ) %>' />
                                </td>
                            </tr>
                                                       <tr>
                                <td>
                                    Remarks</td>
                                <td>
                                    <asp:TextBox ID="Remarks" runat="server" Rows="3"
                                        Text='<%# Bind( "Remarks" ) %>' TextMode="MultiLine"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    <telerik:RadUpload ID="RadUpload2" Runat="server">
                                    </telerik:RadUpload></td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <asp:Button ID="btnUpdate" runat="server" CommandName="Update"
                                        Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' />
                                    &nbsp;
                                    <asp:Button ID="btnCancel" runat="server" CausesValidation="False"
                                        CommandName="Cancel" Text="Cancel" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </formtemplate>
            </editformsettings>
        </mastertableview>
        <clientsettings allowdragtogroup="True">
        </clientsettings>
        <filtermenu>
            <collapseanimation duration="200" type="OutQuint" />
        </filtermenu>
    </telerik:RadGrid>
</telerik:radajaxpanel>
<asp:Label ID="lblName" runat="server" Visible="False"></asp:Label>

0
Pavel
Telerik team
answered on 16 Mar 2009, 08:49 AM
Hi Aung,

I have prepared a small sample which behaves as expected on my end. Please take a look at it and see if you can modify it so that the problem becomes evident.

Sincerely yours,
Pavel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
aung maw
Top achievements
Rank 1
answered on 26 Mar 2009, 11:50 AM
Hi Pavel, Thanks for the example and sorry couldn't reply earlier.  The example works fine and I can see the upload control if it a standard ASP.NET application.  I 'm using Sitefinity and it doesn't work when I add a UserControl into Sitefinity page.  Is your example work within Sitefinity as UserControl at your end?

REgards,
AM.

0
Georgi
Telerik team
answered on 30 Mar 2009, 08:07 AM
Hello Aung,

I saw that you are trying to Ajaxify the control in its markup. Please check the KB Article:
I believe this will help you.
All the best,
Georgi
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
xtragames
Top achievements
Rank 1
answered on 30 Mar 2009, 10:47 AM
thanks!
0
aung maw
Top achievements
Rank 1
answered on 31 Mar 2009, 07:16 PM
Thanks You Telerik Team. Regards,
Tags
General Discussions
Asked by
aung maw
Top achievements
Rank 1
Answers by
Pavel
Telerik team
aung maw
Top achievements
Rank 1
Georgi
Telerik team
xtragames
Top achievements
Rank 1
Share this question
or