Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
132 views
HI. I'm testing  Radinputmanager.
I want to print dropdownlist1's index without radinputmanger's validation at client-side.

i expected  i clicked the "print selectedIndex" button,it printing dropdownlist1's index
and if i click the "Print Result" button, it works validation to textboxes.

but result was raise  the textboxes validation.
help me.

My source is
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="RadControlsWebApp8._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="expires" content="-1" />
    <meta http-equiv="pragma" content="no-cache" />
    <link href="./main.css" rel="Stylesheet" type="text/css" />
</head>
<body>
    <form id="frmMain" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" OutputCompression="Disabled">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
 
    <div id="divContents">
        <table style="width: 800px; text-align: center; margin: 0 auto;">
            <tr>
                <td colspan="2" style="width: 800px">
                    <asp:DropDownList ID="DropDownList1" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="width: 100%;">
                    <asp:Button ID="Button1" runat="server" Text="Print SelectedIndex" />
                </td>
            </tr>
            <tr>
                <td colspan="2" style="width: 800px">
                    <asp:Label ID="Label1" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
        <table style="width: 800px; text-align: center; margin: 0 auto;">
            <tr>
                <td colspan="2" style="width: 800px;">
                    <h2>
                        Input Manager Control</h2>
                </td>
            </tr>
            <tr>
                <td class="tdLeftContent">
                    Numbers Only
                </td>
                <td class="tdRightcontent">
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    ex) 12345679
                </td>
            </tr>
            <tr>
                <td class="tdLeftContent">
                    Currency
                </td>
                <td class="tdRightcontent">
                    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                    ex) 79.90
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="Button2" runat="server" Text="Print Result" />
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: left; padding-left: 200px;">
                    <asp:Label ID="Label2" runat="server" Text="Label" Visible="False"></asp:Label><br />
                </td>
            </tr>
        </table>
    </div>
    <telerik:RadInputManager ID="RadInputManager1" runat="server">
        <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior1" EmptyMessage="type here"
            ErrorMessage="Numbers Only" DecimalDigits="0" Culture="en-us" Type="Number" Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="TextBox1" />
            </TargetControls>
        </telerik:NumericTextBoxSetting>
        <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior2" EmptyMessage="type here"
            ErrorMessage="Numbers Only" DecimalDigits="0" Culture="en-us" Type="Currency" Validation-IsRequired="true">
            <TargetControls>
                <telerik:TargetInput ControlID="TextBox2" />
            </TargetControls>
        </telerik:NumericTextBoxSetting>
    </telerik:RadInputManager>
    </form>
</body>
</html>

and code behind is
Imports Telerik.Web.UI
 
Partial Class _Default
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (DropDownList1.Items.Count = 0) Then
 
            Dim listItemDummy As New ListItem
            listItemDummy.Value = ""
            listItemDummy.Text = ""
 
            DropDownList1.Items.Add(listItemDummy)
 
            For i As Integer = 0 To 10
                Dim listItem As New ListItem()
 
                listItem.Text = (i + 1)
                listItem.Value = (i + 1)
 
                DropDownList1.Items.Add(listItem)
 
            Next
        End If
    End Sub
 
 
    Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim dropDownListIndex As String = DropDownList1.SelectedIndex.ToString()
     
        Label2.Text = TextBox1.Text + " AND " + TextBox2.Text
 
 
         
    End Sub
 
    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim dropDownListIndex As String = DropDownList1.SelectedIndex.ToString()
 
 
        Label1.Text = "SelectedIndex: " + dropDownListIndex
 
    End Sub
End Class

shunman
Top achievements
Rank 1
 answered on 30 Aug 2011
3 answers
123 views

What I have set up is a RadComboBox with:

            AllowCustomText = true

            CheckBoxes = true

            EnableLoadOnDemand = true

            OnItemsRequested = MyFunctionToGetColumns
            Text="PreviouslySavedText"

Everything works as expected, except the input isn't filled with the Text value.
My workaround for now is to set the EmptyMessage to the PreviouslySavedText.  Is there a better way to set the text on load?


Thad
Top achievements
Rank 2
 answered on 29 Aug 2011
0 answers
118 views
Hi,

I am using RadComboBox that is loaded on demand using a web service:
<telerik:RadComboBox runat="server" ID="rcbPerson" Width="400px"  
            EnableLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true"  Filter="Contains" OnClientSelectedIndexChanged="RefreshPerson"
            EmptyMessage="Type here ..." AllowCustomText="True" >
            <WebServiceSettings Path="Autocomplete.svc" Method="GetPersons" />
        </telerik:RadComboBox>

It works fine in the development environment, but becomes too slow (take 2-3 minutes) to load. The data is not much. I beleive I am missing something in the config file. Following is the "ServiceModel" section of the config file. It was working fine with the AutoCompleteExtender.
<system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="">
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
            <endpointBehaviors>
                <behavior name="AjaxBehavior">
                    <enableWebScript/>
                </behavior>
            </endpointBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
          <services>
              <service name="AeroCDB.Autocomplete">
                   <endpoint address="" behaviorConfiguration="AjaxBehavior"  bindingConfiguration="webHttpBindingConfig" binding="webHttpBinding" contract="AeroCDB.Autocomplete">
                </endpoint>
              </service>
          </services>
       <bindings>
      <webHttpBinding>
               <binding name="webHttpBindingConfig"
                      <security mode="TransportCredentialOnly">
                          <transport clientCredentialType="Windows"/>
                      </security>
          </binding>
            </webHttpBinding     
          </bindings>
      </system.serviceModel>
Amit
Top achievements
Rank 1
 asked on 29 Aug 2011
3 answers
101 views

Hi All,

My client had just updated to IE9 and they found an issue with the Scrolling TabStip: when they resize the IE window, all “hidden tab items” are pushed to second row. IE7/8 do not have this problem. We found similar issue can be reproduced on Telerik Demo page:

http://demos.telerik.com/aspnet-ajax/tabstrip/examples/functionality/scrolling/defaultcs.aspx

is this can be solved?

 

Many thanks!

Gary Yu
Top achievements
Rank 1
 answered on 29 Aug 2011
2 answers
90 views
I am trying to include a gap at the trailing edge of the rotator much like the leading gap on the Live XML example. The rotator is a vertical scroll up. When the rotator first starts up there's a leading blank, or gap, that is about the height of the control itself. I am wondering how to do this for the trailing edge. I have constantly changing list, but the gap should just be as tall as the control height. (For background, I am rendering live scores and I only render an entrant once we have a score so the list grows over time to consist of the entire entry list).

Currently I have tried to "add" blank entries to the end on the client side event OnClientLoad, but this only causes the leading gap to disappear and forces the items to "jump" up and not scroll properly. 

var itemsinrotator = rot.getItemHtmlElements().length;
 
for (var i = 0; i < itemsinrotator; i++) {
    rot.addRotatorItem("<div height='64'> </div>", 0);
}


Please advise on the best way to accomplish a trailing gap and once that gap has fully rendered (i.e. the height of the control), then trigger the full rotation as outlined here: http://www.telerik.com/community/forums/aspnet-ajax/rotator/load-fresh-data-after-one-full-rotation.aspx

The format should look like this:

Leading Edge Gap (height of control)
....
List of items
....
Trailing Edge Gap (height of control)
trigger that the scroll is complete (http://www.telerik.com/community/forums/aspnet-ajax/rotator/load-fresh-data-after-one-full-rotation.aspx)
...
Repeat with new data

Thank you.

Regards,
George


George Mariakis
Top achievements
Rank 1
 answered on 29 Aug 2011
1 answer
104 views
I have a TreeList that displays data in a hierarchy and has got three columns and one of the column is editable. I want to have a single edit/update button on the top the TreeList (rather than havong edit/update button for each row), clicking on which will make the Entire TreeList editable and updatable.  Any help Appreciated. Thanks in Advance.
Gijo
Top achievements
Rank 1
 answered on 29 Aug 2011
1 answer
108 views
Hi
On double-click a user can addnew or edit existing appointment item.

what i want to do is when user single clicks on exiting appointment item, i want to display description is a textbox
which is located outside scheduler control on a page.

Regards
Ivana
Telerik team
 answered on 29 Aug 2011
1 answer
207 views
 The telerik rad tree view is not behaving properly, we have it as a left navigation menu into a user control that gets loaded inside the master page. This issue is just  in some subsites of a big site collection migrated.

The menu will display the sites and subsites that SharePoint has.
The problem is that the arrows that it has on the left, ( see attached image please),  sometimes those arrows are pointing in a right direction ( right  for  the subsites of the site that im visiting ) , but in some other sites, the arrows wiill not show up correctly. This is all in the same site collection.

Here is the code. See atached image to know .

<

 

 

script type="text/javascript">

 

 

 

function ClientDoubleClick(sender, args) {

 

 

 

var node = args.get_node();

 

args.set_cancel(

 

true);

 

}

 

 

function ClientNodeClicking(sender, args) {

 

 

 

var node = args.get_node();

 

args.set_cancel(

 

true);

 

}

 

 

function ClientNodeExpanded(sender, args) {

 

 

 

var node = args.get_node();

 

 

 

if (node.get_level() == 0) {

 

args.set_cancel(

 

true);

 

}

 

 

else {

 

ResetNodes(node,

 

"up");

 

ResetNodes(node,

 

"down");

 

 

 

var attributes = node.get_attributes();

 

 

 

var level = node.get_level();

 

 

 

var nodeID = attributes.getAttribute("nodeID");

 

 

 

var nodeDiv = document.getElementById(nodeID);

 

 

 

var nextNodeDiv;

 

 

 

if (node.get_nextNode() != null) {

 

 

 

var nextNode = node.get_nextNode();

 

 

 

var nextNodeAttributes = nextNode.get_attributes();

 

 

 

var nextNodeID = nextNodeAttributes.getAttribute("nodeID");

 

nextNodeDiv = document.getElementById(nextNodeID);

}

 

 

if (level == 1) {

 

 

 

var endTreeViewDiv = document.getElementById("ctl00_CardinalLeftNav_endTreeView");

 

endTreeViewDiv.className =

 

"cahCollaspedEnd";

 

nodeDiv.className =

 

"cahLevel1 cahExpanded1";

 

 

 

if (node.get_nextNode() != null)

 

nextNodeDiv.className =

 

"cahLevel1 cahSiblingExpanded1";

 

 

 

else

 

endTreeViewDiv.className =

 

"cahExpandedEnd";

 

}

 

 

else if (level == 2) {

 

nodeDiv.className =

 

"cahLevel2 cahExpanded2";

 

}

 

 

else if (level == 3) {

 

nodeDiv.className =

 

"cahLevel3 cahExpanded3";

 

 

 

if (node.get_nextNode() != null)

 

nextNodeDiv.className =

 

"cahLevel3 cahSiblingExpanded3";

 

}

 

 

else if (level == 4) {

 

nodeDiv.className =

 

"cahLevel4 cahExpanded4";

 

}

}

}

 

 

function ClientNodeCollapsed(sender, args) {

 

 

 

var node = args.get_node();

 

 

 

if (node.get_level() == 0) {

 

args.set_cancel(

 

true);

 

}

 

 

else {

 

ResetNodes(node,

 

"up");

 

ResetNodes(node,

 

"down");

 

}

}

 

 

function ResetNodes(node, direction) {

 

 

 

if (node != null) {

 

 

 

var attributes = node.get_attributes();

 

 

 

var level = node.get_level();

 

 

 

var nodeID = attributes.getAttribute("nodeID");

 

 

 

var nodeDiv = document.getElementById(nodeID);

 

 

 

if (level == 1) {

 

nodeDiv.className =

 

"cahLevel1";

 

 

 

var endTreeViewDiv = document.getElementById("ctl00_CardinalLeftNav_endTreeView");

 

endTreeViewDiv.className =

 

"cahCollaspedEnd";

 

}

 

 

else if (level == 2) {

 

nodeDiv.className =

 

"cahLevel2";

 

}

 

 

else if (level == 3) {

 

nodeDiv.className =

 

"cahLevel3";

 

}

 

 

else if (level == 4) {

 

nodeDiv.className =

 

"cahLevel4";

 

}

 

 

if (direction == "up")

 

ResetNodes(node.get_previousNode(), direction)

 

 

else

 

ResetNodes(node.get_nextNode(), direction)

}

}

</

 

 

script>

 

<

 

 

telerik1:RadTreeView ID="CardinalRadTreeView" runat="server" Skin="" EnableTheming="false" OnNodeExpand="RadTreeView1_NodeExpand"

 

 

 

SingleExpandPath="true" ShowLineImages="False" OnClientNodeExpanded="ClientNodeExpanded"

 

 

 

OnClientDoubleClick="ClientDoubleClick" OnClientNodeCollapsed="ClientNodeCollapsed"

 

 

 

OnClientNodeClicking="ClientNodeClicking"></telerik1:RadTreeView>


Is there any known issue about the styles or the misbehaving look & feel on the radtreeview on SharePoint 2010???

Help Please.

 

Cat Cheshire
Top achievements
Rank 1
 answered on 29 Aug 2011
4 answers
168 views
I am having multiple problems with the combo box control and event handling/population between Visual Studio 2010/Windows 7 and operation under Server 2008 site.

I am developing/supporting a web site under Visual Studio 2010 on Windows 7.  All of my combo boxes are working fine.  I have both cascading combo boxes that trigger javascript and combo boxes that utilize the SelectedIndexChanged.  In all cases, these combo boxes operate just fine when testing them on my development machine.

But when I upload the pages/site up to a Server 2008 machine, the combo boxes/events do not fire correctly or they do not operate correctly.  Cascading combo boxes show the "Loading..." text, but never populate.  A combo box that is supposed to trigger a SelectedIndexChanged event triggers the event, but then the combo box resets back to the value before the user selected a new one.

How can all of this be happening?  Why would a combo box would perfectly under Visual Studio/Windows 7 and not under Server 2008?

Can anybody offer an explanation?

Below is the code from one of the "SelectedIndexChanging" combo boxes.

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="LanguageSelector.ascx.vb" Inherits="UserControls_LanguageSelector" %>
<telerik:RadComboBox
    ID="LanguageSelectorComboBox"
    AutoPostBack="true"
    EnableEmbeddedSkins="true"
    Skin="Sitefinity"
    runat="server"
    Height="200px"
    Width="215px"
    ZIndex="9000"
>
</telerik:RadComboBox>


Protected Sub LanguageSelectorComboBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs) Handles LanguageSelectorComboBox.SelectedIndexChanged
    If Page.IsPostBack Then
        Dim KeyVal As String = e.Value
        Dim languageId As Integer = Convert.ToInt32(KeyVal)
        Dim conn1 As New SqlConnection(Convert.ToString(Application("SiteDBConnect")))
        Try
            conn1.Open()
        Catch ex As Exception
            Throw New ApplicationException("Error in connection=" & ex.Message & ". The requested list cannot be created.")
        Finally
        End Try
        Dim iRtn As Integer = 0
        Dim Languages_Data As New Languages_DDC()
        Dim Languages_Cmds As New Languages_DUC()
 
        Dim Currencies_Data As Currencies_DDC = New Currencies_DDC
        Dim Currencies_Cmds As Currencies_DUC = New Currencies_DUC
 
        Dim TransTextSort_Data As TransTextSort_DDC = New TransTextSort_DDC
        Dim TransTextSort_Cmds As TransTextSort_DUC = New TransTextSort_DUC
        Dim TransTextSort_Arry As ArrayList = New ArrayList
 
        Dim iUSDKey As Integer = 1
        Dim iForgnKey As Integer = 0
        Dim currencyId As Integer = Session("UserCurrencyKey")
 
        Dim iDebug As Int32 = -1
        Languages_Data.LanguageId = languageId
        iRtn = Languages_Cmds.GetSpecific(conn1, Languages_Data, iDebug, "HON")
        If iRtn = -1 Then
            If bSetSessionValue Then
                Session("UserLanguageKey") = Languages_Data.LanguageId
                Session("UserLanguageCulture") = Languages_Data.LanguageTransCulture
                Session("UserLanguageName") = Languages_Data.LanguageEnglishName
                Session("UserChangedLanguage") = "Yes"
                Session("UserLanguageNum") = GetNewLangKeyStringValue(Languages_Data.LanguageId)
 
                '   Now we need to change the names of the session currency info so it is in the newly selected language
                Dim sLangName As String = GetNewLangKeyStringValue(Session("UserLanguageKey"))
                Dim sFieldToPopulate As String = "TextSortLang" & sLangName
 
                iRtn = TransTextSort_Cmds.GetAllByTextSort_Currency(conn1, TransTextSort_Arry, currencyId, -1, "HON Currency Change")
                For Each TransTextSort_Data In TransTextSort_Arry
                    'Session("USDLanguageName") = "United States Dollar"
                    'Session("NativeCurrencyLanguageName") = "United States Dollar"
                    Session("NativeCurrencyLanguageName") = TransTextSort_Cmds.GetField(TransTextSort_Data, sFieldToPopulate)
                    '   There can only be one record in this array, so force an exit after processing the first record
                    '   to protect us from something squirrely happening
                    Exit For
                Next
                '   Now get the native language name for the USD, unless we already have it
                If currencyId = 1 Then
                    Session("USDLanguageName") = Session("NativeCurrencyLanguageName")
                Else
                    TransTextSort_Arry = New ArrayList
                    iRtn = TransTextSort_Cmds.GetAllByTextSort_Currency(conn1, TransTextSort_Arry, 1, -1, "HON Currency Change")
                    For Each TransTextSort_Data In TransTextSort_Arry
                        Session("USDLanguageName") = TransTextSort_Cmds.GetField(TransTextSort_Data, sFieldToPopulate)
                        '   There can only be one record in this array, so force an exit after processing the first record
                        '   to protect us from something squirrely happening
                        Exit For
                    Next
                End If
            End If
            If bReloadPage Then
                Response.Redirect(HttpContext.Current.Request.RawUrl, True)
            End If
        End If
        conn1.Close()
        conn1 = Nothing
    End If
End Sub

This is just one example.  I have more. If you want to see the results on the server 2008 system, navigate to http:://www.homesonlinenetwork.com and try changing the language selected in the combo box in the far upper right-hand corner.  This same combo box works perfectly under Visual Studio 2010/Windows7.

Any thoughts/help would be greatly appreciated!  I am stumped!

Thanks in advance!

Lynn

Simon
Telerik team
 answered on 29 Aug 2011
6 answers
117 views
Is there an RAD ASP.net control extender to make a control always visible.. like the ASP.net Ajax Toolkit AlwaysVisible Control Extender?  If not.  Is the ASP.net Ajax Toolkit compatible with the RAD tools?  thanks

EDIT ======================================================================
for others that follow. 
good solution is here...

http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/alwaysvisiblecontrol.aspx

Don't bother reading below, big waste of time.
Frank
Top achievements
Rank 1
 answered on 29 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?