Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
136 views
Hi:

I have gone through the tutorials on the Knockout.js web-site.  I am now converting them to classic asp.net (sans mvc).
Using the ms asp:TextBox, the sample (tutorial #1) converted without a problem, but I am having a problem with telerik:RadTextBox controls.  So, with telerik if I just tab through the knockout bound value is lost and the control is empty.
In my master page:
<telerik:RadScriptManager ID="knockoutAppScriptManager" runat="server">
    <Scripts>
        <asp:ScriptReference Path="Scripts/jquery-1.5.1.js" />
        <asp:ScriptReference Path="Scripts/knockout-2.1.0.js" />
    </Scripts>
</telerik:RadScriptManager>
Standard MS asp controls.
<%@ Page Title="Knockout | Tutorial #1" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Tutorial1.aspx.cs" Inherits="KnockoutApp.Tutorials.Tutorial1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <!-- learn.knockoutjs.com -->
    <p>First name: <strong><asp:Label ID="firstNameLabel" runat="server" data-bind="text: firstName" /></strong></p>
    <p> Last name: <strong><asp:Label ID="lastNameLabel" runat="server" data-bind="text: lastName" /></strong></p>
    <p> Full name: <strong><asp:Label ID="fullNameLabel" runat="server" data-bind="text: fullName" /></strong></p>
    <p>First name: <asp:TextBox ID="firstNameTextBox" runat="server" data-bind="value: firstName" /></p>
    <p> Last name: <asp:TextBox ID="lastNameTextBox" runat="server" data-bind="value: lastName" /></p>
    <asp:Button ID="Button1" runat="server" Text="Go caps" data-bind="click: capitalizeLastName" />
    <!-- js code -->
    <script type="text/javascript">
        function AppViewModel() {
            this.firstName = ko.observable("Bert");
            this.lastName = ko.observable("Bertington");
            this.fullName = ko.computed(function () {
                return this.firstName() + " " + this.lastName();
            }, this);
            this.capitalizeLastName = function () {
                var currentVal = this.lastName();   // Read the current value
                this.lastName(currentVal.toUpperCase()); // Write back a modified value
            };
        }
        // Activates knockout.js
        ko.applyBindings(new AppViewModel());
    </script>
    <!-- end of content -->
</asp:Content>

My RadTextBox:
<%@ Page Title="Knockout | Tutorial #1" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Tutorial1Rad.aspx.cs" Inherits="KnockoutApp.Tutorials.Tutorial1Rad" %>
<%@ Register TagPrefix="Telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <!-- learn.knockoutjs.com -->
    <p>First name: <strong><asp:Label ID="firstNameLabel" runat="server" data-bind="text: firstName" /></strong></p>
    <p> Last name: <strong><asp:Label ID="lastNameLabel" runat="server" data-bind="text: lastName" /></strong></p>
    <p> Full name: <strong><asp:Label ID="fullNameLabel" runat="server" data-bind="text: fullName" /></strong></p>
 
    <p>First name: <telerik:RadTextBox ID="firstNameTextBox" runat="server" data-bind="text: firstName" /></p>
    <p> Last name: <telerik:RadTextBox ID="lastNameTextBox" runat="server" data-bind="text: lastName" /></p>
    <asp:Button ID="Button1" runat="server" Text="Go caps" data-bind="click: capitalizeLastName" />
    <!-- js code -->
    <script type="text/javascript">
        function AppViewModel() {
            this.firstName = ko.observable("Bert");
            this.lastName = ko.observable("Bertington");
            this.fullName = ko.computed(function () {
                return this.firstName() + " " + this.lastName();
            }, this);
            this.capitalizeLastName = function () {
                var currentVal = this.lastName();   // Read the current value
                this.lastName(currentVal.toUpperCase()); // Write back a modified value
            };
        }
        // Activates knockout.js
        ko.applyBindings(new AppViewModel());
    </script>
    <!-- end of content -->
</asp:Content>

I have tried both data-bind="text: firstName" anddata-bind="value: firstName"

Phil
I tried to attach a zip but it would not accept a zip...
Phil
Top achievements
Rank 2
 answered on 28 Oct 2012
3 answers
76 views
Hiya,

As new controls and features are added to some of the Telerik product suites, other suites are being left behind. I am in no way complaining about new features being added to anything, mind you. I am simply asking that some consideration be made for all suites when you add new features to one. Prepare yourself to be amazed by a series of logical arguments that will compel you to take action! Namely, the action I want you to take...

All About Me (or, "The Most Interesting Thing You've Ever Read In Your Whole Life")

My main product makes heavy use of your ASP.Net AJAX controls. However, you have some goodies in your Silverlight controls that would really make some parts of my product shine. Specifically, the property grid and diagrams controls. Now, I know the diagrams control is very new, but the property grid has been available as a Silverlight control for quite some time, and there really is no (non-sucky) alternative out there on the market. Besides, I'd want it to use the Telerik controls for property value selection (RadColorPicker, RadDatePicker, etc).

Now I understand the complexity involved in porting something like the Diagrams control to the ASP.Net AJAX suite, but you guys are the masters! And as for the property grid.. Well, if it were crazy easy, I'd write it, but for you guys it should be a snap, right?

It's All About Love (or, "Gimme Mah Features!")

I hate to come across as one of those people what with their, "why isn't my toolset getting any love?" whiny pitch, so let me try a logical angle here... The future of Silverlight looks... well, icky, Microsoft says it's their platform for development of Windows Phone applications (check your analytics, everybody -- a responsive, mobile-friendly UI is a far better investment than writing a UI just for Windows Phone). Also, they refuse to confirm or deny whether there's even going to be another major release after 5 (read: they wouldn't blood well refuse to confirm the next major release of ASP.Net MVC or Web Forms, so make your own conclusion), and teetering on the edge of irrelevance because of all the crazy nifty stuff you can do using HTML5, CSS3 and JavaScript.

It doesn't even run inside the Windows 8 IE unless you drop to desktop.

Mix-n-Match (or, "Mating with a Corpse -- Why It's Unhealthy")

So, even using mix-and-match to embed the Silverlight controls in order to (kinda) integrate them into my product that makes use of the ASP.Net AJAX suite seems risky, especially since something like the property grid would be ubiquitous. The absolutely worst part of it is that I'd still have to write non-Silverlight code to duplicate the same functionality for those who cannot -- or choose not to -- install the Silverlight plug-in. And honestly, saying "no" to just about anything a browser asks you to install might not be a terrible recommendation to give non-tech-savvy web users these days.

Did I mention I'd still have to duplicate the functionality in HTML anyway?

KendoUI for Web (or, "Why Am I Paying Some Other Guy To Sleep With My Wife?")

Before I forget, let me just ask: Why not clean up the ASP.Net AJAX controls? Why not make them all snazzy with whatever it is the KendoUI for Web stuff is supposed to offer that's so much better? I know it's tempting to scrap something that's become boring and start over with the latest and greatest, but for existing customers (us, in this case), why not do the right thing and re-plumb the old stuff? It makes me extremely nervous (like, a totally manly nervous) that you're dedicating resources to a new suite that looks like it wants to replace the existing suite, only it wants me to rewrite all my code for the same -- and often less -- functionality.

Really, KendoUI for Web doesn't have anywhere near the number of controls. Are we supposed to mix and match ASP.Net AJAX controls with KendoUI for Web? Where does that leave us Web Forms people?

Anyway, as far as KendoUI for Web is concerned, I'd just really love to see the resources that are being used/spent on that project redirected to making the ASP.Net AJAX suite(s) (WebForms/MVC) that much more awesome. And make them all HTML5 sparkly if you like, too.

I'll avoid writing a whole section on disliking the idea of my subscription funding something that's going to make the current suite I've built my product around obsolete. That would just get all emotional and petty.

In Summary

I could have saved us all a whole lot of time by just saying, "Hey, Telerik. May I please, please, pretty please have the Property Grid included in the ASP.Net AJAX controls? Please? Oh and if you could find time for the Diagrams control, that'd be just peachy." But then I couldn't have made it seem like it was about bigger, more important things.

Thank you for your consideration, and for the attention that I desperately crave.
Iana Tsolova
Telerik team
 answered on 28 Oct 2012
1 answer
113 views
I am using a radGrid, on the itemInserted event I have a textbox which takes a name and stores it the table and I am also creating a directory of that name.

Now I am facing problems with renaming the directory I created.
I want to know how I can rename the directory when I want to Edit to change the name. I know this code

System.IO.Directory.Move(@"c:\abc", @"c:\cba");
or
FileIO.FileSystem.RenameDirectory(oldFolderName.Text, newFolderName.Text)

If I use EditCommand event and find the value of the name column But when I will change the name to something else , How will I take the new value and rename the directory accordingly?


Jayesh Goyani
Top achievements
Rank 2
 answered on 27 Oct 2012
2 answers
92 views
Hi, 

I want to create a textbox with a button, I tried using RegexTextBox with RadInputManager.  It works fine and does not cause any postback when use the proper button, but I also have another buttons inside my page that are not related to the functionality of the regex, and when the textbox is invalid, it does not cause postback.  I could not find any way to link inputManager just to the button i desire.  

Is that possible?
Arnold Guzmán
Top achievements
Rank 1
 answered on 26 Oct 2012
1 answer
70 views
I would like to download / import data from following webpage to excel.
http://www.dukascopy.com/tradercontest/?action=liveForecast
Once you go to that page, change instrument to any, so all three parameters are "Any" 

You will see there are quite a few pages with 10 trades on each page and all these trades are are having one of three background colors.

I want to import all these trades from all of the pages in excel on an interval of say 1 or 5 minutes or if the trades are imporeted when the excel is opened, it is acceptable as well.

So I have updated web address to fetch data from page 1,2,3 and likewise which are as follows.

http://www.dukascopy.com/tradercontest/?instrument=USD%2FCHF&side=&state=&trader=&page=1&sort_by=&sort_dir=ASC&action=forecastGrid&ajax=1

http://www.dukascopy.com/tradercontest/?instrument=USD%2FCHF&side=&state=&trader=&page=2&sort_by=&sort_dir=ASC&action=forecastGrid&ajax=1

We have to change the page=1 to page=2 to page=3 and likewise. 

If I use the above updated web addresses, I am not able to grab the back ground color of each trade in a way that the background color appears on first link above.

So the requirement is to import all the trades from all of the web pages with back ground color as a separate column is excel.

Please let me know if anyone have the solution.

Thanks and regards.

Daniel
Telerik team
 answered on 26 Oct 2012
14 answers
802 views
Hi,

We have only 3 dicitionaries for RadSpell control( i.e English, German and French). Please let me know, where i can download other language dictionaries?

Thanks,
Mariyam
Rumen
Telerik team
 answered on 26 Oct 2012
1 answer
43 views
hi

i have added a  2012 Q3 radcaptcha and have also enable add handlers.

But when i view it in Firefox all is ok but not IE9. it shows when view in browse but when refresh, it just display a gray image in IE 9

I am not using web farm or web garden. it is just a simple website.

My application pool is set to ASP.NET v4.0.

It has beed bothering me and i could not find a solution.

This is my webconfig code:

 <system.web>
    <sessionState mode="SQLServer" sqlConnectionString="data source=XXXXXX;user id=XXXXX;password=XXXXXX" timeout="60" />
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>
    <httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
    </httpHandlers>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
    </handlers>
  </system.webServer>
  <appSettings />
Slav
Telerik team
 answered on 26 Oct 2012
8 answers
397 views
Hello,

I'm trying  to make a popup window which contains the imageEditor.
I'm getting a similar problem as an earlier post here (with no solution), when I click a tool in the imageeditor, the dialog appears behind my window.
I can move the window so I can select the dialog and use its functionality.But there seem to be going more things wrong since the dialogs function, but are not properly filled in with data (for example the resize dialog contains 0 0 as with and height).

Is the imageeditor not meant to work inside a radwindow?

The code I use:
<telerik:RadWindow ID="winImageEditor" runat="server" VisibleStatusbar="false" 
                   ShowContentDuringLoad="false" Modal="false" Behaviors="Close,Move,Resize" Title="Edit Image">
    <ContentTemplate>
        <telerik:RadImageEditor ID="iedImageEditor" runat="server" >
        </telerik:RadImageEditor>
    </ContentTemplate>
</telerik:RadWindow>



Any help would be appreciating since I'm running out of time to fix this.
Jonathan
Top achievements
Rank 1
 answered on 26 Oct 2012
2 answers
119 views
Hi

While trying to use a RadButton as an Image Button I have come across this issue under IE9 (and probably all versions of IE) where when the button is pressed a focus rectangle is shown around it.  Please see attached : IE9 Image Button Pressed.png

I have tested under Chrome and this does not happen.  Please see attached : Chrome Image Button Pressed.png

Is there a way to remove the focus rectangle when using IE?

I am using Visual Studio 2010, .Net framework 4 and Telerik Q3 2012 controls.

Basic HTML to test this is:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="Telerik_RadButton._Default" %>
 
<%@ 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"></telerik:RadScriptManager>
        <div>
            <telerik:RadButton ID="RadButton1" runat="server" Text="RadButton" Width="77px" Height="22px">
                <Image ImageUrl="~/i/PasswordUp.png" HoveredImageUrl="~/i/PasswordHover.png"
                  PressedImageUrl="~/i/PasswordClick.png" DisabledImageUrl="~/i/PasswordDisabled.png"
                  EnableImageButton="true" />
            </telerik:RadButton>
        </div>
    </form>
</body>
</html>

I've attached the png files that are used above.

Thanks

Dale
Steve
Top achievements
Rank 1
 answered on 26 Oct 2012
1 answer
79 views
I've got a the below javascript function that's called from OnGridCreated event handler. Everything works fine in Chrome, IE8 and IE9 browsers but I'm getting a javascript error in IE7 on the masterTableView.showColumn(columnIndex) or on  masterTableView.hideColumn(columnIndex). 

function toogleColumnDisplay(masterTableView, columnUniqueName, isDisplayed) {
    var column = masterTableView.getColumnByUniqueName(columnUniqueName);
    var columnIndex = column.get_element().cellIndex;
    if (isDisplayed) {
        masterTableView.showColumn(columnIndex);
    }
    else {
        masterTableView.hideColumn(columnIndex);
    }
}

It seems the IE7 error occures when a column is already hidden, and you're trying to use hideColumn on it. Also, if a column is visible  showColumn will produce an error. As a work around, I tried to check the column visibility before trying to change visibility.
 if (isDisplayed == column.get_visible()) {
        return;
    }

However, even though column's get_visible()  method returns an appropriate value after showColumn or hideColumn methods, the actual visibility of columns on the screen is not changed. It seems like the columns are not added to this._hiddenCols collection. 

Thanks,
Alex
Angel Petrov
Telerik team
 answered on 26 Oct 2012
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
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
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?