Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
I am binding a list of names to a combo box, and trying to limit the number of names visible to the user.  I have used filter="contains" to narrow the list.  I have also written a onkeyup handlers to only show names after at lease two characters are typed.  My problem is that if you use the up or down arrow key, it will still show the entire list.  I have attempted to write an onkeydown handler and check for e.keycode 38 and 40, but it's still not working correct.  my code follows:

 
function OnClientDropDownOpening(Sender, args) {
     //only open if there is moer than 1 characters
     if (!open)
         args.set_cancel(true);
 }
 
 
 function pageLoad() {
     // set up onkeyup and onkey down event
     var combo = $find("<%=cboSLPName.ClientID %>");
     var input = combo.get_inputDomElement();
     input.onkeyup = onKeyUpHandler;
     input.onkeydown = onKeyDownHandler;
 }
 
 
 function onKeyDownHandler(e) {
     if (!e)
         e = window.event;
          
     var combo = $find("<%=cboSLPName.ClientID %>");
     var comboText = String(combo.get_text());
 
 
     if (comboText.length < 2) {
         //////////////////////////////
         //
         //  don't do anything if the length is less than two and you press up arrow and down arrow
         //
         if (e.keyCode == 38 || e.keyCode == 40) {
             e.returnValue = false;
             if (e.preventDefault) {
                e.preventDefault();
            }
            return false;
         }
     }
 }
 
 
 function onKeyUpHandler(e) {
     var combo = $find("<%=cboSLPName.ClientID %>");
     var comboText = combo.get_text();
 
 
     if (comboText.length < 2) {
         open = false;
         combo.hideDropDown();
     }
     else {
         open = true;
         combo.showDropDown();
     }
 }

and my server control:

<telerik:RadComboBox runat="server" ID="cboSLPName" Width="250px"
                        EmptyMessage="Type Name" MarkFirstMatch="true" Filter="Contains" ExpandAnimation-Type="None"
                           ShowMoreResultsBox="false" ShowWhileLoading="false"
                         AllowCustomText="true"
                        ShowToggleImage="false" EnableItemCaching="true" LoadingMessage="Loading..."
        HighlightTemplatedItems="true" EnableLoadOnDemand="true" ShowDropDownOnTextboxClick="false"
                        OnClientDropDownOpening="OnClientDropDownOpening"
                        onselectedindexchanged="cboSLPName_SelectedIndexChanged"
                        AutoPostBack="true"  />


any suggestions you can give to help would be appreciated.  Thanks!

I know my code isn't pretty, so any suggestions you have for a more elegant design is also appreciated!!
Helen
Telerik team
 answered on 09 Jun 2011
1 answer
231 views
Hi All,

Here is the scenerio - I have a project in VS2010, on one of the pages I open the RAD Window using the following method (which works as expected):

Dim strScript As String = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(ShowWindow);</script>"
Page.ClientScript.RegisterStartupScript(Me.GetType, "ShowWindow", strScript)

<script type="text/javascript">
    function ShowWindow() {
        var manager = GetRadWindowManager();
        var window1 = manager.GetWindowByName("QuoteWindow");
        window1.show();
    
</script>


As mentioned the above code works perfect - the problem is I simply copied this code across to another project which is identical to the first one and everytime I hit the button to open the RAD Window I get this error:

'Error: Unable to get value of the property 'GetWindowByName': object is null or undefined'

I have searched and searched the forums to no avail - please provide any help asap if possible as this is pretty urgent.

Thanks in advance.


Craig Mellon
Top achievements
Rank 1
 answered on 09 Jun 2011
16 answers
379 views
We are using the WebBrowser control that ships with Visual Studio and have modified the CSS style with the following to get the image to appear to the right of our menu item:

.rmLeftImage

{

 

 

float: right !important;
}

 


This causes the menu items to stretch the width of the menu and wrap the remaining menu items below each other?
These RadMenuItems have nested RadMenuItems (for a flyout menu) but not sure if that is the culprit?
Any ideas?

 

 

 

TSM
Top achievements
Rank 1
 answered on 09 Jun 2011
1 answer
103 views
Hello,
We have a RadGrid that updates data every 30 seconds with a timer object. You can select a radgrid row and then click a button from a radgrid toolbox. Then a radwindows appears associated with the selected row. The problem faces when the timer refreshes (Timer-tick). This timer refreshing makes that the rad windows also make a reload of the object (RadWindow). We tried unsucessfully to prevent the reloading of the rad window using the ajaxmanager.

Is there any option for not to reload the radwindow?.
Is there any option but not to stopping the timer?.

Kind regards.
Svetlina Anati
Telerik team
 answered on 09 Jun 2011
2 answers
52 views
How to create a RadGrid with TemplateColumns programmatically?

Thanks,
Pooya
Top achievements
Rank 1
 answered on 09 Jun 2011
1 answer
86 views
Hi,

I'm having a hard time trying to use the RadFileExplorer. I have just put it in some aspx page and set the "ViewPath" to "~\\App_Themes". The component loads fine, I can see the directories on the left, but no files on the right... Moreover, sometimes I get some callback error when clicking on directories, saying that there is some "invalid escape sequence" (error is in french).

Do you have any idea?

Thanks,
FB
Pero
Telerik team
 answered on 09 Jun 2011
3 answers
85 views
HI, I upgrade my solution to latest update of ASP.NET Ajax, then after I fixed the "Design error" (I copy the Design.dll 531.40 version to my bin) now I'm getting an error at runtime

In my bin I've UI and Design dlls version 531.40, using RadScriptManager

.aspx code

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Tecnico.aspx.cs" Inherits="SIO.Tecnico" %>
  
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" 
        EnableTheming="True">
    </telerik:RadScriptManager>
    <div>
        <div style="float:left;">
  
                    <telerik:RadPanelBar ID="rpbTecnico" Runat="server" Skin="Sunset" 
            Height="562px" onitemclick="rpbTecnico_ItemClick">
            <Items>
                <telerik:RadPanelItem runat="server" Text="Gateway SPES" Expanded="true">
                    <Items>
                        <telerik:RadPanelItem runat="server" Text="Stato" Value="rpi_GW_Status">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem runat="server" Text="Configurazione">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem runat="server" Text="Diagnostica">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem runat="server" Text="Statistiche">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem runat="server" Text="Konnex" Expanded="true">
                    <Items>
                        <telerik:RadPanelItem runat="server" Text="Stato" Value="rpi_KNX_Status">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem runat="server" IsSeparator="true">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem runat="server" Text="Chrono termostato">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem runat="server" Text="Contabilizzatore di calore">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem runat="server" Text="Relè A">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem runat="server" Text="Relè B">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem runat="server" Text="ZigBee" Expanded="true">
                </telerik:RadPanelItem>
                <telerik:RadPanelItem runat="server" Text="Controllore Centrale Termica" Expanded="true">
                    <Items>
                        <telerik:RadPanelItem runat="server" Text="Stato">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
  
        </div>
        <div style="float:left;margin-left:10px;">
            <asp:Panel runat="server" ID="panContent">
              
            </asp:Panel>
        </div>
    </div>
    </form>
</body>
</html>

.cs code

protected void rpbTecnico_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
{
    if (e.Item.Value == "rpi_GW_Status")
    {
        panContent.Controls.Clear();
        UserControl ctrl = LoadControl("Tecnici/TecnicoGatewayStatus.ascx") as UserControl;
        panContent.Controls.Add(ctrl);
    }
}


It's blocking issue, that stop our develop, please...

regards
Kate
Telerik team
 answered on 09 Jun 2011
1 answer
81 views
Can anydbody help me to solve my problem with RadEditor control????


I am using RadEditor control to display images. But the image is not displaying in the image manager in the testing server. Please refer the attached document.

This is perfectly working in developement machine (localhost) which is pointing to the same database.

I store the images in the database as binary.

when I deploy in the testing server, the image is not displaying. Please help. This is very urgent.

Please see below the HTML code for the RadEditor control.

<

 

telerik:RadEditor ImageManager-MaxUploadFileSize="5048000 " Width="100%" Skin="Vista" ID="DiseaseAreaContentEditor" runat="server"

 

 

SkinID="IndiaHCPSetOfTools" BackColor="Transparent" Height="500px">

 

 

<CssFiles>

 

 

<telerik:EditorCssFile Value="~/Styles/TelerikRichEditorContentArea.css" />

 

 

</CssFiles>

 

 

 

<Modules>

 

 

<telerik:EditorModule Name="RadEditorStatistics" Visible="true" Enabled="true" />

 

 

</Modules>

 

 

</telerik:RadEditor>

Testing server and developement machine point to the same database.
Rumen
Telerik team
 answered on 09 Jun 2011
1 answer
146 views
Can anydbody help me to solve my problem with RadEditor control????


I am using RadEditor control to display images. But the image is not displaying in the image manager in the testing server. Please refer the attached document.

This is perfectly working in developement machine (localhost) which is pointing to the same database.

I store the images in the database as binary.

when I deploy in the testing server, the image is not displaying. Please help. This is very urgent.

Please see below the HTML code for the RadEditor control.

<

 

telerik:RadEditor ImageManager-MaxUploadFileSize="5048000 " Width="100%" Skin="Vista" ID="DiseaseAreaContentEditor" runat="server"

 

 

SkinID="IndiaHCPSetOfTools" BackColor="Transparent" Height="500px">

 

 

<CssFiles>

 

 

<telerik:EditorCssFile Value="~/Styles/TelerikRichEditorContentArea.css" />

 

 

</CssFiles>

 

 

 

<Modules>

 

 

<telerik:EditorModule Name="RadEditorStatistics" Visible="true" Enabled="true" />

 

 

</Modules>

 

 

</telerik:RadEditor>

Testing server and developement machine point to the same database.

 

Rumen
Telerik team
 answered on 09 Jun 2011
2 answers
69 views
Hi,

I have a chart that that makes a comparison. Let's say I have in the x-axis information from Q1 through Q4 for two companies. Therefore, I should have two bars for Q1, two bars for Q2 and so on. This works fine when I do have data for all four quarters.
This set up does not work when one of the companies does not have data for one of the quarters. Let's say Q3 does not have data for one of the companies. In this scenerio, the value of Q4 slides down to fill in the value in Q3, and Q4 is left without data for that company.

The following is how the chart is set up:
chartDefinition.DataGroupColumn = "Name";
chartDefinition.PlotArea.XAxis.DataLabelsColumn = "TimePeriod";
chartDefinition.Legend.Appearance.GroupNameFormat = "#VALUE:#NAME";

How can I fix this issue?
Thanks,
E.
Ernesto
Top achievements
Rank 1
 answered on 09 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
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
Iron
Iron
Sergii
Top achievements
Rank 1
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?