Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
122 views
I have a datalist (dlLockNumber) with a RadComboBox Control (rcbLockSeriesLockNumbers) in it. Depending on the number of records in the datalist, there could be one to 100 (or more) RadComboBox instances of rcbLockSeriesLockNumbers. I have a RadButton named "rbSelect" for each RadComboBox that is disabled upon page load - so that when someone selects some value other than the default ("-1"), the desired event is to enable the button. I have a javascript function named OnClientSelectedIndexChanged that hopefully would work but it does not. If any of you Javascript sharpies could take a look at the function and steer me in the right direction, it would be appreciated.

Here is the HTML side of the code - this is part of a .NET User Control:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="Keys.ascx.vb" Inherits="Controls_Keys" %>
<telerik:RadCodeBlock ID="rcblock1" runat="server">
<script language="javascript" type="text/javascript">
    function OnClientSelectedIndexChanged(sender, eventArgs) {
        var item = eventArgs.get_item();
        var ddl = $find("<%= dlKeySeries.ClientID %>");
        var button = ddl.get_items().getItem(0).findControl("rbSelect");
        var strValue = item.options[item.selectedIndex].value;
        if (strValue == "-1") {
            button.set_enabled(false);
        }
        else {
            button.set_enabled(true);
        }
    }
</script>
</telerik:RadCodeBlock>
<telerik:RadAjaxPanel ID="rapKeys" runat="server">
<asp:Panel ID="pnlKeysTrue" Visible="true" runat="server">
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td class="BlackSmall">
        <br />
            <asp:Literal ID="litSectionTitle" runat="server" /><br />
            <asp:Literal ID="litSectionIntro" runat="server" />
        </td>
    </tr>
    <tr id="trrcKeySeries" runat="server">
        <td class="BlackSmall">
            <br />
            <asp:DataList ID="dlLockNumber" DataKeyField="SeriesLockID" OnItemDataBound="dlLockNumber_ItemDataBound" Width="100%" RepeatDirection="Vertical" RepeatColumns="3" runat="server">
                <ItemTemplate>
                    <asp:Label ID="lblSeriesLockID" Visible="false" runat="server"><%#Databinder.Eval(Container.DataItem, "SeriesLockID") %></asp:Label>
                    <table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td valign="top" style="width:196px;text-align:center">
                                <telerik:RadComboBox ID="rcbLockSeriesLockNumbers" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" CausesValidation="false" AppendDataBoundItems="true" DataValueField="LockNumberID" Width="130px" ZIndex="20000" DataTextField="LockNumber" AutoPostBack="true" runat="server"  />
                            </td>
                            <td>
                                <telerik:RadButton ID="rbSelect" Enabled="false" Skin="Sunset" OnClick="rbSelect_OnClick" runat="server" Text="Select" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:DataList>
        </td>
    </tr>
</table>
</asp:Panel>
Hristo Valyavicharski
Telerik team
 answered on 01 Mar 2013
2 answers
237 views
Hi everyone!
I would like to know how could I use the RadEditor, I am new in telerik components.
I would like to use it to make email template. I have on my DB a table with the differents names for the email templates. Example: HumanResource, Marketing, etc... I load in a combobox this, and custom the aparience. Dont know where to begin?
Thanks in advance!!!!
Joan.
Rumen
Telerik team
 answered on 01 Mar 2013
21 answers
399 views
I'm getting this error using the RadControls for ASP.NET AJAX in Firefox 3. (As reported by Firebug)

It occurs on the this.dateTimeFormat.AbbreviatedMonthNames expression in the following code.

function Sys$CultureInfo$_getAbbrMonthIndex(value) {
    if (!this._upperAbbrMonths) {
       this._upperAbbrMonths =                     this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);
     return Array.indexOf(this._upperMonths, this._toUpper(value));
}

This has been a known bug in ASP.NET AJAX -- and apparently still is in Firefox.

Does anyone know a solution or workaround?

Thanks,

Randy
Sergio
Top achievements
Rank 1
 answered on 01 Mar 2013
3 answers
113 views

I have a formdecorator decorating buttons in a window that opens after a postback on the parent modal. Upon opening all buttons look as seen in the attached image and are inoperable. The culprit is the following CSS that presumably firefox4 adds (works in IE8) because i did not see it in formdecorator.css or window, etc.

button, input[type="submit"], input[type="reset"], input[type="button"], input[type="checkbox"], input[type="radio"], select {
    visibility: hidden !important;

The problem goes away when the radformdecorator has been removed.

Regards,

Brian
arun
Top achievements
Rank 1
 answered on 01 Mar 2013
1 answer
38 views
Dear Team

my scanario is
i have a text box which takes the selected value from pop up
i mean when i select the value from pop up using check box that value reflects in
text box

the value is coming fine in crome and ie
but getting problem in fire fox
getting below error
note : i am using rad ajax panel which has text box


[13:30:11.424] Use of Mutation Events is deprecated. Use MutationObserver instead. @
[13:46:25.986] TypeError: $find("dnn_ctr532_UpdateDetails_dataViewListDepartment_grdDataListViewDepartment_ctl00_ctl02_ctl03_EditFormControl_rapEmployee") is null @


please tell me what i need to do

Maria Ilieva
Telerik team
 answered on 01 Mar 2013
1 answer
225 views
When I enabled SplitButton on a RadButton, I noticed the button text was centered in relation to the entire button including the split arrow.  I found that when setting a width on the button (in aspx or code-behind), that this occurs.  If I remove the set width, the button text now centers in relation to the non-split/arrow area.  I basically just removed the set width when I dynamically split the button and add the set width when I don't need to split, so work-around was easy.  I just wanted to point this out in case anyone else has encountered or if there is just some style/attribute/property I'm missing.
Danail Vasilev
Telerik team
 answered on 01 Mar 2013
2 answers
84 views
I am having issues with the back button when using the combo box.

In Chome when I select item one, click off the combo box, then select item one and two, click off the combo box and then hit the browser back button, it shows one in the text but one and two checked.

In IE, with the same steps, it shows one is checked but one and two as the selected text.

How would you suggest having the back button return the combo box return to the previous state where the checked items and selected text match - either in the example or with an update panel?

Thanks in advance for any help.

Here is the code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="del.aspx.cs" Inherits="del" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
     
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager" runat="server"></telerik:RadScriptManager>
        <div>                
             
            <telerik:RadComboBox ID ="ddlCounty" runat="server" DataSourceID="LDS" OnSelectedIndexChanged="ddlCounty_SelectedIndexChanged" DataTextField="name" DataValueField="value" CheckBoxes="true" AutoPostBack="true" EnableViewState="true"></telerik:RadComboBox>
            <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">LinkButton</asp:LinkButton><asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                                       
             
        </div>
        <asp:linqdatasource runat="server" id="LDS" OnSelecting="Selecting_LDS" OnSelected="OnSelecting_LDS"></asp:linqdatasource>
    </form>
</body>
 
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Threading;
using System.IO;
 
public partial class del : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
     
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
    }
 
    protected void Selecting_LDS(object sender, LinqDataSourceSelectEventArgs e)
    {
        var l = new List<Object>()
        {
            new {value = 1, name = "one"},
            new {value = 2, name = "two"},
            new {value=3, name = "three"}
        };
 
        e.Result = l;
    }
 
 
    protected void ddlCounty_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        string[] result = (from i in ddlCounty.CheckedItems
                            select i.Value).ToArray<string>();
        Label1.Text = string.Join("-", result);
       
    }
    protected void OnSelecting_LDS(object sender, LinqDataSourceStatusEventArgs e)
    {
    }
}
Dimitar Terziev
Telerik team
 answered on 01 Mar 2013
4 answers
480 views
I have a radcombobox in a grid.. .And after the onSelectedIndexChanged event is fired on the client side I would like to hide the combobox...

function onSelectedIndexChanged(sender, eventArgs) {
          var selectedItem = eventArgs.get_item();
                 // I do some stuff with the selected item...
        //  Now I would like to hide this radcombobox in the radgrid row...
 
          sender.set_visible(false);   // This did not work...
}
This is the GridTemplateColumn the control resides in:
<telerik:GridTemplateColumn HeaderText="Actions" UniqueName="Actions" AllowFiltering="false"
                      Visible="true">
                      <ItemTemplate>
                          <asp:Label ID="ActionLabel" runat="server" Text="" Visible="false" />
                       <telerik:RadComboBox ID="RadComboBoxActions" runat="server" EmptyMessage="Select Action..."
                              AutoPostBack="true" Width="155px" OnClientSelectedIndexChanged="onSelectedIndexChanged" />
                      </ItemTemplate>
                      <ItemStyle Width="155px" />
                  </telerik:GridTemplateColumn>
Wired_Nerve
Top achievements
Rank 2
 answered on 01 Mar 2013
1 answer
103 views
I am working on a grid that functions very similarly to the demo Client Edit with Batch Server Update:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx

Everything works fine in IE, but in firefox I get the error:

Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0

http://localhost/wps16/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a7263e9c6-5962-41bc-b839-88b704bfcf0d%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2012.3.1308.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a847349a7-61ac-4c43-803e-aa1cc5b6cced%3a16e4e7cd%3af7645509%3a24ee1bba%3a2003d0b8%3ae330518b%3a1e771326%3ac8618e41%3af46195d3%3aaa288e2d%3ab7778d6c%3aed16cbdc%3ae085fe68%3ac08e9f8a%3a1bb784d4%3a58366029
Line 15

This occurs during the ProcessChanges(). The break point at the beginning of RadAjaxManager1_AjaxRequest() is never reached so i assume it fails somewhere during the transfer of information. The strange part is if i place a break point in ProcessChanges() and RadAjaxManager1_AjaxRequest() and step through line by line everything works. I am not sure if it is the grid or the rad ajax manager causing the problem. Are there any suggestions to what is happening and how to avoid it?
Maria Ilieva
Telerik team
 answered on 01 Mar 2013
2 answers
127 views
How can I add validation to my asyncupload control for the current version of Telerick Q3 2012 SP1?  I've tried the following but it is not working with the current version.  I very well could be doing something wrong.  Any thoughts on how to make this work?  Here is the code that I'm using, followed by the error I'm getting.  I'm in VS 2012 and using DotNet 4.5.

<script type="text/javascript">
    Telerik.Web.UI.RadAsyncUpload.prototype.getUploadedFiles = function() {
        var files = [];
 
        $telerik.$(".ruUploadSuccess", this.get_element()).each(function(index, value) {
            files[index] = $telerik.$(value).text();
        });
 
        return files;
    }
 
    function validateUpload(sender, args) {
        var upload = $("RadAsyncUpload1");
        args.IsValid = upload.getUploadedFiles().length != 0;
    }
 
</script>

<asp:CustomValidator runat="server" ID="CustomValidator" ClientValidationFunction="validateUpload"
        ErrorMessage="Select at least a single file">
    </asp:CustomValidator>



Here is the error:

Microsoft JScript runtime error:  Object doesn't support this property or method.

Thanks,

shawn

Shawn
Top achievements
Rank 1
 answered on 01 Mar 2013
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?