Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
257 views
When a user clicks on a hyperlink inside the grid it opens up a rad window, if the passing value has apostrophe ( ' ) in the text field, a js error is thrown. How to overcome this problem.

Thanks

Jessy
Marin Bratanov
Telerik team
 answered on 24 Jun 2011
4 answers
170 views
I have code like this

<Columns>
                        <telerik:GridBoundColumn DataField="TaskID" HeaderText="taskID"
                           UniqueName="TaskID" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="TaskName" HeaderText="ชื่องาน"
                           UniqueName="TaskName">
                            <FilterTemplate>
                                <telerik:RadComboBox ID="RadComboBox1" Runat="server"
                                    ShowToggleImage="False" Skin="Vista" AutoPostBack="True"
                                    MarkFirstMatch="True" EnableLoadOnDemand="true"
                                    onitemsrequested="RadComboBox1_ItemsRequested"
                                    onselectedindexchanged="RadComboBox1_SelectedIndexChanged">
                                </telerik:RadComboBox>
                            </FilterTemplate>
                        </telerik:GridBoundColumn>
                        <telerik:GridEditCommandColumn>
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn CommandName="Delete"
                            ConfirmText="Do you want to delete this item?" ConfirmTitle="Delete"
                            Text="Delete" UniqueName="column1">
                        </telerik:GridButtonColumn>
                    </Columns>


In this code I add "RadComboBox1" to FilterTemplate on GridBoundColumn name "ชื่องาน" on Design page on aspx

but I don't want to add this control like this. I want to add this control using Code Behind help me please.
Jadesada
Top achievements
Rank 1
 answered on 24 Jun 2011
3 answers
566 views
Hi,

I ha a RadTreeview like this
<telerik:RadTreeView ID="RadTreeView_CommonControls" runat="server" 
    Skin="Windows7" OnClientDoubleClick="SetPlaceHolders">
      <Nodes>
 <telerik:RadTreeNode Text="Text Controls">
  <Nodes>
<telerik:RadTreeNode Text="Text Area" Value="<Text Area></Text Area>"></telerik:RadTreeNode>
<telerik:RadTreeNode Text="Regards Template" Value="<Regards></Regards>"></telerik:RadTreeNode>
<telerik:RadTreeNode Text="Intro Template" Value="<Intro></Intro>"></telerik:RadTreeNode>
 <telerik:RadTreeNode Text="Sat Intro Template"  Value="<About Sat></About Sat>"></telerik:RadTreeNode>
</Nodes>
</telerik:RadTreeNode>
<telerik:RadTreeNode Text="Audio Controls">
 <Nodes>
<telerik:RadTreeNode Text="Embed Audio" Value="<Embed Audio></Embed Audio>"></telerik:RadTreeNode>
<telerik:RadTreeNode Text="Upload Audio" Value="<Upload Audio></Upload Audio>"></telerik:RadTreeNode>
<telerik:RadTreeNode Text="Upload BGM" Value="<Upload BGM></Upload BGM>"></telerik:RadTreeNode>                                                        
 </Nodes>
</telerik:RadTreeNode>
<telerik:RadTreeNode Text="Video Controls">
 <Nodes>
  <telerik:RadTreeNode Text="Embed Video"  Value="<Embed Video></Embed Video>"></telerik:RadTreeNode>
<telerik:RadTreeNode Text="Upload Video"  Value="<Embed Video></Embed Video>"></telerik:RadTreeNode>
<telerik:RadTreeNode Text="Upload Video and Audio"  Value="<Embed Video></Embed Video>"></telerik:RadTreeNode>                                                        
</Nodes>
</telerik:RadTreeNode>                                                    
    </Nodes>
</telerik:RadTreeView>

I am trying to access the selected node value and text when i double click on node

Javascript function
function SetPlaceHolders(sender, args) {
        var TreeView = $find("<%=RadTreeView_CommonControls.ClientID%>");
        var SelectedNode_Tree = TreeView.get_selectedNode();
        SelectedNode_Tree = TreeView.SelectedNode;
        debugger;
          
    }

var SelectedNode_Tree = TreeView.get_selectedNode(); //This is displaying Null
        SelectedNode_Tree = TreeView.SelectedNode; // This raising as Undefined


Will u please help me to fnd out this?
Plamen
Telerik team
 answered on 24 Jun 2011
1 answer
215 views
Hi,
I am using a rad grid. I have added custom template columns dynamically. On template column i am having a custom multiselect combobox (RadComboBox with CheckBox and Label inside ItemTemplate).

How can i access the combo selected value on post back due to save buton click.
if possible send me sample solution with dynamically created multiselect ComboBox.

I am using following code snnipet for custom combobox:

public class CustomDDLItemTemplate : ITemplate
{

    ListItemType templateType;
    string ColName = "AppName";

    /// <summary>
    /// Create the template
    /// </summary>
    /// <param name="container"></param>
    public void InstantiateIn(Control container)
    {      
        CheckBox checkBox = new CheckBox();
        Label lblDisplayText = new Label();      

        checkBox.ID = "checkBox";
        checkBox.Attributes.Add("onclick", "onCheckBoxClick(this,'"+ container.ClientID +"');");
        
        lblDisplayText.ID = "label";
        lblDisplayText.DataBinding += new EventHandler(this.Label_DataBind);

        // Create a new HtmlGenericControl.
        HtmlGenericControl NewControl = new HtmlGenericControl("div");

        // Set the properties of the new HtmlGenericControl control.      
        NewControl.Attributes.Add("onclick", "StopPropagation(event);");

        // Add the new HtmlGenericControl to the Controls collection of the PlaceHolder control. 
        container.Controls.Add(NewControl);

        NewControl.Controls.Add(checkBox);
        NewControl.Controls.Add(lblDisplayText);              
        break; 
    }

    public void Label_DataBind(Object sender, EventArgs e)
    {
        Label lbl = (Label)sender;
        RadComboBoxItem radCombo = (RadComboBoxItem)lbl.NamingContainer;     
        lbl.Text = DataBinder.Eval(radCombo.DataItem, ColName).ToString();
    }

  
}


Helen
Telerik team
 answered on 24 Jun 2011
3 answers
122 views
I'm using a RadToolTipManager and setting the body of my Tooltip in the .Text property (serverside).

I then add lots of tables cells to the TargetControls collection.

All works fine.

However, I want to call some javascript functions triggered by jQuery event listeners attached to elements with a known id within my Tooltip markup - e.g. a button.

This is only working for the Tooltip shown on the first table cell I hover over.

Looking at the source code, I see that a separate ToolTip is generated for EVERY cell I hover over.

This means the same id's appear multiple times - not only is this bad HTML but my triggers only work on the first one.

Is there a way to force the RadToolTipManager to only ever create one Tooltip and show that every time?

Thanks
Marin Bratanov
Telerik team
 answered on 24 Jun 2011
1 answer
78 views
Hi,

I want use this control. Is telerik provide this one. Please see the attachment. There is one text box with two button to select numeric value.

Regards,
Reyaz
Georgi Tunev
Telerik team
 answered on 24 Jun 2011
1 answer
169 views
Hello

We are are replacing the control library used in one of our legacy applications for asp .net ajax and while promoting the changes to our QA environment we are getting the following error:

Server Error in '/' Application.

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond  xxx.xxx.xxx.xxx:443

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xxx.xxx.xxx.xxx:443

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 207.179.132.114:443]
   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +239
   System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +35
   System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +224

[WebException: Unable to connect to the remote server]
   System.Net.HttpWebRequest.GetResponse() +5375213
   System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials) +69
   System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials) +3929371
   System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) +54
   System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) +74
   System.Threading.CompressedStack.runTryCode(Object userData) +70
   System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) +0
   System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) +108
   System.Xml.XmlTextReaderImpl.OpenUrl() +186
   System.Xml.XmlTextReaderImpl.Read() +208
   System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +112
   System.Xml.XmlDocument.Load(XmlReader reader) +108
   System.Xml.XmlDocument.Load(String filename) +87
   AgPortal.Web.gmsNavigationMenu.LoadFromXML(String filename) in D:\projects\agportal\AgPortal 2.3\AgPortalWeb\GMSEntry\UserControls\gmsNavigationMenu.ascx.vb:15
   AgPortal.Web.gmsGrowerBusiness.Page_Load(Object sender, EventArgs e) in D:\projects\agportal\AgPortal 2.3\AgPortalWeb\GMSEntry\MainPages\gmsGrowerBusiness.aspx.vb:7
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

The rest of the application is working fine, just the pages using telerik controls are getting the error and even then everything works fine if the application is executed from individual members of the cluster. 

Any ideas of what is going on here?

Regards,
Alejandro

PD: We are using a single IP two nodes cluster in QA.
Georgi Tunev
Telerik team
 answered on 24 Jun 2011
2 answers
96 views
Hi,

I have got a rad combo box in a page and after post back the rad combo width got decreased. I have tried your KB article
http://www.telerik.com/support/kb/aspnet-ajax/combobox/radcombobox-changes-width-height.aspx

but on running the page i am getting a java script error combo.FixUp is not a function .I am using rad controls of version 2010.1.519.40.If this version of controls does not support this fix up function is there any other solution?
deepak
Top achievements
Rank 2
 answered on 24 Jun 2011
5 answers
402 views
 Hello,

I am using Telerik PanelBar. I am using the version of 2010.3.1317.20. I cant upgrade to the latest version as the framework I am using .Net 2.0.

I have added the PanelBar in the MasterPage, When i Click on any of the item in the panel bar, the Click event is not firing.

The panelbar is populated at runtime. also the NavigateUri is set at runtime.

<telerik:RadPanelBar runat="server" ID="RadPanelNavBar" Visible="false" ExpandMode="MultipleExpandedItems" 
                                        OnItemClick="RadPanelNavBar_ItemClick" EnableViewState="true">
                                </telerik:RadPanelBar>

the below code is how i am adding the RadPanelItems

For Each mnuChildRow As DataRow In dtFilterData.Rows
                                Dim menuAdminChild As New RadPanelItem()                                
                                menuAdminChild.Text = mnuChildRow.Item(Field.DisplayName).ToString()
                                menuAdminChild.NavigateUrl = "../" + mnuChildRow.Item(Field.ResourceName).ToString()
                                menuMFGHeader.Items.Add(menuAdminChild)
                            Next

The click event is below

Protected Sub RadPanelNavBar_ItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadPanelBarEventArgs) Handles RadPanelNavBar.ItemClick
        If e.Item.Items.Count > 0 Then
            If e.Item.Expanded = False Then
                'Label1.Text = "Collapsed panel item - " + e.Item.Text
            Else
                'Label1.Text = "Expanded panel item - " + e.Item.Text
            End If
        Else
            'Label1.Text = "Clicked panel item - " + e.Item.Text
        End If
    End Sub

What finally i require is to have the RadPanelItem as selected on which the user last clicked. rest all remains un selected.

Helen
Telerik team
 answered on 24 Jun 2011
1 answer
99 views
I have radcombox with load on demand=true and allow custom text=false and markfirstmatch=true. we are loading the items from client side with onclientitemsrequested event. when the text entered is not matching the items from list it is not selecting the closest match.

Please suggest me what else settings i need to use to select the closest matched item.


Thanks and Regards
D Praveen
Helen
Telerik team
 answered on 24 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?