Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
107 views

 have an application in VS2008, I control the code with Team foundation, I I had to change my equipment and after installing all the components and software necessary and to again put the code in the new computer, the code no longer works of the same form.
the event OnClientItemsRequested= " UpdateItemCountField " no longer goes off. I have put alert and not even that sends, that is to say, it does not happen that way.

<telerik:RadComboBox ID="rcmdProgra" runat="server" Height="120px" Width="250px"
                                                        EmptyMessage="Programas" DataTextField="Nombre" DataValueField="Clave"
                                                        DropDownWidth="370px" EnableLoadOnDemand="true" EnableEmbeddedScripts="true"
                                                        Font-Size="XX-Small"
                                                        OnClientKeyPressing="ChangeValueRCB"
                                                        OnClientItemsRequested="UpdateItemCountField"
                                                        OnClientSelectedIndexChanged="selectedProgram"
                                                        OnItemsRequested="rcmbProgra_ItemsRequested">

it is possible to mention that in the other equipment, which does not install I, he himself code worked correctly; single it changes to me of equipment, needs to me to install something.

and databind() in server side not working now... not send error but no show me the rows 

I hope can help me please. thank you very much.

Roberto
Top achievements
Rank 1
 asked on 29 Jun 2010
2 answers
118 views

Is there a way to change the background color of a menu item through javascript?  I've tried the adding the following code to the OnClientShowing event but it did not seem work:

 

 

 

 

var item = sender.get_items().getItem(1);

 

item.set_cssClass(

 

'blue_bkgd');

Thanks,

 

 

 

 

 

 

 

Mike

Mike
Top achievements
Rank 1
 answered on 29 Jun 2010
2 answers
185 views
Anyone know off hand where there are any good examples of using Telerik Ajax controls to build either a FAQ or a Glossary indexed by letter? Maybe in the demos?
bill
Top achievements
Rank 1
 answered on 29 Jun 2010
3 answers
143 views
We have a RadComboBox that is being loaded on demand with values as the user types (similar to the search assist with a google web search). 

When a user hits enter or clicks a button to perform their search while the data is still being loaded, we are getting a modal error message window in Firefox  that states: "The server method 'GetCompletionList' failed."  'GetCompletionList' is the name of our webservice method.  This only happens in Firefox and only happens when the ajax request to load data is aborted.

We attempted to cancel the OnClientItemsRequestFailed event of the combo box but found the event was not being raised in this case.

Our combo box is in a user control on a master page.  Here is the code for the combo:
<telerik:RadComboBox ID="ddlTextSearch" runat="server" AllowCustomText="True" EnableLoadOnDemand="True"   
ShowDropDownOnTextboxClick="False" ShowToggleImage="False" onclientitemsrequesting="ddlTextSearch_ItemRequesting"  OnClientSelectedIndexChanged="ddlTextSearch_SelectionChanged" ZIndex="9900">  
        <WebServiceSettings Method="GetCompletionList" Path="~/TextSearchAutoComplete.aspx" /> 
</telerik:RadComboBox> 

Here is the js we are using:
function ddlTextSearch_HandleKeyPress(e)   
        {  
            if (!e) e = event;  
                  
            var keyCode = e.keyCode || e.which;  
            if (keyCode == 13)   
            {  
                var combo = $find("<%= ddlTextSearch.ClientID %>");  
                var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");  
                if (combo && combo.get_highlightedItem() != null)  
                {  
                    ajaxManager.ajaxRequestWithTarget("<%= ddlTextSearch.UniqueID %>","<%= WebUtils.HttpRequestEventArguments.SearchAssist %>");  
                }  
                else  
                {  
                    ajaxManager.ajaxRequestWithTarget("<%= ddlTextSearch.UniqueID %>","<%= WebUtils.HttpRequestEventArguments.Search %>");  
                }  
            }  
        }  
        
        // Telerik workaround for enter key when ddl is loading.  
        var $ = $telerik.$;     
        $(document).ready(function(){$("#" + "<%= ddlTextSearch.ClientID %>" + "_Input").keydown(ddlTextSearch_HandleKeyPress);});  
        
        // Telerik workaround for not selecting cell text when clicking on txtbox.  
        Telerik.Web.UI.RadComboBox.prototype._onInputCellClick = function(e)   
            {  
                if (this._enabled) {  
                    //  if (this.get_text() !== this.get_emptyMessage())  
                    //       this.selectText(0, this.get_text().length);  
                    if (!this.get_dropDownVisible() && this._showDropDownOnTextboxClick)  
                        this._showDropDown(e);  
                    return true;  
                }  
            }  
              
        function ddlTextSearch_SelectionChanged(sender, eventArgs)  
        {  
            if (eventArgs.get_domEvent().type == "click")  
            {  
                var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");  
                if (ajaxManager)  
                {  
                  ajaxManager.ajaxRequestWithTarget("<%= ddlTextSearch.UniqueID %>","<%= WebUtils.HttpRequestEventArguments.SearchAssist %>");  
                }  
            }  
        }  
          
       function ddlTextSearch_ItemRequesting(sender, eventArgs)  
        {  
            var context = eventArgs.get_context();  
            /* Setting a few context parameters - code removed */ 
        } 



Can you please provide a work around or solution?  Thanks.
Simon
Telerik team
 answered on 29 Jun 2010
1 answer
110 views
Has anyone used the Telerik controls to create a UserVoice/GetSatisfaction type of experience in an ASP.NET web site?

My clients are asking for this type of functionality and it would help to know what has already been done.

They might just integrate with the existing commercial services but seem more inclined to own and host a package themselves.

Thanks,

Ken
Nikita Gourme
Top achievements
Rank 1
 answered on 29 Jun 2010
1 answer
118 views
Hi There,

We are using the Telerik RadColorPicker in our application. The definition we use is shown below.

<telerik:RadColorPicker ID="rcpKleurLicht" runat="server"

                            PaletteModes="HSV"

                            PreviewColor="true"

                            ShowIcon="true"

                            Width="185px"

                            Skin="Windows7"

                            ShowEmptyColor="false">

                        </telerik:RadColorPicker>

We have the following problem. The first time we load the controls everything is fine, we put our defined color in the SelectedColor and it shows op as an icon. If you click on it you see the HSV window. Then we save our data using a normal postback and edit the item again. Now the lay-out of the color picker changes, to something completely different. Can anybody explain us why this happens?

We use Telerik for ASP.NET/AJAX version 2009.3.1314.35

I've attached a document to show the layout change.

Thanks in advance.

Patrick

Tsvetie
Telerik team
 answered on 29 Jun 2010
5 answers
182 views
Hi, I'm using latest internal build 2010.1.504.20.
I have simple layout: textbox for e-mail info and submit button. I use RadInputManager->RegExpTextBoxSetting to manage validations and Empty message:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_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"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
    <style> 
    </style> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <asp:ScriptManager ID="ScriptManager1" runat="server"> 
    </asp:ScriptManager> 
     
    <asp:TextBox runat="server" ID="EMailText" TextMode="SingleLine" /> 
     
    <asp:LinkButton ID="LinkButton1" ValidationGroup="Contact" runat="server" Text="Send" CssClass="contact-btn" /> 
    <telerik:RadInputManager  ID="ContactRadInputManager" runat="server"> 
        <telerik:RegExpTextBoxSetting  BehaviorID="EmailBehavior" EmptyMessage="e-mail" ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" Validation-ValidationGroup="Contact" Validation-IsRequired="true" ErrorMessage="error!"> 
                <TargetControls> 
                    <telerik:TargetInput ControlID="EMailText" /> 
                </TargetControls> 
         </telerik:RegExpTextBoxSetting>     
    </telerik:RadInputManager> 
    </form> 
</body> 
</html> 

If you will try to run this code using latest internal release (for example in FireFox as me) you will see following problems:
1) Note: no post backs before instructions. Click send button (don't enter TextBox so far). You will see expected error message. Enter text box and you will see empty message "e-mail" entered there as text instead of blank field.
2) Note: no post backs before instructions. Click send button (don't enter TextBox so far). You will see expected error message. Refresh page (post back happens), you will see error message that is fine. Enter text box and you will see again error message entered there as text instead of blank field.
3) Note: no post backs before instructions. Enter something in the text box that is not valid e-mail, for example "111". Leave text box. You will see expected error message. Refresh page (post back happens), you will see error message that is fine. Enter text box and you will see again error message entered there as text instead of "111". For me it will be fine is post back will clear state of text boxes of will correctly remember it, but not current behavior.

Now lets add one more text box with the required validation on it:
    <asp:TextBox runat="server" ID="NameText" TextMode="SingleLine" /> 
    <asp:TextBox runat="server" ID="EMailText" TextMode="SingleLine" /> 
     
    <asp:LinkButton ID="LinkButton1" ValidationGroup="Contact" runat="server" Text="Send" CssClass="contact-btn" /> 
    <telerik:RadInputManager  ID="ContactRadInputManager" runat="server"> 
        <telerik:RegExpTextBoxSetting  BehaviorID="EmailBehavior" EmptyMessage="e-mail" ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" Validation-ValidationGroup="Contact" Validation-IsRequired="true" ErrorMessage="error!"> 
                <TargetControls> 
                    <telerik:TargetInput ControlID="EMailText" /> 
                </TargetControls> 
         </telerik:RegExpTextBoxSetting>     
        <telerik:TextBoxSetting BehaviorID="NameBehavior" EmptyMessage="name" ErrorMessage="enter name" 
                                Validation-IsRequired="true" Validation-ValidationGroup="Contact"> 
            <TargetControls> 
                <telerik:TargetInput ControlID="NameText" /> 
            </TargetControls> 
        </telerik:TextBoxSetting>     
              
    </telerik:RadInputManager> 

4) Note: no post backs before instructions. Enter something in the NameText text box for example "111". Enter something valid in the EMailText text box for example "2@2.com". Refresh page (post back happens). You will see that NameText text box looses it's "RadInput_Enabled_Default" style after post back.

Please let me know if I'm doing something wrong or my expectations are not correct. Also provide workarounds if exist or let me know when fixes will be available internally.

Thanks,
Denis.
Tsvetoslav
Telerik team
 answered on 29 Jun 2010
4 answers
201 views
Hi,

I have one xml file where i have defined URL as one attribute in all xml node. Based on some condition i need to set this URL value. So i cannot assign values to static xml. To achieve this functionality in code behind file I have implemented as below. But it is not fetching the newly set URL value.

Can anybody help me in re bind the xml data source to radmenu item?

'Get the list of name nodes
            xmlnodelst = xmlFinalDoc.SelectNodes("Items/Item/Item")

            For Each xmlParentNode In xmlnodelst
                For Each xmlnode In xmlParentNode.ChildNodes
                    If CDbl(xmlnode.Attributes.GetNamedItem("Value").Value) = 42 Or CDbl(xmlnode.Attributes.GetNamedItem("Value").Value) = 41 Then

                        If CBool(objBOApplication.Group.UsePaymentBatchDetails) Then
                            If CDbl(xmlnode.Attributes.GetNamedItem("Value").Value) = 41 Then
                                xmlnode.Attributes.GetNamedItem("Url").Value = "../Pages/PaymentBatchCreate.aspx?payMode=O"
                            Else
                                xmlnode.Attributes.GetNamedItem("Url").Value = "../Pages/PaymentBatchCreate.aspx?payMode=E"
                            End If
                        Else
                            If CDbl(xmlnode.Attributes.GetNamedItem("Value").Value) = 41 Then
                                xmlnode.Attributes.GetNamedItem("Url").Value = "../Pages/PayBatch.aspx?payMode=O"
                            Else
                                xmlnode.Attributes.GetNamedItem("Url").Value = "../Pages/PayBatch.aspx?payMode=E"
                            End If
                        End If
                    End If
                Next
            Next

            xmlDataSrc.Dispose()
            xmlDataSrc.Data = xmlFinalDoc.OuterXml
            xmlDataSrc.XPath = PresentationConstants.XPATH
            xmlDataSrc.DataBind()

            mnuKAM.Items.Clear()
            mnuKAM.DataSource = xmlDataSrc
            mnuKAM.DataNavigateUrlField = PresentationConstants.URL
            mnuKAM.DataTextField = PresentationConstants.TEXT
            mnuKAM.DataValueField = PresentationConstants.Value

            radMnuBindg.ImageUrlField = PresentationConstants.IMAGE
            radMnuBindg.NavigateUrlField = PresentationConstants.URL
            radMnuBindg.TextField = PresentationConstants.TEXT
            radMnuBindg.ValueField = PresentationConstants.Value

            mnuKAM.DataBindings.Add(radMnuBindg)
            mnuKAM.DataBind()


Yana
Telerik team
 answered on 29 Jun 2010
3 answers
137 views

This is driving me crazy, and I have no idea why it's happening. I've got a grid with the following settings...

<telerik:GridClientDeleteColumn ConfirmText="Are you sure you want to delete the selected item?" 
    ButtonType="LinkButton" Text="Delete">  
</telerik:GridClientDeleteColumn> 
 
<ClientEvents OnRowSelected="RowSelected" OnRowDeleted="RowDeleted" /> 
 

Here's my javascript...

function RowSelected(grd, eventArgs) {     
    
    var masterTable = grd.get_masterTableView();     
    var rows = masterTable.get_dataItems();     
    var iRow = eventArgs.get_itemIndexHierarchical();     
    var row = rows[iRow];  
 
    if (row == null) {  
        alert('Row is Null: How is this possible?');  
        return;  
    }  
 
    var cell = row._element.cells[3];  // Get the 3rd column cell.     
    if (cell == null) {     
        alert('How is this possible?');     
        return;     
    }     
    var val = cell.innerHTML;     
    alert(val);     
    
}    
 
 
function RowDeleted(grd, eventArgs) {  
    alert('Row Deleted Done!');  
}  
 

When I select a row normally, an alert shows the value in the 3rd cell. No problem there. But when I click the delete link in a row, it pops up the "Row Deleted Done!" message as expected, and then OnRowSelected gets executed, but with strange results, at times resulting in my "How is this possible?" alerts.

After all, OnRowSelected should only get kicked off if a row is selected (which apparently the code thinks is the case, even though I don't always see a row getting highlighted and I'm not telling it to select a row after the delete). But a row is somehow getting selected after the delete, so a resultant row and cell must exist since that's what caused the event to get kicked off.

So what's going on?
Tsvetoslav
Telerik team
 answered on 29 Jun 2010
1 answer
135 views
Are there any examples or does anyone have any guidelines for having a nestedviewtemplate that contains a usercontrol?  What I am looking to accomplish is the user expanding a row, and the expansion has a user control's data is based on a value ("key") from the row of data that was just expanded.  The control's data is retrieved on page load and is then stored in ViewState. 

If I do something like this:
<NestedViewTemplate> 
    <uc1:myControl runat="server" ID="myCustomControl" MyKey='<%# Eval("Key") %>' /> 
</NestedViewTemplate> 
 
everything seems to work OK until I try to edit a row in the grid or add a row.  At that point, the ViewState of the control is lost and since it's not an initial page load it won't re-load the data.

So I guess my questions would include:
1.  Anything I need to consider when using a UserControl in a NestedViewTemplate?
2.  Do I need to add the usercontrol dynamically?
3.  Do I need to load the data of the control in a different manner?  Upon grid row expansion, for example?
Rosen
Telerik team
 answered on 29 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?