Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
283 views

 Hi Guys,

I am using type ahead functionality in combo box, for auto completing state. There are instances when user may enter such value which is not suggested or not in a list e.g. ZC or nv. How can we make sure that the user has selected value within the given list.

I understand that I can use drop down list in above scenario. But I need to use the auto complete for combo box.

I tried the property setting suggested http://www.telerik.com/help/aspnet-ajax/combobox-select-existing-item.html, but it does not work as expected.

I also tried the javascript. it does turn red when a wrong value is enterd, but does not stop the user from saving the value, and the red background colour does not go away once the correct value is selected.
function OnClientBlurHandler(sender, eventArgs) {
        var textInTheCombo = sender.get_text();
        var item = sender.findItemByText(textInTheCombo);
        //if there is no item with that text
        if (!item) {
            sender.set_text("");
            setTimeout(function () {
                var inputElement = sender.get_inputDomElement();
                inputElement.focus();
                inputElement.style.backgroundColor = "red";
            }, 20);
        }
    }



Thanks In Advance,

Boyan Dimitrov
Telerik team
 answered on 01 Nov 2012
1 answer
52 views
I think I followed all the rules to transfer data between two listboxes but I am getting empty text when transferring from one list box to another...

This is the aspx file
<Telerik:RadListListBox id="lstAvailable" runat="server" allowtransfer="true" transfertoid="lstAllocated"
    width="350px" height="240px" autopostbackontransfer="true" selectionmode="Multiple">
    <HeaderTemplate>
        <div style="text-align: center; background-color: #EEE;">
            <asp:Label ID="lblAvailable" runat="server" Text="Available fields"></asp:Label
        </div>
    </HeaderTemplate>
    <ItemTemplate>
        <div style="width:auto">
            <%#Eval("Text") %>
        </div>
    </ItemTemplate>
<Telerik:RadListListBox>
<Telerik:RadListListBox id="lstAllocated" runat="server" selectionmode="Multiple" allowdelete="False"
    width="350px" height="240px" AllowReorder="True">
    <HeaderTemplate>
        <div style="text-align: center; background-color: #EEE;">
            <asp:Label ID="lblAllocated" runat="server" Text="Used fields"></asp:Label
        </div>
    </HeaderTemplate>
    <ItemTemplate>
        <div style="width:auto">
            <div style="float:left"><%#Eval("Text") %></div>
            <div style="float:Right">
                <asp:CheckBox runat="server" ID="chkRequired" />
            </div>
        </div>
    </ItemTemplate>   
</Telerik:RadListListBox>

This is the cs file

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        LoadFirstListBox();
        LoadSecondListBox();
    }
}
 
protected void LoadFirstListBox()
{
    // Same as LoadSecondListBox (see below)
}
 
protected void LoadSecondListBox()
{
        ListItemCollection lstAllocatedCollection = new ListItemCollection();
            ListItem allocatedItem = new ListItem(
                "Test-1",
                "22");
            allocatedItem.Attributes["Required"] = "true";
            lstAllocatedCollection.Add(allocatedItem);
            allocatedItem = new ListItem(
                "Test-2",
                "33");
            allocatedItem.Attributes["Required"] = "false";
            lstAllocatedCollection.Add(allocatedItem);
            lstAllocated.DataSource = lstAllocatedCollection;
            lstAllocated.DataTextField = "Text";
            lstAllocated.DataValueField = "Value";
            lstAllocated.DataBind();
}
 
void AllocatedListDataBound(object sender, Telerik.Web.UI.RadListBoxItemEventArgs e)
        {
            string checkedValue = (string) DataBinder.Eval(e.Item.DataItem, "Attributes['Required']");
            CheckBox checkBox = (CheckBox)e.Item.FindControl("chkRequired");
            checkBox.Checked = Convert.ToBoolean(checkedValue);
        }
 
void lstAvailable_Transferred(object sender, Telerik.Web.UI.RadListBoxTransferredEventArgs e)
{
            foreach(Telerik.Web.UI.RadListBoxItem item in e.Items)
            {
                item.DataBind(); // Pretty much unnecessary because I am not really changing anything here
            }
}

After transferring an empty text is transferred... see attachment. What am I doing wrong?



Nencho
Telerik team
 answered on 01 Nov 2012
9 answers
254 views
I have a problem with Firefox in that my RadMenu appears in the RadPane at the top and there is a RadPane below it (all contained in a RadSplitter).

Works fine on IE but in Firefox the menu (when opened) appears under the below RadPane.

Anyone else had this issue...? Here is a simple code example that shows the problem,

<%@ 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.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" OutputCompression="AutoDetect">  
        </telerik:RadScriptManager> 
        <telerik:RadSplitter ID="RadSplitter1" runat="server" FullScreenMode="True" Orientation="Horizontal">  
            <telerik:RadPane ID="RadPane1" runat="server" Height="60px">  
                <telerik:RadMenu ID="RadMenu1" runat="server">  
                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                    <Items> 
                        <telerik:RadMenuItem runat="server" Text="Click Me">  
                            <Items> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 3">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 4">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 5">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 6">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 7">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 8">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 9">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 10">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 11">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 12">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 13">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 14">  
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 15">  
                                </telerik:RadMenuItem> 
                            </Items> 
                        </telerik:RadMenuItem> 
                    </Items> 
                </telerik:RadMenu> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" />              
            <telerik:RadPane ID="RadPane2" runat="server">  
            </telerik:RadPane>              
        </telerik:RadSplitter> 
    </form> 
</body> 
</html> 
Martin Roussel
Top achievements
Rank 1
 answered on 01 Nov 2012
1 answer
128 views
Hi,

I'm using the RadAsyncUpload with multiple file selection. We need to enforce that only files with a specific naming rule are uploaded.

What I want to do is to check all selected filenames and to remove the files which don't fulfill the naming rule.

But in the OnClientFilesSelected function I have no access to the selected files. Am I right that the only possibility to manipulate the files to be uploaded is to do so in OnClientFilesUploaded?

Thanks!
Atn
Top achievements
Rank 1
 answered on 01 Nov 2012
1 answer
96 views
Hello everyone,

I have a RadGrid with some columns. One of them is a combobox. Everything is working fine, there is just one funcionality I want to achieve and it's not working like I want it.

I want to explain to you what I want to do :
There is this RadGrid with data of the workers in a company. I can choose in the combobox which person it is. 
If I want to edit the existing data of this specified person I need the password of this person.
I am doing a password prompt with RadPrompt. On the buttonclick of the RadPrompt I have to check the password with the one of the person. So I need to know which ID this person has and that's the value of the combobox.

So when I right-click on a row an edit-contextmenu is showing. I want to get the value of the radcombobox from the row I clicked. But not the text, but the value.

Can somebody please help me?
Thanky in advance,
Esmi
esmyy
Top achievements
Rank 1
 answered on 01 Nov 2012
1 answer
64 views
Hi , i am new to Telerik and web development. I have write a page that it contain a button, tabstrip and multipage. When the button click, it will dynamic create a new radtab and radpageview which contain contenturl. However, when i create the second tab and so on, the multipage will only show the radpageview that just created, the rest of the other tab become blank. For example: when i click the button,
test.aspx page show on the radpageview. Then i click the button again,  test2.aspx page show, but test first tab which is test.aspx become blank. 

Is there any way i can create the tab dynamically without losing the previous tab and the pageview content? thanks

and here is my testing Code.

   protected void Button1_Click(object sender, EventArgs e)
        {
            RadTab rootTab = new RadTab();
            TabStrip.Tabs.Add(rootTab);
            rootTab.Text = TabStrip.Tabs.Count.ToString();
            rootTab.PageViewID = "RadPageView" + TabStrip.Tabs.Count.ToString();
            RadPageView newPageview = new RadPageView();
            newPageview.Width = new Unit("100%");
            newPageview.ID = "RadPageView" + TabStrip.Tabs.Count.ToString();
            newPageview.ContentUrl = "test" + TabStrip.Tabs.Count.ToString() + ".aspx";
            RadMultiPage1.PageViews.Add(newPageview);
        }
Nencho
Telerik team
 answered on 01 Nov 2012
8 answers
647 views
I'm trying to have a client-side event that uses the header checkbox in the GridClientSelectColumn to select all of the checkboxes for visible rows. The grids are all expanded by default.

My expected behvior: I check the header checkbox in the mastertable view, it checks every single checkbox that is under it in each gridtableview/detailTable

I feel like that should be a default setting anyway.
I have a RadGrid with a MasterTableView and 2 levels of DetailTables inside of it

MasterTableView
        DetailTables
GridTableView
DetailTables
GridTableView

I've looked around on the Telerik site, but the code snippets don't work or aren't necessarily for my problem. Is there a straight-forward way to do this? I feel maybe there's just a parameter I can set...

Thanks a lot.
Kyle
Top achievements
Rank 1
 answered on 01 Nov 2012
1 answer
78 views
How would I edit the text of the error message for the Copy button in the RadEditor? For example, when a user pushes the copy button without selecting any text in the editor first, the warning message they receive reads  "Please use Ctrl + C to Copy." I would like to change that text. Thank you in advance for your help.
Rumen
Telerik team
 answered on 01 Nov 2012
9 answers
409 views
Hi,

I am using Telerik Radgrid in my page.I am providing freezing
  facility to the columns in the grid. It is working fine in IE and Firefox but in Chrome it is not coming for the first time but when a postback occurs from then it is working.Can you please help me.

  <Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="true" FrozenColumnsCount="1"> </Scrolling>

Thanks in advance.
Maria Ilieva
Telerik team
 answered on 01 Nov 2012
1 answer
57 views
 

I have a radwindow with a button that opens other radwindow. When I click the button to open the second RadWindow, this lost the skin and the information is not show correctly and the border and icons of the radwindow can wrong. This problem is only  IE.

<telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="false"  Skin="Black"  >
<ContentTemplate>
<div>
<h1>TEST</h1>
</div>
</ContentTemplate>
</telerik:RadWindow


function AddNewDocument(sender, args)
{
var RadWindow = $find("<%=RadWindow1.ClientID%>");
RadWindow.set_modal(
true);
RadWindow.show();
}

        How can I force the second radwindow to use the skin="black" as is defined?
Marin Bratanov
Telerik team
 answered on 01 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?