Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
134 views
HI,

I have a Requirement that  Rad Upload inside Ajax Modal Popup Extender.
when i implementing  i getting radupload.uploadfiles.count is 0 (Zero).

Following is the  Aspx code .

                <asp:UpdatePanel ID="updHead" runat="server">
                    <ContentTemplate>
<Ajax:ModalPopupExtender ID="mpeRespond" runat="server" TargetControlID="lblRespond"
                                BackgroundCssClass="modalBackground" PopupControlID="divRespond" CancelControlID="lblRespond"
                                DynamicServicePath="" Enabled="True" />
                            <asp:Label ID="lblRespond" runat="server" meta:resourcekey="lblRespondResource1"></asp:Label>
                            <div id="divRespond" style="display: none; width: 60%;" runat="server" class="popup">
                                <div class="popUpTitle">
                                    <asp:Label ID="lblResponseHead" runat="server" Text="Response" meta:resourcekey="lblResponseHeadResource1"></asp:Label></div>
                                <div class="popupContent">
                                    <div class="infoContainer">
                                        <div class="infoContent">
                                            <span class="mandetory">*</span> Indicates Mandatory Fields.</div>
                                    </div>
                                    <asp:Label ID="lblmsg" runat="server" Visible="False" ForeColor="Red" Font-Bold="True"
                                        meta:resourcekey="lblmsgResource1"></asp:Label>
                                    <span class="mandetory">*</span>
                                    <asp:Label ID="lblShortDesc" runat="server" CssClass="formLabelL" meta:resourcekey="lblShortDescResource1">Short Description : </asp:Label><br />
                                    <asp:RegularExpressionValidator ID="revSubject" runat="server" ControlToValidate="txtShortdesc"
                                        ValidationExpression="[^<>]+" ErrorMessage="Short Description <br/> should not contain '<' '>'"
                                        Display="None" Width="600px" ValidationGroup="Mandatory" meta:resourcekey="revSubjectResource1"></asp:RegularExpressionValidator>
                                    <asp:RequiredFieldValidator ID="rfvShortdesc" runat="server" ControlToValidate="txtShortdesc"
                                        ErrorMessage="Enter<br/>Response<br/>Short<br/>Description" Display="None" ValidationGroup="Mandatory"
                                        meta:resourcekey="rfvShortdescResource1"></asp:RequiredFieldValidator>
                                    <Ajax:ValidatorCalloutExtender ID="vceShortdesc1" runat="server" TargetControlID="revSubject"
                                        Enabled="True">
                                    </Ajax:ValidatorCalloutExtender>
                                    <Ajax:ValidatorCalloutExtender ID="vceshored2" runat="server" TargetControlID="rfvShortdesc"
                                        Enabled="True">
                                    </Ajax:ValidatorCalloutExtender>
                                    <asp:TextBox ID="txtShortdesc" runat="server" Height="50px" TextMode="MultiLine"
                                        MaxLength="140" Width="90%" ToolTip="Enter Short Description For Your Response"
                                        TabIndex="1" onKeyDown="textCounter(140)" onKeyUp="textCounter(140)" meta:resourcekey="txtShortdescResource1"></asp:TextBox>
                                    <div class="info">
                                        <input id="count" readonly="readonly" runat="server" type="text" maxlength="3" value="140"
                                            class="mybox" style="text-align: right;" />
                                        characters left</div>
                                        <asp:UpdatePanel runat ="server" UpdateMode="Always" ><ContentTemplate >
                                    <div>
                                        <table>
                                            <tr align="left" id="trlnkAttach" runat="server">
                                                <td style="background: #f6f4eb; border-top: 1px solid #e8e8e5;">
                                                </td>
                                                <td valign="top" style="text-align: right; background: #f6f4eb; border-top: 1px solid #e8e8e5;">
                                                    <img style="border-width: 0px;" src="../App_Themes/Default/Images/Icons/attachment.png" alt ="Click Here To Attach Files"><asp:LinkButton
                                                        ID="lnkAttach" runat="server" Text="Attach Files" ToolTip="Click Here To Attach Files"
                                                        TabIndex="4"></asp:LinkButton>
                                                </td>
                                            </tr>
                                            <tr id="trupload" align="right" runat="server" visible="true">
                                                <td style="background: #f6f4eb;">
                                                </td>
                                                <td valign="top" style="text-align: left; padding: 2px; background: #f6f4eb;">
                                                    <asp:Panel runat="server" ID="pnlRadUpload">
                                                        <table cellpadding="2" cellspacing="0" border="0">
                                                            <tr align="left">
                                                                <td align="left">
                                                                    <telerik:RadUpload ID="RadUploadAttachs" ReadOnlyFileInputs="True" Skin="Outlook"
                                                                        runat="server" TabIndex="5" Width="600px" OnValidatingFile="RadUploadAttachs_ValidatingFile"
                                                                        OnClientFileSelected="checkExtension" ControlObjectsVisibility="RemoveButtons, AddButton"
                                                                        InputSize="55">
                                                                        <Localization Select="Browse" />
                                                                    </telerik:RadUpload>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td style="background: #f6f4eb;">
                                                                    &nbsp;
                                                                </td>
                                                            </tr>
                                                            <tr align="left">
                                                                <td align="left" style="background: #f6f4eb;">
                                                                  
                                                                       <asp:Label ID="lblFileInfo" Text="Files Information :" runat="server" meta:resourcekey="lblFileInfoResource1"></asp:Label></span>
                                                                       
                                                                </td>
                                                            </tr>
                                                            <tr align="left">
                                                                <td align="left" style="background: #f6f4eb;">
                                                                    <span style="color: #333; font-size: 11px;">
                                                                        <asp:Label ID="lblUpdInfo" runat="server" Width="600px" meta:resourcekey="lblUpdInfoResource1"></asp:Label></span>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </asp:Panel>
                                                    <Ajax:CollapsiblePanelExtender runat="server" ID="AjaxCPE" TargetControlID="pnlRadUpload"
                                                        CollapseControlID="lnkAttach" ExpandControlID="lnkAttach" Collapsed="True" CollapsedSize="0"
                                                        ExpandedText="Attach Files" TextLabelID="lnkAttach" SuppressPostBack ="true"   Enabled="True">
                                                    </Ajax:CollapsiblePanelExtender>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    </ContentTemplate></asp:UpdatePanel>
                                    <asp:Label ID="lblLongDesc" runat="server" CssClass="formLabelL" meta:resourcekey="lblLongDescResource1">Detailed Description : </asp:Label><br />
                                    <custom:CustomEditor ID="txtLongDesc" runat="server" NoScript="True" AutoFocus="False"
                                        TabIndex="2" ToolTip="Enter Detailed Decription For Your Response" meta:resourcekey="txtLongDescResource1">
                                    </custom:CustomEditor>
                                </div>
                                <div class="popBtn">
                                    <div class="popBtnContent">
                                        <asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="Mandatory" ToolTip="Click Here To Save"
                                            TabIndex="3" OnClick="btnSave_Click" CssClass="button" meta:resourcekey="btnSaveResource1" />
                                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="cancelBtn" CausesValidation="False"
                                            ToolTip="Click Here To Cancel" TabIndex="4" OnClick="btnCancel_Click" meta:resourcekey="btnCancelResource1" />
                                    </div>
                                </div>
                            </div>
                        </div>
  </ContentTemplate>
                </asp:UpdatePanel>


Sebastian
Telerik team
 answered on 15 Nov 2010
3 answers
131 views
I am getting a javascript error "fileInput is undefined" when the radasyncupload control validats for file size on the client. Here is my declaration:

 
<script type="text/javascript">
                                    Telerik.Web.UI.RadAsyncUpload.Modules.Flash.isAvailable = function() { return false; }
                                </script>
                                <telerik:RadAsyncUpload runat="server" 
                                                        ID="rauResume" 
                                                        Skin="Office2007" 
                                                                                                                ReadOnlyFileInputs="true" 
                                                                                                                MultipleFileSelection="Disabled"
                                                        MaxFileInputsCount="1"
                                                        MaxFileSize="409"
                                                        >
                                </telerik:RadAsyncUpload>
Yana
Telerik team
 answered on 15 Nov 2010
3 answers
49 views
Hey everyone,

I am using a radgrid,with manual insert,delete and updates from external button clicks.I just want to know how can i use loading panel when debugger runs to these events.I am trying this--
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="btnSearch">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Hay"
            EnableSkinTransparency="true" Transparency="30">
        </telerik:RadAjaxLoadingPanel>

the first one is doing fine,but as i want this to be visible on btnSearch_Click.And after this OnClick event is not firing.Nothing happens.How to do this?...

Thanks
Amit
Pavlina
Telerik team
 answered on 15 Nov 2010
6 answers
306 views
As described in my previous post, I've created a custom field editor for the RadFilter and restricted the available filter functions in the filter menu. The available functions are Contains, DoesNotContain, IsEmpty, and NotIsEmpty. When the editor is first created, however, the default filter function selected is EqualTo - even though EqualTo is not allowed in the menu. I've attached a screenshot where you can see EqualTo is selected even though it isn't in the list of available filter functions.

I'm guessing that since I'm hiding the filter menu items client-side, the RadFilter doesn't know that EqualTo is not a valid selection for a filter function when creating the new field editor server-side. How can I change the default filter function for my custom field editor to be Contains instead of EqualTo?
Campus Labs
Top achievements
Rank 1
 answered on 15 Nov 2010
2 answers
260 views
Good day,

I have the following. I have a dropdownlist control in an Insert view mode. I need that my dropdownlist populates a pair of textbox controls from the database in the same view. I'm using the ddlEntityTypeFilter_SelectedIndexChanged event in order to do it. However I have got an error during the process since the Texbox control is returning a null value then I haven't been able to populate the texbox controls. Actually I need to populate Encargado2 and Email2 textbox controls.

Here is the aspx file:
<telerik:GridTemplateColumn  UniqueName="Nombre" DataField="Nombre" HeaderText="Nombre del Area"
             ForceExtractValue="InEditMode" ConvertEmptyStringToNull="true" >            
               <EditItemTemplate>   
                    <asp:DropDownList CssClass="dropdownlist" ID="ddlNombre" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlEntityTypeFilter_SelectedIndexChanged"></asp:DropDownList
                        <asp:Label ID="LabelNombre" runat="server" Text='<%#Eval("Nombre") %>'></asp:Label>                   
                </EditItemTemplate>
                    <ItemTemplate>
                    <asp:Label ID="LabelNombre" runat="server" Text='<%#Eval("Nombre") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn
 
 <telerik:GridBoundColumn UniqueName="Encargado" DataField="Encargado" HeaderText="Encargado">
      </telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="Email" DataField="Email" HeaderText="Email">
      </telerik:GridBoundColumn>
       
      <telerik:GridTemplateColumn  UniqueName="Encargado2" DataField="Encargado2" HeaderText="Encargado2"
             ForceExtractValue="InEditMode" ConvertEmptyStringToNull="true" Visible="false" >  
          <%--   <ItemTemplate>
                    <asp:Label ID="LabelEncargado2" runat="server" Text='<%#Eval("Encargado2") %>'></asp:Label>
                </ItemTemplate>--%>
                  <EditItemTemplate>   
                    <asp:TextBox  ID="TextBoxEncargado2" runat="server"></asp:TextBox
                        <asp:Label ID="LabelEncargado2" runat="server" Text='<%#Eval("Encargado2") %>'></asp:Label>                   
                </EditItemTemplate>
            </telerik:GridTemplateColumn
       
         <telerik:GridTemplateColumn  UniqueName="Email2" DataField="Email2" HeaderText="Email2"
             ForceExtractValue="InEditMode" ConvertEmptyStringToNull="true" Visible="false" >  
                <%--    <ItemTemplate>
                    <asp:Label ID="LabelEmail2" runat="server" Text='<%#Eval("Email2") %>' ></asp:Label>
                </ItemTemplate>--%>
                 <EditItemTemplate>   
                    <asp:TextBox  ID="TextBoxEmail2" runat="server"></asp:TextBox
                        <asp:Label ID="LabelEmail2" runat="server" Text='<%#Eval("Email2") %>'></asp:Label>                   
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
And the code behind:
protected void ddlEntityTypeFilter_SelectedIndexChanged(object sender, EventArgs e)
{    
    DropDownList dropdown = (DropDownList)sender;
    string value = dropdown.SelectedValue;
    SpecialTablesController sp = new SpecialTablesController();
    GridEditFormInsertItem edititem = (GridEditFormInsertItem)dropdown.NamingContainer;
    TextBox TextBoxID = (TextBox)edititem.FindControl("Encargado2"); -> TextboxID is null     
    Dependencia obj = sp.GetDependencyValues(dropdown.SelectedValue);
    TextBoxID.Text = obj.Encargado;-> I got the error here NullReferenceException
    TextBoxID.Text = obj.EMail;      
 
}
Any suggestion?

Thanks in advance
William
william
Top achievements
Rank 1
 answered on 15 Nov 2010
1 answer
143 views
Hi,

I am trying to display a confirmation box and based on the result I need to do further processing.
Currently, I am using a windows confirm and everything runs fine. I am not able to achieve the same functionality with a radconfirm. Can you assist?

On click of a button I am running this code:
Private Sub ConfirmUpdate(ByVal confirmText As String)
  
        Dim sb As StringBuilder = New StringBuilder()
        sb.Append("<script type='text/javascript'>")
        sb.Append("ConfirmUpdate('" + confirmText + "');")
        sb.Append("</script>")
  
        RadAjaxManager1.ResponseScripts.Add(sb.ToString())
  
    End Sub

In the js I do this:
function ConfirmUpdate(confirmText, action) {
            if (confirm(confirmText)) {
                document.getElementById('<%= btnUpdate.ClientID %>').click();
            }
        }

I get js errors when i try the same with radconfirm.
I need to change the style and the confirm button text so I want to use radconfirm. I read somewhere that if(confirm) kind of scenario is not possible with the blocking execution thread functionality of radconfirm.
I am using VB.NET

Please advice.
Cori
Top achievements
Rank 2
 answered on 15 Nov 2010
23 answers
212 views
I have strange problem with the dialogs. Sometimes they do not load completely and when I close the window, the editor stays in gray with freeze mode. What can be the problem?
Rumen
Telerik team
 answered on 15 Nov 2010
6 answers
172 views
IE and Mozilla; the image on the right side of the button is not showing up until I hover. Changing the background-position on the anchor with Firebug has NO effect. I have produced this with custom buttons, but now with the template buttons.

<telerik:RadButton ID="uxSaveTimesheetTop" runat="server"  Text="save timesheet">
    <Icon SecondaryIconCssClass="rbSave" SecondaryIconRight="6" SecondaryIconTop="4" />
</telerik:RadButton>
Bozhidar
Telerik team
 answered on 15 Nov 2010
2 answers
190 views
So my project now requires version control on documents, not just a file explorer.  I decided I could try to accommodate this by having both a file explorer and a grid, the grid being old versions of what the currently selected file in the explorer.

We are using a database on our backend and it is implemented and functional with the file explorer.  To be able to do version control I was able to modify the server side code to allow for versioning.  I have two issues, both being with the file explorer that are stopping me from implementation of version control.

1. I need to be able to communicate from the file explorer to the grid that houses historical files.  When a user clicks a file in the file explorer, I need ajax to load the historical files.  Again, I have the backend set up already to do this.  I do not see any onclick, or onClientClick methods available to use at the fileexplorer.  How can I access these events to trigger the ajax.

2. The upload that comes with File Explorer is pretty out of the box and I see no way to access it.  Whenever I try to upload a file that already exists I receive:

"A file with a name same as the target already exists!"

How can I trump this message and allow inserting into the data.  This is not an overwrite.  Since I had to extend the FileBrowserContentProvider class for my DB implementation I assume that the uploader is calling one of the methods in my custom provider, which in turn is telling the front end that the record exists.  Basically, what server side method that I over wrote does the out of the box uploader call to determine a file already exists?  Whatever method that is I need to apply code to always return that the file does not exist.

If we can resolve these two issues I will have a working File Explorer/ Grid user control that can do Version Control.

Thank you in advance for any input or help.
Jay Leffue
Top achievements
Rank 1
 answered on 15 Nov 2010
2 answers
256 views
Some skins (WebBlue, for example) have alternating colour rows enabled by default, others (including Office2007) don't.

Is it possible in a App_Theme's .skin file to enable alternating colours if the Skin setting for the RadGrid is one for which the alternating colours are usually disabled?

-- 
Stuart
Dimo
Telerik team
 answered on 15 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?