Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
137 views
How do you change the text color of a series item label.  I cannot see some of them sometimes because the color is similar tot he bar and the grid sometimes puts them over the bar.  I can see where to change the fill style like the following code but I want to change the text color itself.

        foreach (ChartSeriesItem c in chrtBar.Series[0].Items)
        {
            //I want to change the text color here.
            c.Label.Appearance.FillStyle.MainColor = System.Drawing.Color.Red;

            

        }
Jason Sheats
Top achievements
Rank 1
 answered on 01 Nov 2012
3 answers
88 views
So I have a rad tree list.  In there I am using a user control  that is getting it's data source from code behind.

protected override void OnInit(EventArgs e)
{
    //
    // CODEGEN: This call is required by the ASP.NET Web Form Designer.
    //
    InitializeComponent();
    base.OnInit(e);
    listOfMenuTypes = new SubCategory().SelectAllSubCategoriesBySiteNotDeleted(ThisSiteID).Where(i => i.CategoryID == new Category().SelectCategoryByDescriptionAndSiteIDNotDeleted("Menu Types", ThisSiteID).LookupCategoryID).ToList();
}

and then I set the combobox data source like this

protected void HomeDocumentForm_DataBound(object sender, EventArgs e)
{
    MenuSelectList.DataSource = listOfMenuTypes;
    MenuSelectList.DataTextField = "TypeDescription";
    MenuSelectList.DataValueField = "LookupTypeID";
    MenuSelectList.DataBind();
}

If I remove the ajaxification it works perfectly.  If I leave it the combo box won't drop down.

I could use some help on this.
Kevin
Top achievements
Rank 1
 answered on 01 Nov 2012
2 answers
176 views
Hi All,
             I have the following code:

<telerik:RadListBox runat="server" ID="RadListBox1" AllowReorder="true" Height="350px"
            AllowTransferOnDoubleClick="true" SelectionMode="Multiple" AllowTransfer="true" 
            TransferToID="RadListBox2" Width="300px" EnableDragAndDrop="true" Sort = "Ascending" PersistClientChanges = "true">
        </telerik:RadListBox>
        <telerik:RadListBox runat="server" ID="RadListBox2" Width="300px" Height="350px" AllowTransferOnDoubleClick = "true"
            SelectionMode = "Multiple" EnableDragAndDrop = "true" Sort = "Ascending" PersistClientChanges = "true">
        </telerik:RadListBox>

And in the code behind i have :

For i As Integer = 0 To RadListBox2.Items.Count - 1
-----------------
Next

But the problem is after the postback, the items of radlistbox2 is same as before. All the changes(adding/removing items) are lost. Please help me. Thanks.
Nencho
Telerik team
 answered on 01 Nov 2012
1 answer
320 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
63 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
290 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
155 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
117 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
77 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
697 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
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?