RadAsyncUpload not appear

2 posts, 0 answers
  1. Mohammad
    Mohammad avatar
    13 posts
    Member since:
    Dec 2012

    Posted 29 Apr 2013 Link to this post

    I have RadAsyncUpload inside RADgrid  edit template , before I ajaxify the control using RadAjaxManager every thing was working fine ,, but after i set it to ajax manager or sournd it between rad ajax panels the control does not appear... 
    here is the code ,, 

        <radscriptblock id="RadScriptBlock1" runat="server">
    <script language="javascript" type="text/javascript">
     
        function OnClientBlurHandler(sender, eventArgs) {
            var textInTheCombo = sender.get_text();
            var item = sender.findItemByText(textInTheCombo);
            //if there is no item with that text
            if (!item) {
                sender.set_text("");
            }
        }
     
    </script>
    <script language="javascript" type="text/javascript">
        function AddNewFields(radUpload, args) {
            var FildNameLable = '<% = Resources.TMS.UI.TM_AddNewTask_lblAttachmentFileName%>';
            var curLiEl = args.get_row();
            var firstInput = curLiEl.getElementsByTagName("input")[0];
            var input = CreateInput("Title", "text");
            input.className = "copyOfRADTextCSS";
            input.id = input.name = radUpload.getID(input.name);
            var label = CreateLabel(FildNameLable, input.id);
            var fileInputSpan = curLiEl.getElementsByTagName("span")[0];
            var firstNode = curLiEl.childNodes[0];
            curLiEl.insertBefore(label, fileInputSpan.nextSibling);
            curLiEl.insertBefore(input, label.nextSibling);
        }
     
        function CreateLabel(text, associatedControlId) {
            var label = document.createElement("label");
            label.innerHTML = text;
            label.setAttribute("for", associatedControlId);
            label.style.fontSize = 12;
     
            return label;
        }
        function CreateInput(inputName, type) {
            var input = document.createElement("input");
            input.type = type;
            input.name = inputName;
            return input;
        }
        function ConfirmMessage(MessageID) {
            var messageBody = '';
            if (MessageID == "TaskParticipateDelete")
                messageBody = '<% = Resources.TMS.UI.Confirmation_TaskDetails_TaskParticipateDeleteConfirmation%>';
            else if (MessageID == "AttachmentDelete")
                var messageBody = '<% = Resources.TMS.UI.Confirmation_TaskDetails_AttachmentDeleteConfirmation%>';
            else if (MessageID == "EndTask")
                var messageBody = '<% = Resources.TMS.UI.Confirmation_TaskDetails_EndTakConfirmation%>';
     
        return confirm(messageBody);
    }
    </script>
    <script type="text/javascript">
        //On insert and update buttons click temporarily disables ajax to perform upload actions
        function conditionalPostback(e, sender) {
            var theRegexp = new RegExp("\.ImageButton1", "ig");
            if (sender.EventTarget.match(theRegexp)) {
                alert(sender.EventTarget.match(theRegexp));
                var upload = $find(window['UploadId']);
                alert(upload.toString());
                //AJAX is disabled only if file is selected for upload
                if (upload.getFileInputs()[0].value != "") {
                    sender.EnableAjax = false;
                    alert("EnableAjax = false");
                }
            }
        }
        // end insert and update issue,
     
            var uploadedFilesCount = 0;
            var isEditMode;
            function validateRadUpload(source, e) {
                // When the RadGrid is in Edit mode the user is not obliged to upload file.
                if (isEditMode == null || isEditMode == undefined) {
                    e.IsValid = false;
     
                    if (uploadedFilesCount > 0) {
                        e.IsValid = true;
                    }
                }
                isEditMode = null;
            }
     
            function OnClientFileUploaded(sender, eventArgs) {
                uploadedFilesCount++;
            }
     
        </script>
        </radscriptblock>
    <telerik:RadAjaxManager DefaultLoadingPanelID="LoadingPanel1" ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="MasterRadGrid">
                <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="MasterRadGrid"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
     
     
    <telerik:RadGrid StatusBarSettings-LoadingText="جاري التحديث" CssClass="GridAlign"
                                ID="MasterRadGrid" runat="server" ShowStatusBar="true" AutoGenerateColumns="False"
                                PageSize="3" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True"
                                GridLines="None" AllowAutomaticDeletes="True" AllowAutomaticInserts="False" AllowAutomaticUpdates="false"
                                OnInsertCommand="MasterRadGrid_InsertCommand" OnDetailTableDataBind="MasterRadGrid_DetailTableDataBind"
                                OnNeedDataSource="MasterRadGrid_NeedDataSource" OnUpdateCommand="MasterRadGrid_UpdateCommand"
                                Skin="Metro" OnDeleteCommand="MasterRadGrid_DeleteCommand" OnItemDataBound="MasterRadGrid_ItemDataBound">
     <PagerStyle Mode="NumericPages"></PagerStyle>
                                <MasterTableView DataKeyNames="CommentID" AllowMultiColumnSorting="True" Width="100%"
                                    CommandItemDisplay="Top" Name="MainComment">
    <FormTemplate>
                                            <div id="content">
                                                <table>
                                                    <tr>
                                                        <td colspan="4" style="width: 40%; padding-right: 15px">
                                                            <telerik:RadAsyncUpload Width="500px" ID="rpTaskAttachments" runat="server">
                                                            </telerik:RadAsyncUpload>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </FormTemplate>
     </EditFormSettings>
                                </MasterTableView>
                            </telerik:RadGrid>

  2. Mohammad
    Mohammad avatar
    13 posts
    Member since:
    Dec 2012

    Posted 05 May 2013 Link to this post

    any one here can help !?
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top