Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
158 views
Hi, I need help for the following problem.

Scenario:
I am trying to update RadGrid with outside dropdown using RadAjaxManager. I need to do this only when the RadGrid is actually included on the page and when the FormTemplate is shown. This "included or not" is determined by page code behind (on the form that contains the grid) using TDs and making them visible or not, which depends on what's selected on the form by the user.

The control where it all is declared is attached (ascx and ascx.cs). This control is loaded dynamically with other controls in one single page. Trying the RadAjaxManager like attached, it gives me the following error:

Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ctl08_ctl00_ctl08_RadGrid1Panel'. If it is being updated dynamically then it must be inside another UpdatePanel.

I suppose this is because the RadGrid is not present yet on the form.
So how can I update the RadGrid from the outer form only when it is present?

Sorry for not attaching classes because they are rather long, but at least here's the xxx declaration:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
   <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ddlMotivoGasto">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="ddlMotivoGasto" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>

If you need any more code I'll be happy to provide.

Thanks in advance for your kind help.
Regards, Pieter
Christopher
Top achievements
Rank 1
 answered on 15 Mar 2012
0 answers
55 views
Hi Telerik Team,

Will u please respond to this email, I am need of your help.
Please help me.

Thanks
N Aravind
Arvind
Top achievements
Rank 1
 asked on 15 Mar 2012
2 answers
124 views
Hi,

We are using "RadInput.Net2.dll" and RadMaskedTextBox for phone number. For validating phone number format as (###) ###-####, we are using RegularExpressionValidator.

Below is the code we used

 <radI:RadMaskedTextBox ID="txtPhone"  runat="server"></radI:RadMaskedTextBox><br />
             <asp:RegularExpressionValidator ID="revOtherPhone" Display="dynamic" ControlToValidate="txtPhone" ValidationExpression ="^(\([0-9]\d{2}\)|[0-9]\d{2})[- .]?\d{3}[- .]?\d{4}$" ToolTip="Input other phone" ErrorMessage="Enter the correct phone number." runat="server"></asp:RegularExpressionValidator>               

The functionality is working fine OnKeyPress event.
But we do not want to display the error message on every key press. We want to display the error message only on tab / mouse out from text box like demo available in "http://demos.telerik.com/aspnet-ajax/input/examples/common/validation/defaultcs.aspx"

But we have used the same code as mentioned in the demo source code. But we are getting the validation message at every key press event instead of tab out.

Iwe could not find out where the RegularExpressionValidator validation event is setup for RadMaskedTextBox key press. Could you please help me to fix this issue?
Thanks in advance.

Rhbkv
Top achievements
Rank 1
 answered on 15 Mar 2012
2 answers
128 views

We are using "RadInput.Net2.dll" and RadMaskedTextBox for phone number. We want to check if first character of area code should not be 0 or 1.

If we use CustomValidator and javascript as below, it is working fine.
For example, if phone # is "(316) 446-2777" and if I replace 3 as 1, I could see the correct error message. But if I delete 3, I can see numbers in text box as "(_16) 446-2777". But still I can see the error message as "This number cannot begin with a 1 or 0.". The prompt character is not part of the args.value.

I want to display the error message only if first character after ( is 0 or 1. Could you please help us to find out the first character only of the input text
Thanks in advance.

<radI:RadMaskedTextBox ID="txtPhone" runat="server">
             </radI:RadMaskedTextBox><br />          
              
            <asp:CustomValidator id="revBusinessPhone" Display="dynamic" runat = "server" ControlToValidate="txtPhone"  ErrorMessage = "This number cannot begin with a 1 or 0." ClientValidationFunction ="validateLength"  ></asp:CustomValidator>
  
  
  
   function validateLength(oSrc, args) {
  
         var phnVal = args.Value;
        
         if (((phnVal1.substring(0, 2)) == "(1" || (phnVal.substring(0, 2) == "(0"))) {
             oSrc.innerText = "This number cannot begin with a 1 or 0.";
              args.IsValid = false;
  
         }
         else {
         var regex = /^(\([0-9]\d{2}\)|[0-9]\d{2})[- .]?\d{3}[- .]?\d{4}$/;
            if (regex.test(phnVal)) {
                  args.IsValid = true;
             }
             else {
                 oSrc.innerText = "This number must contain 10 digits.";
                  args.IsValid = false;
             }
         }
         return true;
     }
Rhbkv
Top achievements
Rank 1
 answered on 15 Mar 2012
3 answers
75 views
Currently when I click on an appointment to drag it it moves to cover the topmost appointment and goes semi-transparent.
After I have moved the cursor to the position I want the appointment to be in and released the mouse button it just jumps back to where it was before.
Is there any way to re-order items and save the order they were in?
Thanks,
Edward
Ivana
Telerik team
 answered on 15 Mar 2012
12 answers
174 views
I have a treeview which I'm loading on demand via a webservice.

My webservice sets attributes on the nodes to indicate a) whether or not to show the checkbox for that node and b) whether or not the checkbox should be checked.

My treeview has 2 levels.

When the WebService call succeeds, the following code is called to populate the tree...

treeView.get_nodes().clear();
  
if (treeNodesResults != null)
{
    for (var i = 0; i < treeNodesResults.length; i++)
    {
        var node = new Telerik.Web.UI.RadTreeNode();
        node.set_text(treeNodesResults[i].Text);
        node.set_value(treeNodesResults[i].Value);
        node.set_expandMode(treeNodesResults[i].ExpandMode);
        node.set_imageUrl(treeNodesResults[i].ImageUrl);
  
        var checkable = false;
        var checkableAttribute = node.get_attributes().getAttribute("Checkable");
        if (checkableAttribute != null)
        {
            checkable = checkableAttribute == "true";
        }
        node.set_checkable(checkable);
  
        if (checkable)
        {
            var checked = false;
            var checkedAttribute = node.get_attributes().getAttribute("Checked") == "true";
            if(checkedAttribute != null)
            {
                checked = checkedAttribute == "true";
            }
            node.set_checked(checked);
        }
  
        treeView.get_nodes().add(node);
    }
}
And, on the face of it, this appears to work.

However, it seems that this code is only being called for the top-level nodes in the tree. None of the child nodes are being processed by this code. In fact, this code doesn't appear to be being called at all for anything other than the top-level nodes.

Clearly, I'm missing something. Can anyone give me an idea about what it might be?

--
Stuart
msigman
Top achievements
Rank 2
 answered on 15 Mar 2012
2 answers
88 views
I intend to implement 'Drag and Drop' in rearranging Tabs at run-time.
I choose to work with the RadGrid's 'Drag and Drop' feature for Column header rearranging. 

Changing the Layout/CSS for every column header item seems doable. But, I need scroll features like in TabStrip without a scrollbar. Any idea how I could do this? 

I am using ASP.NET AJAX Q3 2010 and have upgrade up to Q3 2011.

Thanks,
Shravan
Shravan
Top achievements
Rank 1
 answered on 15 Mar 2012
2 answers
76 views
I have the trial version. I drag and drop the RadUpload onto my page. I do not see the "Upload All" button for uploading the file. Is this due to because it was a trial version only?

I got this error when I tried to load the page with the RadUpload control and RadScriptManager.

Server Error in '/' Application.

'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: '~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Plamen
Telerik team
 answered on 15 Mar 2012
1 answer
88 views
Hi,

We are having some problems with the Opera 11 and AutoResize of the RadWindow.
We are setting an url to the window. If the content of the window is small (less than 350px) our RadWindow still becomes 350px high (with white space below).

When checking out the autosize source code in Telerik, I discovered the following lines of code:
            if ($telerik.isIE || $telerik.isFirefox)
            {
                sizingElement = contentFrame;
            }

When I did a prototype on the entire autoSize function and including Opera in the if statement, everything worked as expected!!!
Don't know if there are side-effect of this, but normally Opera behaves like these browsers so it should be OK.

Is this something you might fix in a future release?

Regards
Caesar
Marin Bratanov
Telerik team
 answered on 15 Mar 2012
12 answers
452 views
I'm trying to get a basic Schedule running, but I'm getting an error:

Provider 'SchedulerData' has not been declared in web.config

Here is my web.config section that defines it:

<configuration> 
    <configSections> 
    <sectionGroup name="telerik.web.ui">  
      <section name="radScheduler" type="Telerik.Web.UI.RadSchedulerConfigurationSection, Telerik.Web.UI, PublicKeyToken=121fae78165ba3d4" allowDefinition="MachineToApplication"/>  
    </sectionGroup> 
    </configSections> 
  <telerik.web.ui> 
    <radScheduler defaultAppointmentProvider="Integrated">  
      <appointmentProviders> 
        <add name="SchedulerData" type="Telerik.Web.Scheduler.MyDbSchedulerProvider" connectionStringName="LocalSqlServer" persistChanges="true" /> 
      </appointmentProviders> 
    </radScheduler> 
  </telerik.web.ui> 
    <appSettings/> 
    <connectionStrings> 
        <remove name="LocalSqlServer"/>  
        <add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|sc.mdf"/>  
    </connectionStrings> 

and here's the very basic tag I'm using to initiate it:

<telerik:RadScheduler runat="server" ID="RadScheduler1" SelectedView="Month" DayStartTime="08:00:00" DayEndTime="18:00:00" ProviderName="SchedulerData" ReadOnly="false"

Can anyone see what I'm doing wrong? I'm using the MyDbSchedulerProvider.cs file that was included and I've changed it to match up to my database table and fields. Thanks.
David
Top achievements
Rank 1
 answered on 15 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?