Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
69 views
Hello,
I have a Usercontrol with a RadComboBox that gets items via a webservice.
Everything is working correctly, however when I type, the search text disappears.
I had the same exact behavior with postbacks, but now its not posting back, and it is still doing the same thing.

Please take a look at the code below.
Here is the code for the RadComboBox:
<telerik:RadComboBox
    ID="cboContentProvider"
    runat="server"
    Width="225px"
    CheckBoxes="true"
    EmptyMessage="-- Select --"
    EnableLoadOnDemand="True"
    ShowMoreResultsBox="True"
    OnClientItemChecked="ItemChecked"
    EnableVirtualScrolling="True">
    <WebServiceSettings Method="GetContentProviderData" Path="../../WebService/BoomboxWs.asmx" />
    <ExpandAnimation Type="InOutElastic" />
</telerik:RadComboBox>

Here is the code for CP_ItemChecked:
function CP_ItemChecked(sender, eventArgs) {
    var data = '{ "type": "' + sender.get_id() + '", "id": "' + eventArgs.get_item().get_value() + '" }';
    $.ajax({
        type: "POST",
        url: "../../WebService/BoomboxWs.asmx/MarkSelectedItem",
        data: data,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (msg) {
        }
    });
}

Here is the WebMethod:
[WebMethod(EnableSession = true)]
public RadComboBoxData GetContentProviderData(RadComboBoxContext context)
{
    return GetRadComboBoxData(context, DtCp, DtCp.Count());
}
 
public RadComboBoxData GetRadComboBoxData(RadComboBoxContext context, List<GenericDataList> data, int itemsPerRequest = 20)
{
    var comboData = new RadComboBoxData();
 
    var itemOffset = context.NumberOfItems;
    var endOffset = itemOffset + itemsPerRequest;
 
    if (endOffset > data.Count())
    {
        endOffset = data.Count();
    }
 
    if (!string.IsNullOrEmpty(context.Text))
    {
        data = data.Where(q => q.Name.ToUpper().Contains(context.Text.ToUpper())).ToList();
    }
 
    comboData.EndOfItems = endOffset == data.Count();
 
    var result = new List<RadComboBoxItemData>(endOffset - itemOffset);
 
    result.AddRange(data.Take(endOffset).Skip(itemOffset)
        .Select(radItem => new RadComboBoxItemData {Text = radItem.Name, Value = radItem.Id.ToString(CultureInfo.InvariantCulture)}));
 
    comboData.Message = data.Any() ? String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset, data.Count()) : "No matches";
    comboData.Items = result.ToArray();
 
    return comboData;
}
Edward
Top achievements
Rank 1
 asked on 07 Dec 2012
9 answers
109 views
Hi ,

I have written a code as :

 <telerik:RadTextBox ID="txtCustomerName" runat="server" EmptyMessage="Please enter customer name"
                            CssClass="SetText" ToolTip="Please enter customer name" EnableSingleInputRendering="True"
                            MaxLength="20" Width="130" TabIndex="2">

So when i click on submit button in Opera browser a popup message shows as " The entered text is too large! You used 26 letters and the limit is 20."

How to resolve this issue.
Vasil
Telerik team
 answered on 07 Dec 2012
11 answers
585 views
Hi,
I have a Tree View with node template column.Inside of template column I have Image Button.

Problem:
I need to open a radwindow on click of Image button and it will open fine except for one scenario.

This issue is happening for only in page load.
When Initial page load if we have a subnode for  a particular node.When we expand and click on image button in subnode radwindow is not opening.
Only for the first click Radwindow is not opening from second time onwards it works fine.

Please help me.

Thanks,
A2H

Slav
Telerik team
 answered on 07 Dec 2012
2 answers
178 views
Hi;

I just upgraded from Q3 to Q3 SP1 via Telerik Control Panel and in VS10 when I build & run, I get error in browsers with different errors. I'm attaching screen shots.
If I revert back to my backup as of last night, it works with no problem. Something in the new built causes the runtime to crash.
I'm running on Vista32 and VS10

If I can provide more info, I'll be happy to.
Please let me know.

Thanks!
..Ben
Ben Hayat
Top achievements
Rank 2
 answered on 07 Dec 2012
1 answer
135 views
Hi,

How to install Asp.net Ajax software. can you please tell me where can i find trial version of it.
And the procedure to install the software .

Thanks,
Vimal
Dyanko
Telerik team
 answered on 07 Dec 2012
1 answer
104 views
Hi Everyone,

    Good day..!  I would like to ask some assistance on how to isolate the issue in Rad Window..
  
     here's our code.. 
  

   <

 

 

script language="javascript" type="text/javascript">

 

 

 

   function AddCountry() {

 

 

 

     var radWindow = window.radopen("CountryAddEdit.aspx?Action=Add&CountryID=0&CountryCode=", "radWindowAdd");

 

    radWindow.SetTitle(

 

"<% Response.Write(GetResource("AddCountry", false)); %>");

 

 

 

    return false;

 

   }

 

 

   </script>

 

  

   <

 

 

telerik:RadWindowManager ID="radWindowManager"

 

 

 

    runat="server"

 

 

 

    AutoSize="false"

 

 

 

    Behaviors="Close,Move"

 

 

 

    DestroyOnClose="true"

 

 

 

    EnableAjaxSkinRendering="false"

 

 

 

    EnableViewState="true"

 

 

 

    Height="175px"

 

 

 

    Modal="true"

 

 

 

    ReloadOnShow="true"

 

 

 

    ShowContentDuringLoad="false"

 

 

 

    VisibleOnPageLoad="false"

 

 

 

    VisibleStatusbar="false"

 

 

 

    Width="500px">

 

 

 

   <Windows>

 

 

 

    <telerik:RadWindow ID="radWindow" runat="server" />

 

 

 

   </Windows>

 

 

 

  </telerik:RadWindowManager> 

  <table class="gridheader" cellpadding="0" cellspacing="0">

 

 

 

 

 

 

 

   <tr>

 

 

 

 

 

 

 

 

 

 

 

    <th class="Tcenter">

 

 

 

 

 

 

 

     <asp:LinkButton ID="lnkAddCountry" runat="server" CssClass="fugue fugue-plus clicklink"    OnClientClick="javascript:AddCountry();return false;" ToolTip="<%$ Resources: AddNewCountry %>" Text="<%$  Resources: GlobalAppResources, AddNew %>" />

 

 

 

 

 

 

 

    </th>

 

 

 

 

 

 

 

  </tr>

 

 

 

 

 

 

 

  </table>

 


    This code works fine for most of our users, except for 2 users.. For a temporary solutions, they've tried a different browser and it works fine.. I just want to know, how i can isolate kind this of issue..?  Is this a browser issue..?  

     Hope you can share some ideas on how to resolve this issue.. 

Thanks, 

Nestea    
 
Marin Bratanov
Telerik team
 answered on 07 Dec 2012
0 answers
108 views
HI,
I'm using this version (Telerik.Web.UI_2012_2_724_Dev_hotfix),

I have a problem with RadmaskedTextbox.



July
Top achievements
Rank 2
 asked on 07 Dec 2012
6 answers
629 views
What I want is to use the user decimal separator but even if I defined no specific value in the declaration of my RadNumericTextBox, it always use the "," even if my Windows is set with a ".". I also checked the decimal separator of my current culture using "Thread.CurrentThread.CurrentUICulture.NumberFormat.NumberDecimalSeparator", and the value is ".". The only way It don't have the "," is to defined a specific value.

Here is my code:
<telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server" MaxValue="5" MinValue="-5" ShowSpinButtons="True"> 
    <
NumberFormat ZeroPattern="n" DecimalDigits="1" />

</telerik:RadNumericTextBox>

Also, if It's required to force a decimal separator, is there a way to define it in a CSS or somewhere else to every RadNumericTextBox will use the same settings so I will not forgot one.

Anybody can help me?

Thanks

 

Marc
Top achievements
Rank 1
 answered on 07 Dec 2012
18 answers
1.5K+ views
All,

Here's my scenario:

I have multiple RadAjaxPanels on a page (for simplification i'll say 2)  Panel A and Panel B.  Panel A contains a PanelBar for navigation of the site and Panel B is essentially a content area that dynamically loads User Controls.  When a user clicks on an item in the PanelBar in Panel A, it fires a server-side event which handles loading of the user control.  After the event fires I need the AjaxPanel (Panel B) to refresh and re-render it's content thus displaying the newly loaded user control to the user. 

I've tried several ways of accomplishing this to no avail.  Here's what I've tried:

1) Assigning a forced __doPostBack() to one of the client side OnItemClick events.  This does force the refresh but since it is assigned to the client side event it fires Before the server side event which is before the new user control is even loaded.

2) Using the following syntax from the online help and making this call after the event loads the user control RadAjaxPanel.ResponseScripts.Add(String.Format("$find('{0}').ajaxRequest();", RadAjaxPanel.ClientID))

Where RadAjaxPanel is replaced by the name of the AjaxPanel i'm trying to update in the application. 

If I use .ClientID I've been getting back an JScript error of 'Object does not support this method or property', whereas conversely if I use .UniqueID i get an 'Object is undefined or null' error.

3) Tried using a Page.RegisterStartupScript which registers a .js that forces the refresh through a __doPostBack();  Also tried ClientScripts.RegisterStartupScript.

All of this has been to no avail so far.  I've traced through the code and the new user control is being loaded properly and being added to the control tree.  If I do a f5 refresh on the page, the control shows up just fine because i'm using the LatestLoadedControl mechanism defined in the telerik help for loading user controls.  However, this is unacceptable as Panel B doesn't refresh it's content until f5 is hit for a page refresh. 

Can anyone please point me in the right direction?? I would Really appreciate any help anyone can give on this.  So close, yet so far!

Thanks,
SK

Maria Ilieva
Telerik team
 answered on 07 Dec 2012
3 answers
191 views
Hi,
    I have a Rad DateTimePicker in my Application and when i add one item to database  along with Rad DateTimePicker value showing error like this

 System.InvalidOperationException: Nullable object must have a value.   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)   at System.Nullable`1.get_Value()  

Actually  Rad DateTimePicker control has Value
Please help me to solve this issue
Thanks in Advance
Jesmon Joseph

Martin
Telerik team
 answered on 07 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?