Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
564 views
I have a RadTextBox on the page. I read the client side API page for textbox. It said to use something like this:

var shipControl = $find("txtShippingFirstName");
var text = shipControl.get_textBoxValue; ( have also tried just get_Value and it didn't work either.)
alert(text);

However, the alert is just this : "function() {return this._textBoxElement.value;}

So how can I get the text value of a RadTextBox correctly with Javascript?
Matt
Top achievements
Rank 1
 answered on 03 Feb 2012
1 answer
79 views
Please let me know if this is feasible. I want to provide different templates to appointments based on the appointment duration. For reference you can check MS outlook where the appointment template changes based on appointment duration.
Ivana
Telerik team
 answered on 03 Feb 2012
1 answer
105 views
For some reason.. this is only happening on my web server through IIS, but it's looking in a completely different place for my toolsfile


Could not find file 'C:\Windows\SysWOW64\inetsrv\cms-editor.xml'.



Why is it looking there?
Alan T
Top achievements
Rank 1
 answered on 03 Feb 2012
1 answer
157 views
I've found what appears to be a bug on the Scheduler Timeline view.  If you enable Exact Time Rendering, and try and re-size an appointment, it doesn't always snap to the correct time.   In addition, when you re-size the appointment to one time slot in the future, it fails to fire the "end drop" event (hence you can't save).

This only appears to happen for appointments with a start time that exceeds 1/2 of the time slot.  For example, if you have hour time slots, an appointment with a start time of 8:45 will have this problem.

I can reproduce this problem on your demo located here:  http://demos.telerik.com/aspnet-ajax/scheduler/examples/exacttimerendering/defaultcs.aspx  using these steps:

In timeline view, re-size the "Attending exercises on Object Oriented Programming" appointment to a few hours in the future.  First thing you'll notice is that it "snaps" to the time slot previous to where you drop it.  This is the first problem.  Secondly, if you move it up only one time slot, it fails to fire the "drag end" event, so it doesn't "save".   I'm assuming this is all because you're "pushing" the appointment so far to the right that it _thinks_ it's actually in the next time slot, when it fact it isn't.  I'm also assuming the event doesn't fire b/c you have it turn off when you resize an appointment back to it's original time slot.

I hope this helps explain the problem clearly.  I couldn't think of any work-arounds, so would love to see a fix or a work-around if possible.  

Thanks!


Ivana
Telerik team
 answered on 03 Feb 2012
5 answers
531 views
I have the following issues when using jquery scripts in the page with ajax manager although I used radscriptblock rounding my script as documented:

1- when using radscriptblock inside updated ajax panel it will be executed in the load but if I make any ajax request manually using "ajaxRequest" function it will be executed again although I need it to be executed only one time [on page load]

2- when using radscriptblock out of updated ajax panel, it will be also executed in the load but if I make any ajax request manually using "ajaxRequest" function it will be no longer executed any more [after going to server side]


below is my code:

PAGE:
<head>
  <script src="http://localhost/xsurvey/scripts/custom/collapsible.panel.js" type="text/javascript"></script>
</head>
<%--below is body-->
<asp:ScriptManager runat="server" ID="scrt" />
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" OnAjaxRequest="OnAjaxManager_Request">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="PnlPage">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PnlPage" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PnlPage" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <asp:Panel runat="server" ID="PnlPage">
        <telerik:RadScriptBlock runat="server" ID="s">
 
            <script type="text/javascript">
                $(document).ready(function() {
                    function test() {
                        $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest('sss');
                    }
                    alert("d");
                    $("#faq").makeCollapsible({ 'collapse': '1' }, test);
 
 
                });
   
   
            
            </script>
 
        </telerik:RadScriptBlock>
        <asp:Label runat="server" ID="LblEd" />
        <ul id="faq">
            <li>
                <h3 style="text-align: center">
                    More Options?</h3>
                <p>
                    test test test
                    <br />
                    test test test
                    <br />
                    test test test
                    <br />
                    test test test
                    <br />
                    test test test
                    <br />
                    test test test
                    <br />
                    test test test
                    <br />
                </p>
            </li>
            <li>
                <h3 style="text-align: center">
                    More Options?</h3>
                <p>
                    test test test
                    <br />
                    test test test
                    <br />
                    test test test
                    <br />
                    test test test
                    <br />
                    test test test
                    <br />
                    test test test
                    <br />
                    test test test
                    <br />
                </p>
            </li>
        </ul>
    </asp:Panel>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Telerik.Web.UI;
 
public partial class Tests_jQuery_CollapsePanel : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void OnAjaxManager_Request(object sender, AjaxRequestEventArgs e)
    {
        LblEd.Text = "test test CALL SERVER" + DateTime.Now;
 
    }

}

Collapsible.panel.js
(function($) {
 
    $.fn.makeCollapsible = function(options, onCollapse) {
        var settings = $.extend({
            'collapse': '1',
            'idToCollapse': ''
        }, options);
 
        return this.each(function() {
            var $this = $(this);
 
            $this.find("li > h3").each(function() {
                $(this).css("cursor", "pointer");
                $(this).siblings().wrapAll('<div>');
            });
 
            //$("#faq li > *:not(h3)").hide();
 
 
            $this.find("li > h3").click(function() {
 
                var $h3 = $(this);
                //minus icon
                var minus = {
                    'background-image': 'url(http://localhost/xsurvey/Images/minus.gif)'
                };
                //plus icon
                var plus = {
                    'background-image': 'url(http://localhost/xsurvey/Images/plus.gif)'
                };
 
                //all siblings beside <li><h3></h3>(.....)</li>
                var risposta = $h3.siblings();
 
                var callf = 0;
 
                if (risposta.is(':hidden')) {
                    $h3.css(minus);
                    callf = 1;
                    risposta.slideDown("slow");
                }
                else {
                    $h3.css(plus);
                    risposta.slideUp("slow");
                }
 
                //risposta.slideToggle("slow");
 
                if (callf == 1 && settings.onCollapse != '') {
                    //setTimeout(alert('s'), 2000);
                    if (typeof onCollapse == "function") onCollapse();
                }
 
            });
        });
 
    }
 
 
})(jQuery);
Vasil
Telerik team
 answered on 03 Feb 2012
7 answers
243 views
I need add custom validation (not repeat node name) when user Edit/Add new node.
I try do it with EDITNODE event, but I can get the new name.
All treView and node are created Dynamically

this is my code:

 Class1.cs
this code is execute in page_init

  RadTreeView radTreeView   = new RadTreeView { ID = "tvWorkspace" };

                    RadTreeNode parentNode = new RadTreeNode(_resources.GetString("Workspace", new CultureInfo(_culture)))
                                                 {Expanded = true};

                    radTreeView.Nodes.Add(parentNode);
                    

                    List<smWorkspace> workspaceFolder = new smOrganization().GetWorkspace(App.CurrentUserId());

                    if (workspaceFolder.Count > 0)
                    {
                        CreateNodes(workspaceFolder,  radTreeView.Nodes[0]);
                    }
                    
                    radTreeView.AllowNodeEditing = true;
                    radTreeView.NodeEdit += RadTreeView1_NodeEdit;

                    radTreeView.ContextMenus.Add(new ContextMenu().CreateContextMenu());
                    radTreeView.ContextMenuItemClick += RadTree_Contextmenutitem;
                    wsTreeview.Controls.Add(radTreeView);
                  
                    workspaceDiv.Controls.Add(wsTreeview);




 protected void RadTreeView1_NodeEdit(object sender, RadTreeNodeEventArgs e)
        {
            RadTreeNode nodeEdited = e.Node;
            string folderId = nodeEdited.Value;
            string Name = nodeEdited.Text;

//here I need add Validation By New name and Value.

}


  private void CreateNodes(List<smWorkspace> workspaces,  RadTreeNode parentnode)
        {
            int folderId = workspaces[0].FolderId;
            RadTreeNode rootParent = new RadTreeNode(workspaces[0].FolderName) {ImageUrl = "~/UI/Images/folder.png"};
            parentnode.Nodes.Add(rootParent);
           

            foreach (smWorkspace folder in workspaces)
            {
                if (folder.FolderId != folderId)
                {
                    folderId = folder.FolderId;
                    rootParent = new RadTreeNode(folder.FolderName) { ImageUrl = "~/UI/Images/folder.png", Value = folderId.ToString() };
                    parentnode.Nodes.Add(rootParent);

                }else
                {
                    RadTreeNode child = new RadTreeNode(folder.File.FileName);
                    string extension = Components.CommonFunctions.GetExtensionFile(folder.File.FileFullPath);
                    child.ImageUrl = CommonFunctions.GetDocumentIcon(extension);
                   
                    rootParent.Nodes.Add(child);
                }
               
            }
           
            
        }

Value node is FolderId in Database.



how and Where I can add Custom Validation?...

I need show like this:





July
Top achievements
Rank 2
 answered on 03 Feb 2012
3 answers
128 views
I have a tab strip with 8 long tabs.  I have them set to "VerticalLeft" orientation, and then I want my MultiPage to appear immediately to the right of the tabs.  I looked at the examples for TabStrip in which this is accomplished, but when I try it in my project the Multipage is always below the TabStrip.  I have no spaces between them, no BR's... is there some property somewhere I need to set so the Mutlipage will appear to the right of the TabStrip and not below it?

These 2 controls are inside a page from another MultiPage control, if that matters.
Bozhidar
Telerik team
 answered on 03 Feb 2012
7 answers
183 views
Hi,

I know there's another thread like this too
http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/radopen-is-not-working-properly-on-ie-9.aspx
But what I encountered is different.
Here's my code for calling the radopen when clicking a button.
ClientScript.RegisterStartupScript(Page.GetType(), ShowRemarks, "ShowRemarksDialog();", true);

Here's the javascript code in my main aspx page.
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
            function ShowRemarksDialog() {
                Sys.Application.add_load(function() {
                window.radopen("UpdateRemarks.aspx?ScreenType=1", "RemarksDialog");
                return false;               
                });
            }              
 
            function refreshGrid() {               
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
                }
             
 
            </script>
        </telerik:RadCodeBlock>
in the UpdateRemarks.aspx
I'm using this javascript to refresh my grid.
<script type="text/javascript">
            function CloseAndRebind() {
                GetRadWindow().BrowserWindow.refreshGrid();
                GetRadWindow().close();
            }
 
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
 
                return oWindow;
            }
 
            function CancelEdit() {
                GetRadWindow().close();
            }
        </script>

When the button is clicked, nothing is displayed in IE9.
It is working fine with IE7 though..
Any idea how to solve this???
THanks..
Svetlina Anati
Telerik team
 answered on 03 Feb 2012
1 answer
158 views
Currently our company website uses the old 2006 version of Telerik controls. We are soon gonna upgrade to the newer version and I was wondering if both versions of telerik(the old-version we currently have and the new one) are able to be installed and still work with one another.  I am afraid that certain controls will break on our website when upgrading to the newer version.  Please let me know.  Thank You.



Andrey
Telerik team
 answered on 03 Feb 2012
5 answers
1.1K+ views
I have a grid which lists items in an order. The first column has a GridButtonColumn which a user can click to remove the item from the order.

The data in the grid is loaded using the OnNeedDataSource method, items are bound to the grid and hidden fields are set using OnItemDataBound method, and the event to remove the item uses the OnItemCommand method.

When the user clicks the delete/remove icon in the GridButtonColumn, the page fires the Grid_ItemCommand, but the e.item.DataItem is null, not allowing me to perform my action as I now don't know which item is to be removed from the order?

How do I ensure the DataItem is still available once the user clicks the delete/remove icon?
Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?