Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
I have the RadAutoCompleteBox on my page and next to it is a an ASP button.

<asp:Button ID="LoadReportButton" runat="server" Text="Load Report" OnClick="LoadReportButton_Click" />


Is there any way when a user selects a value on the drop down and creates a token all they have to do is press enter on the keyboard instead of pressing tab then enter.

I have it so far when you select an item it fires the function, entry added and displays a pop up saying what you have selected.
<script type="text/javascript">
    function entryAdded(sender, eventArgs)
    {
        alert("An item with Text='" + eventArgs.get_entry().get_text() + "' has just been selected.");
    }

I just need a piece of code that highlights the button or even fires the button automatically which would be cool.

Cheers

John Moore
Kalina
Telerik team
 answered on 23 Oct 2012
1 answer
224 views
Hi,

I've been searching about this for several days but I can't get my head around it.

Just as a note: all of our custom skins were designed using the visual style builder (http://stylebuilder.telerik.com/) but none of them has a .skin file. I couldn't understand yet what is this file for.

I have an application that each user will have a different CUSTOM skin name saved on the database. There will be the same number of users as skins, so if there's 50 users, there will be 50 different skins, one to each user. Everytime the user logs in, the application loads the skin name from the database and applies it to all controls by using a technic described on this blogpost: http://blogs.telerik.com/vladimirenchev/posts/08-07-11/change-skins-dynamically-for-all-telerik-radcontrols.aspx

I converted the C# code into VB and put on the page load of the master page. It looks like this

     Public Sub SetSkin(ByVal target As Control, ByVal skinName As String)
         
        If TypeOf target Is ISkinnableControl Then
 
            Dim skinnableTarget As ISkinnableControl = Nothing
            skinnableTarget = DirectCast(target, ISkinnableControl)
            skinnableTarget.Skin = skinName
 
        Else
 
            For Each child As Control In target.Controls
                SetSkin(child, skinName)
            Next
 
        End If
    End Sub

This works great and as intended when the users are 2 or 3, but when it grows to 20 or 30 users and skins I can see in the source code that all CSS files of all skins are loaded into the page and this creates problems with the IE limitation on number of css includes which I think is 32. I read somewhere that telerik will include all css files inside the theme folder. For example, each Skin have 11 different css files (ajax, button, calendar, grid, etc). If I have 20 different skins I'll have 220 css files included in the page when I need onlye 11.

I also don't know if I should have 1 theme with 1 skin per user
Example
App_Themes\ThemeUser1\SkinYellow
App_Themes\ThemeUser2\SkinGreen
and then programmatically assigned a different theme after each user. This would solve the problem of  to many css files included in the page, but i couldn't find out to assign theme's to the page/controls

or if I should have 1 theme with several skins but find a way to include only the css files of the skin that is gonna be used by the logged user.
Eexample
App_Themes\GenericTheme\SkinYellow
App_Themes\GenericTheme\SkinGreen

Hope this makes sense, please let me know what I should do to solve this problem. Oh, and sorry for such a long post, that's the way I found best to explain the issue.

Regards
Joao
Galin
Telerik team
 answered on 23 Oct 2012
1 answer
114 views
 When I check the 'chkSelectAll' checkbox , the checkboxes in the entire column are not all checked.  Please help. 


<telerik:RadGrid ID="grd" runat="server" OnLoad="grd_OnLoad" OnNeedDataSource="grd_NeedDataSource"
                                    SkinID="CR" GridLines="None" AllowPaging="True"  AutoGenerateColumns="False" OnItemDataBound="grd_ItemDataBound"
                                    AllowMultiRowSelection="true" Width="925px">
                                    <MasterTableView  PageSize="10" EnableNoRecordsTemplate="true"
                                        DataKeyNames="AssetID">
                                        <NoRecordsTemplate>
                                            <div style="text-align: left; width: 100%">
                                                <asp:Label ID="lblEmptyMsg" runat="server" meta:resourcekey="lblEmptyMsgres"></asp:Label></div>
                                        </NoRecordsTemplate>
                                    </MasterTableView>
                                    <PagerStyle AlwaysVisible="True" />
                                    <ClientSettings EnableRowHoverStyle="true">
                                        <Selecting AllowRowSelect="True" />
                                        <Scrolling AllowScroll="True"></Scrolling>
                                        <ClientEvents OnGridCreated="GridCreated" />
                                         <ClientEvents OnRowSelected="RowSelected" OnRowDeselected="RowDeselected" />
                                    </ClientSettings>
                                </telerik:RadGrid>
Tsvetoslav
Telerik team
 answered on 23 Oct 2012
8 answers
348 views
I'm using the latest Q1 2011 ASP.NET Ajax.

when adding the Radscriptmanager to my masterpage I can set the following : 
EnableCdn="true"

 

 

However this sets the microsoft scripts to be loaded from: ajax.microsoft.com
This is an obsolete path and should be replaced with the cookie free alternative: ajax.aspnetcdn.com
as referenced on: http://www.asp.net/ajaxlibrary/cdn.ashx

I have found that I manually can do this with the following code:

<

 

 

telerik:RadScriptManager ID="sm1" runat="server" EnablePartialRendering="true" EnableCdn

="true">

 

<Scripts>

<asp:ScriptReference Assembly

="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

 

Name="MicrosoftAjax.js" Path="https://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"

/>

 

</Scripts

>

 

</telerik:RadScriptManager>

 

 

 


However it is a rather annoying that I have to add references to all the Microsoft scripts manually.
My questions are as follows:

1) Is the way I'm manually refering to ajax.aspnetcdn.com scripts the best/only way to do this?
2) Will Telerik change the path to ajax.aspnetcdn.com from ajax.microsoft.com in later release?

best regards
Thomas
Dimitar Terziev
Telerik team
 answered on 23 Oct 2012
2 answers
325 views
I have a radcombobox with checkboxes and Multiple values in the drop-down, when I check  values in the radcombobox , OnitemChecked server side event is called and based on the values checked data shows up on the page.

But when I checked Select All for Checkboxes, no event is called. Could someone please suggest  me which event is related to the Select All Checkboxes feature
<telerik:RadComboBox ID="uxRCBCustomerName" runat="server" Width="200px" EnableCheckAllItemsCheckBox="true"
            DropDownWidth="500px"  height="120px" DataTextField="HPDCustomerName" DataValueField="HPDCustomerID"  AllowCustomText="true" CheckBoxes="true"  DataKeyField="employerGroupID" EmptyMessage="No Promo Found" AutoPostBack="true" CheckedItemsTexts="DisplayAllInInput"   AppendDataBoundItems="true" OnItemChecked="uxRCBCustomerName_ItemChecked"   EnableViewState="true" MarkFirstMatch="true" CausesValidation="false" >
           <ItemTemplate>
                              
                               <ul
                   <li class="col1" >
                   <%# DataBinder.Eval(Container, "Text")%>
                    </li>
                      <li class="col2">         
                       <%# If(DataBinder.Eval(Container.DataItem, "hasJOnly"), "J", "")%><%# If(DataBinder.Eval(Container.DataItem, "hasJM"), "JM", "")%><%# If(DataBinder.Eval(Container.DataItem, "hasJOnly")=False and DataBinder.Eval(Container.DataItem, "hasJM")=false, "N/A", "")%></td>
                                           
                   </li>  
                   </ul>
                                     
                 
           </ItemTemplate>
       </telerik:RadComboBox>

I am looking for a server side event. Please see my code above for radcombobox.

Thanks,
Ruby
Top achievements
Rank 1
 answered on 23 Oct 2012
1 answer
79 views
Hello,

I need a tip on RadAjaxPanel.

Can anyone give me some idea about that how I can get the RadAjaxPanel object (refernce) in external java script file...!!!

I am very bad with java script, I know lot of gurus are around here :)

shadow
Top achievements
Rank 2
 answered on 23 Oct 2012
1 answer
51 views
Hello,

I am facing a strange problem related to design of RadProgressArea.
I have attatched an image. 

It is not rendering the ProgressArea with proper design after postback.

Any help...!!!
shadow
Top achievements
Rank 2
 answered on 23 Oct 2012
2 answers
96 views
Hi,

I am using a Radgrid with script services for the data binding.
For deleting a row, I implemented a GridClientDeleteColumn which fires a "Delete"-command on which I am deleting the clicked row via a script service. After deleting a row, the rowIndexes are actually not updated and I get some errors when I am deleting several rows after each other.

Here is my code:

   

function KontakthistorieGridCreated(ansprechpartnerid) {
 
    pms_neu.grid_service.get_history(window.location.hostname, ansprechpartnerid, kontakthistorieUpdateGrid);
 }
 
 function kontakthistorieUpdateGrid(result) {
     var tableView = $find("<%= rdg_historie.ClientID %>").get_masterTableView();
         tableView.set_dataSource(result);
         tableView.dataBind();
         tableView.set_virtualItemCount(result.length);
         adjust_pane_heights();
 }
 
 function OnCommand(sender, args) {
     //Die funktion kann ruhig leer sein, MUSS aber vorhanden sein (irgendwas mit Client-Object erstellen und so...)
     if (args.get_commandName() == "Delete") {
         var itemIndex = args.get_commandArgument();
         var history_id = sender.get_masterTableView().get_dataItems()[itemIndex].getDataKeyValue("id");
         pms_neu.grid_service.delete_history(window.location.hostname, history_id, history_delete_done);
 
         args.set_cancel(true);
     }
 }

There problem occurs because the commandArgument() isnot beeing updated after deleting the row and even not after I call the databind method again. Deleting itemIndex 0 will cause that the following first item has itemIndex 1 but it must be zero for fetching the right datatime.
 
var itemIndex = args.get_commandArgument();
var history_id = sender.get_masterTableView().get_dataItems()[itemIndex].getDataKeyValue("id");

Does anyone knows a solution for this?
I would really appreciate some help on this

Kind regards



Nils C.
Top achievements
Rank 1
 answered on 23 Oct 2012
6 answers
342 views

Hello,

I want to set value of radNumericTextbox in its “OnValueChanging” Client event.

But in OnValueChanging event, I am able to get value of radNumericTextbox using sender.get_value(), but sender.set_value(10.123) returns undefined.

 

So, I tried following method

function OnValueChanging(sender, eventArgs) {

  

    var message;

   

    var target = document.getElementById(sender.get_element().id + '_text');

target.value= 10.123

}

Now, my value is set correctly as 10.123 in radNumericTextBox but without number format.

My radNumericTextbox must have “d” as decimal separator. So it should display 10d123.

Any solutions how set my value with number format in RadNumericTextbox?

Thanks in advance.

Kavitha
Top achievements
Rank 1
 answered on 23 Oct 2012
5 answers
114 views
I'm new to RadControls and I'm trying to rough out a simple page using a couple of RadComboBoxes, version 4.0.

First of all I note that there seems to be a great deal of chatter on this forum about bugs in the boxes.

However I wonder if my problem is related or whether I can't use these as ordinary combo boxes.

The code is extremely simple.
I bind it like this:
 cb.DataTextField = "Desc";
 cb.DataValueField = "Id";
 cb.DataBind();

I then hit an ordinary Asp.Net button and try to get the selected values in the click event. 
The data appears to have loaded correctly and the selected text is correct but I cannot get the correct selected value.
I've tried both SelectedValue and SelectedItem.Value.  It's as if it's not setting at all.
Nencho
Telerik team
 answered on 23 Oct 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?