Telerik Forums
UI for ASP.NET AJAX Forum
11 answers
366 views
Hi!

We are trying to validate controls in a form template. The javascript code shown below fires, but how do I reference the controls in the template in code behind? We want to make sure the text box and combo box has a value.

Thanks for your help!

<editformsettings editformtype="Template">
    <FormTemplate>
 
        <telerik:RadTextBox ID="inputBoxIdentifier" runat="server" CssClass="inputBox" Style="top: 0px; left: 0px" Skin="Windows7" SelectionOnFocus="SelectAll" EnableViewState="true">
        <InvalidStyle CssClass="inputBoxInvalid" />
 
        <telerik:RadComboBox ID="comboBoxIdentifier" runat="server" CssClass="radComboBox" OnDataBound="radComboBox_DataBound"
        OnSelectedIndexChanged="radComboBox_SelectedIndexChanged" Filter="Contains" Skin="Windows7"
        EnableLoadOnDemand="true" EnableViewState="true" />
 
        <telerik:RadButton ID="radButtonInsertUpdate" runat="server" OnClientClicking="performInsertOrUpdate"
            Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' CssClass="esbutton" />
        <telerik:RadButton ID="radButtonCancelInsertUpdate" runat="server" OnClientClicking="cancelInsertOrUpdate"
            Text="Cancel" CausesValidation="false" CommandName="Cancel" CssClass="esbutton" />
 
    </FormTemplate>
</editformsettings>
 
 
 
 
function performInsertOrUpdate(sender, args) {
            var error = 0;
 
            var controlRef = $find("<%= radGridClientIdentifiers.ClientID %>").get_masterTableView();
 
            // any items being inserted?
            var insertedItem = controlRef.get_insertItem();
            if (insertedItem != null) {
                 
            }
 
            var editedItemsArray = controlRef.get_editItems();
            if (editedItemsArray.length > 0) {
                 
            }
 
            if (error == 1)
                return false;
 
            return true;
        }


Tsvetina
Telerik team
 answered on 01 Jun 2012
1 answer
84 views
Hi,
        I have a RadGrid with PDF option. when I set the UseStaticHeader true, PDF content not showing. but when removing the UseStaticHeader from property PDF content will display. My requirement is UseStaticHeader should be there and PDF content also needed. Please help...

Thanks in advance
Jesmon Joseph
Shinu
Top achievements
Rank 2
 answered on 01 Jun 2012
1 answer
125 views
I have an internal site that runs under IE8 with Intranet settings, and thus runs in Compatibilty mode.  I do not have the access or permission to force the site into regular mode using headers or IIS - in other words, it must run in Compatibility mode.

On the site, I have an Upload control that resides on an asp:Panel, that is associated with the ajax control toolkit's ModalPopupExtender.  The Upload control is set to use 3 input boxes.

When the user opens the modal, and I have enablefileinputskinning="false", the input boxes have an inline style assigned that sets the width as 15px (see attached image fileskinfalse.png).  If I set the enablefileinputskinning="true", the input boxes are the correct size, but are transparent through the modal down to the page, and the user can't interact with the elements (see image fileskintrue.png).

Any thoughts or ideas on how to get the input boxes to show correctly?

Plamen
Telerik team
 answered on 01 Jun 2012
2 answers
91 views
Hello

I believe the title says it all.
From the documentation I know that autoSize doesn't work with navigateUrl from other domains.
But i am adressing another webserver in the same domain, and autoSize still doesn't work.
However, with a page from the running application in the navigateUrl it works.

Any ideas?

Thanks
Bjorn Sagbakken
Bjorn Sagbakken
Top achievements
Rank 1
 answered on 01 Jun 2012
9 answers
278 views
I use the AsyncUpload control and it showed me javascript error message as below.
"Access is denied."
It only occurred in IE 9.
Here is my code. Please help me.

<telerik:RadButton ID="RadButtonFiles" runat="server" AutoPostBack="false" EnableSplitButton="true" Text="Files"
    TabIndex="11" CssClass="RadButton_SimpleCustomAutoWidth" Width="100%" UseSubmitBehavior="false"
    OnClientClicked="RadButtonFiles_OnClientClicked" EnableEmbeddedSkins="false" />
<telerik:RadContextMenu ID="RadContextMenuFiles" runat="server" EnableEmbeddedSkins="false" EnableRoundedCorners="true">
    <Items>
        <telerik:RadMenuItem Text="Select Files" NavigateUrl="javascript:RadContextMenuFilesSelectFiles_OnClick();" PostBack="false" />
    </Items>
</telerik:RadContextMenu>
 
<telerik:RadAsyncUpload ID="RadAsyncUploadSelectFiles" runat="server" EnableEmbeddedSkins="false"
    OnClientFileSelected="RadAsyncUploadSelectFiles_OnClientFileSelected"
    DisablePlugins="true" TemporaryFileExpiration="0">
</telerik:RadAsyncUpload>


var $fileInput;
 
function pageLoad() {
    var fileUpload = $get(g_radUploadSelectFilesClientID);
    if (fileUpload != null) {
        fileUpload.style.visibility = "hidden";
    }
}
 
function RadContextMenuFilesSelectFiles_OnClick() {
    $fileInput = $("input:file").eq(0);
    $fileInput.click();
}
Dimitar Terziev
Telerik team
 answered on 01 Jun 2012
4 answers
157 views
Hi, 

I have a following scenario:
Generate page with dynamic controls. One of these controls is rad combo box with footer template and item template. 
In footer template was added button. I want this button to call the event ItemsRequest.
I will use this button to clean cache rad combo box.
Ivana
Telerik team
 answered on 01 Jun 2012
0 answers
78 views
I am using RadAjaxManager and RadAjaxManagerProxy for achieving AJAX in my page.  I have asp:PlaceHolder which have all dynamic controls and i want to refresh those set of controls on AJAX call. I have put that in panel which i have placed in div to get the fix region with scroll bar.

<div id="dvQuestionSection" class="QuestionSection" onscroll="SetQuestionSectionScrollPos()">
    <asp:Panel ID="pnlPhFields" runat="server">
        <asp:PlaceHolder ID="phFields" runat="server"></asp:PlaceHolder>
    </asp:Panel>
</div>
 
After ajax call gets completed, scroll position of div gets changed. And what i have noticed is, this happens especially when I have RadEditor control in place holder and it set the scroll position so that RadEditor comes visible.

I want to be on same scroll position where I am invoking ajax call.
Any direction on this will be a great help.

Thanks
Paresh
Nayan
Top achievements
Rank 1
 asked on 01 Jun 2012
1 answer
149 views

In my develop machine everything works fine, but when i put in test server

I have this error:

if(!e){throw"Error while uploading, "+i;

The pop error messages are: 

SCRIPT5022: Unhandled Error in Silverlight Application The remote server returned an error: NotFound.   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at UploadPrototype.MainPage.ProcessResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassd.<InvokeGetResponseCallback>b__b(Object state2)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() 
eval code (526), line 1 character 1

Any ideias?
I folowing this 2 threads but with no success:

http://www.telerik.com/community/forums/aspnet-ajax/async-upload/custom-handler-scenario-throwing-an-error.aspx 
http://www.telerik.com/community/forums/aspnet/general-discussions/problem-in-async-upload.aspx 

my web config is:


<system.web>
<httpRuntime  requestValidationMode="2.0" />
 
    <httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
<add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false"/>
<add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler,Telerik.Web.UI"/>
</httpHandlers>




AND



<system.webServer>
 <modules runAllManagedModulesForAllRequests="true" />
 <validation validateIntegratedModeConfiguration="false" />
    <handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="ScriptResource" preCondition="integratedMode" verb="GET, HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="RadUploadProgressHandler" verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler,Telerik.Web.UI"/>
<add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode"/>
</handlers>



Pedro
Top achievements
Rank 1
 answered on 01 Jun 2012
2 answers
106 views
Hi,

I have an issue where setting args.set_cancel(true) in the OnClientFileUploading event doesn't seem to cancel the upload.

I have a small working example of this.

The example checks that you are not uploading two files with the same name.  Upon detecting that you are, it displays an alert and sets the cancel to true.  I note however that when posting back, I still get a FileUploaded server event for each file, including the cancelled one(s).

How do I know that one of those is actually cancelled?  What is the expected functionality of cancelling the upload through this method?  All that seems to happen is the file indicator turns red but otherwise it seems it makes no difference to functionality.

Please help! :)

Andrew
Peter Filipov
Telerik team
 answered on 01 Jun 2012
2 answers
133 views
Hi, i added Template column in RadGrid and in this template added LinkButton, i want that when i clicked LinkButton to get this LinkButton text.
Thanks.
Mind
Top achievements
Rank 1
 answered on 01 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?