Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
117 views

Greetings,
I am currently using version control RadAjaxManager 2010.3.1109.35 with the following problem:

I want to update a particular "asp: DropDownList" when the values of a "Telerik:RadMaskedTextBox" changed.

For this purpose i’m using the client event "OnValueChanged" to trigger a Ajax request, however, this scenario only works one time.

 

After the first ajax request, if i trigger the "OnValueChanged" again, the ajax request isn’t fired. I have done some debug and in the second time i trigger the event, the control RadAjaxManager in the client side is null.

 

How do I solve this problem?

 

Code executed in server side:

 

protected void Adabas_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
  
{
  
    string argument = (e.Argument);
  
    string[] arrayString = argument.Split(",".ToCharArray());
  
  
    string operacao = arrayString[0];
  
     if (operacao == "CarregarADABAS")
  
        {
  
            ptin.formare.lms.core.utilizadores.cnpj.gestaoCNPJ _gestcnpj = new ptin.formare.lms.core.utilizadores.cnpj.gestaoCNPJ("LMS_BD");
  
            DataTable lista_ADABAS = _gestcnpj.ListaADABASPorCNPJ(arrayString[1]);
  
            ddAdabas.Items.Clear();
  
            ddAdabas.DataSource = lista_ADABAS;
  
            ddAdabas.DataTextField = "ADABAS";
  
            ddAdabas.DataValueField = "ADABAS";
  
            ddAdabas.DataBind();
  
         }
  
}

Code executed in cliente side:

 

<telerik:RadAjaxManager ID="Adabas" runat="server" onajaxrequest="Adabas_AjaxRequest">
  
    <AjaxSettings>
  
        <telerik:AjaxSetting AjaxControlID="Adabas">
  
            <UpdatedControls>
  
                <telerik:AjaxUpdatedControl ControlID="ddAdabas" />
  
            </UpdatedControls>
  
         </telerik:AjaxSetting>
  
    </AjaxSettings>
  
</telerik:RadAjaxManager>
  
   
  
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
  
    <script type="text/javascript">
  
    function CarregaListaADABAS (sender, args)
  
    {
  
      var message = args.get_newValue();
  
         message = message.replace(/[^a-zA-Z 0-9]+/g,'');
  
     var ajaxManager =  $find("<%= Adabas.ClientID %>"); //This value is null in the second time (event OnValueChanged)
  
        if(ajaxManager != null)
  
          {
  
             ajaxManager.ajaxRequest('CarregarADABAS,'+ message);
  
          }
  
    }
  
    </script >
  
</telerik:RadCodeBlock>
  
   
  
<Telerik:RadMaskedTextBox ID="txt_cnpj" runat="server" Rows="1" UseEmbeddedScripts="False" Mask="##.###.###/####-##" TextWithLiterals="..-" CausesValidation="True" Width="125px" Height="11px" Skin="Outlook">
  
     <ClientEvents OnValueChanged="CarregaListaADABAS"/>
  
</Telerik:RadMaskedTextBox>

 

Regards

Filipe Peixinho
Top achievements
Rank 1
 answered on 02 Dec 2010
1 answer
356 views
We have Radgrid with Rad comboboxes kept in GridTemplateColumn Item Templates. Selecting items from existing rows comboboxes and then clicking on add button the grid got rebinded and selected options are not shown. When Add button is clicked we dont want to save new row in database but want to show new row in Radgrid, once required rows are added if we click another button "save" then we need to save the selected values from comboboxes from all rows to database. Can you please suggest the way to add new row to the Radgrid directly client side rather than binding the grid again for getting new row from database. And also suggest for retaining the combobox selected values on adding new row.
Veli
Telerik team
 answered on 02 Dec 2010
1 answer
101 views
Hello,

From the client, I need to attach to the request start event of the RadAjaxpanel or RadAjaxManager.  Is that possible?  Essentially, if a User control is added to the page (which may or may not exist), I want it to attach itself.  There can be more than one UC that may need to attach.  Is it possible to do this?  I may be able to pull off a server-side solution if that is the only option too.

Any guidance would be great.

Thanks.
Brian Mains
Top achievements
Rank 1
 answered on 02 Dec 2010
2 answers
57 views
I am working with the radtabStrip. I have 2 tabs.
On the button click I am taking to the second tab.
In the first tab I have two divs. Each div has has 2 radiobuttons.
The first div is opened always and when a selection is made in the first radio button set, then only the second div of radiobuttons is opened.
In the first user control.
window.onload = function() {
    debugger
        $('.travelType2Class').hide();
        if (document.getElementById("<% =domestic.ClientID %>").checked == true) {
            $('.travelType2Class').fadeIn();
        }
        if (document.getElementById("<% =international.ClientID %>").checked == true) {
            $('.travelType2Class').fadeIn();
        }
    }

It worked fine. And when I went to second usercontrol, I should allow the user to go to the first tab and change some data in middle.
So, when I try to click on first tab, I am able to see the first div with the checked value correctly. The problem is the second div of radiobuttons is not opened.
I dont know what I should do to make the second div state as open when the tab is clicked.
As, I showed here, I tried in the window.onload, but I see that this event is fired for the first time when the first usercontrol loads and is never fired even when that tab is clicked. I even tried in the OnPreRender() method of ascx page. It is getting fired. In that I tried to make the Div visible state as true.
Nothing is working.
I am stuck with this.
Could any one pls tell me how to solve this.

Thanks in advance.
Pams
Top achievements
Rank 1
 answered on 02 Dec 2010
1 answer
94 views
Here is my RadRotator:

<telerik:RadRotator ID="rotator1" runat="server" BorderWidth="0" RotatorType="CoverFlowButtons"
            Width="100%" ItemWidth="64" Height="80px" ItemHeight="64" ScrollDuration="500"
            FrameDuration="2000" EnableRandomOrder="true" PauseOnMouseOver="false" Skin="Windows7"
            ScrollDirection="Left, Right" OnClientItemShown="OnClientItemShown" CssClass="RemoveRotatorBorder">
            <ItemTemplate>
                <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Url") %>' AlternateText='<%# Eval("Name") %>' />
            </ItemTemplate>
        </telerik:RadRotator>

and the javascript configuration:

Telerik.Web.UI.RadRotatorAnimation.set_scrollAnimationOptions("<%= rotator1.ClientID %>",
        {
            xR: 5, // The offset in pixels between the selected items and the first item on the left and on the right of the selected item.
  
            xItemSpacing: 20,
            matrix: { m11: 1, m12: 0, m21: -0.1, m22: 1 }, // The 2d transformation matrix, applied to the items that appear on the right of the selected item
            reflectionHeight: 0.5, // The height of the reflection
            reflectionOpacity: 1 // The opacity, applied to the reflection
        }
    );

It is fine in IE 8: coverflow-ie8.png
but images are too big or distorted in IE6: coverflow-IE6-a.png and coverflow-IE6-b.png



Tsvetie
Telerik team
 answered on 02 Dec 2010
1 answer
68 views
Hello
I have two chart components on my page that don't display chart image intermittently instead they display red cross missing image icons. The environment is load balanced but the session is sticky so all the requests for a session go to same server. What could be causing this? Is there a way I can see detail chart error log? Thanks for your help.
Evgenia
Telerik team
 answered on 02 Dec 2010
2 answers
92 views
Hi,
I am using a Rad grid with hierarchy.I am using expand/collapse column to show/hide grids in hierarchy.
When i am type a filter value in one filter text box in one grid,it will be applied to all collapsed grids' particular column filter text boxes.
but not to the expanded grids.What I want is do not apply filter values typed in one column filter text box in a grid of hierarchy to another collapsed same column filter text box.

How can I overcome this problem?
Please give me a solution as soon as possible.
thanks.
Radoslav
Telerik team
 answered on 02 Dec 2010
2 answers
143 views
I have a main page that contains several user controls.  One user control displays a RadWindow for entering information and then, upon close, refreshes a grid via an ajaxRequest.  The main page contains the RadWindowManager, RadAjaxManager, and the RadAjaxLoadingPanel.  I am able to add a new record and have the grid updated asynchronously,  except that the AjaxLoadingPanel is not displayed when the grid is updating.  The AjaxLoadingPanel does display when the "trigger" for the Asynchronous postback is the grid itself, however.

This is the javascript that runs OnClientClose of the RadWindow...
var radAjaxMgr = $find('<%= PageRadAjaxManager.clientID %>');
radAjaxMgr.ajaxRequestWithTarget('<%= NotesGrid.clientID %>', '');
$find('<%= PageRadAjaxManager.clientID %>').ajaxRequest('Note');

Here is the code to set the AjaxRequest handler and to register the grid with the AjaxManager.
Dim manager As RadAjaxManager = RadAjaxManager.GetCurrent(Page) 
AddHandler manager.AjaxRequest, AddressOf PalNoteTaskListAjaxManager_AjaxRequest
  
PageRadAjaxManager.AjaxSettings.AddAjaxSetting(manager, TaskGrid, lpWait)

This is the code for the AjaxRequest handler...

Protected Sub PalNoteTaskListAjaxManager_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs)
       Select Case e.Argument
           Case "Task"
               PopulateTaskGrid(False)
           Case "CompTask"
               PopulateCompletedTaskGrid(False)
           Case "Note"
               FillNoteGrid(False)
       End Select
   End Sub

This is the AjaxLoadingPanel...
<telerik:RadAjaxLoadingPanel
    id="lpWait" 
    InitialDelayTime="0" 
    runat="server"
    Transparency="10"  
    Height="100%" Width="100%" >
    <table Height="200px" Width="100%" >
       <tr valign="middle" >
          <td align="center">
             <img src="/SI/Images/status_anim.gif"  title="Wait" />
          </td
       </tr>
    </table
</telerik:RadAjaxLoadingPanel>

Thanks for your help!

Sean M. Severson
Sean Severson
Top achievements
Rank 1
 answered on 02 Dec 2010
2 answers
157 views
Hi!
I am using treeview in my page. in that i want to do the double click event on server side. is it possible to get the event at the server side?

thanks.
geetha.
geetha priya
Top achievements
Rank 1
 answered on 02 Dec 2010
4 answers
135 views
I am running Telerik controls file version 1010.1.415.20.

In the NeedDataSource on my RadGrid, I am reformatting the FilterExpression to apply a Null filter.  However, the Null filter is not being applied.  Instead, I get all records from my DataSet (which is a generic list).  Is the Null filtering broken in the version of the Telerik controls I am running?

Sean M. Severson
Sean Severson
Top achievements
Rank 1
 answered on 02 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?