Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
314 views
Hello everybody,

I can't figure out how to remove gradient fill from code-behind generated charts. Here is my current code:

//set default properties
RadChart radChart = new RadChart();
radChart.Appearance.TextQuality = Telerik.Charting.Styles.TextQuality.ClearTypeGridFit;
radChart.ChartTitle.TextBlock.Text = "Test Chart";
radChart.ChartTitle.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Tahoma", 13, System.Drawing.FontStyle.Bold);
radChart.ChartTitle.TextBlock.Appearance.TextProperties.Color = System.Drawing.ColorTranslator.FromHtml("#252525");
radChart.Skin = "Office2007";
radChart.Appearance.Border.Color = System.Drawing.ColorTranslator.FromHtml("#7f7f7f");
 
//create chart series
ChartSeries chartSeries = new ChartSeries();
chartSeries.Name = "Sales";
chartSeries.Type = ChartSeriesType.Pie;
chartSeries.Appearance.FillStyle.FillType = FillType.Solid;
 
//add data
chartSeries.AddItem(120, "Internet");
chartSeries.AddItem(140, "Retail");
chartSeries.AddItem(35, "Wholesale");
radChart.AddChartSeries(chartSeries);

The instruction
chartSeries.Appearance.FillStyle.FillType = FillType.Solid;
doesn't seem to produce effect.

Thanks!


A2H
Top achievements
Rank 1
 answered on 23 Jul 2013
1 answer
296 views
This is the complete code that i am testing and as mentioned in the subject line it does not work as expected

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TestPage.aspx.vb" Inherits="TestDotNet45Site.TestPage" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
 
<head runat="server">
    <title>Contact Us</title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <div class="ContactPage">
        <h1>Contact Us (Please Fill Out The Contact Form Below)</h1>
        <h2><b>Important note:</b> Yahoo, Microsoft and other free email providers often class our emails as spam/junk, so please check your spam/junk folder if you do not hear from us in a timely manner.</h2>
        <p>
            <telerik:RadTextBox ID="FullNameText" runat="server" EmptyMessage="Your Name" Resize="None" Width="400px" Skin="MetroTouch" />
        </p>
 
        <p>
            <telerik:RadTextBox ID="EmailText" runat="server" EmptyMessage="Your E-mail" Resize="None" Width="400px" Skin="MetroTouch" />
        </p>
 
        <p>
            <telerik:RadTextBox ID="SubjectText" runat="server" EmptyMessage="Subject" Resize="None" Width="400px" Skin="MetroTouch" />
        </p>
 
        <p>
            <telerik:RadTextBox ID="MessageText" runat="server" EmptyMessage="Your Message" Resize="None" Width="500px" Skin="MetroTouch" TextMode="MultiLine" Height="120px" />
        </p>
 
        <p>
            <telerik:RadButton ID="SendMessageButton" runat="server" Text="Send" Skin="MetroTouch" Width="110px" CausesValidation="true" ValidationGroup="MyInquiryForm"></telerik:RadButton>
        </p>
         
        <p><b>All fields are mandatory!</b> <asp:Label ID="TestLabel" runat="server" /> </p>
         
        <div>
            <asp:RequiredFieldValidator ID="RequiredFullNameText" runat="server" ErrorMessage="Full Name is mandatory!" ControlToValidate="FullNameText" Display="None" ValidationGroup="MyInquiryForm">*</asp:RequiredFieldValidator>
            <asp:RequiredFieldValidator ID="RequiredEmailText" runat="server" ErrorMessage="E-Mail is mandatory!" ControlToValidate="EmailText" Display="None" ValidationGroup="MyInquiryForm">*</asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularEmailText" runat="server" ErrorMessage="Please enter a valid e-mail address!" ControlToValidate="EmailText" Display="None" ValidationGroup="MyInquiryForm" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="RequiredSubjectText" runat="server" ErrorMessage="Subject is mandatory!" ControlToValidate="SubjectText" Display="None" ValidationGroup="MyInquiryForm">*</asp:RequiredFieldValidator>
            <asp:RequiredFieldValidator ID="RequiredMessageText" runat="server" ErrorMessage="Message is mandatory!" ControlToValidate="MessageText" Display="None" ValidationGroup="MyInquiryForm">*</asp:RequiredFieldValidator>
            <asp:ValidationSummary ID="ContactValidationSummary" runat="server" ShowSummary="false" ShowMessageBox="true" HeaderText="Please notice that:" ValidationGroup="MyInquiryForm" DisplayMode="BulletList" />
        </div>
    </div>
    </form>
</body>
</html>

I just tested the VERY SAME code in an older project which is not a "Web Aplication" like this one.
Rather it's a website project and the code from above worked like a charm showing the messagebox. Not sure if it's your libraries or i miss something on my end?
Thank you

P.S. the problem is that when i click the Send button with all fields empty it cause postback instead to show the msgbox on client-side :(
Jugoslav
Top achievements
Rank 1
 answered on 23 Jul 2013
16 answers
594 views
Hello there,

I am new to RadControls and RadChart - however I have a problem with the RadChart control - whenever I view my page with the chart on it via VWD 2008 web server, it appears fine. However when I then view the web page with an internet browser (outside of VWD, via the PCs IP Address), I get a red 'X' where the graph should be!

If I disable UseSession, the charts are generated and stored in ~/Temp (as configured), however I still get a Red 'X' if I try to view the chart on the webpage?

Can anyone help?
Waseem
Top achievements
Rank 1
 answered on 23 Jul 2013
2 answers
80 views
Hello there,

I am binding the detail table to a dynamic object so I don't have any sense of what columns are going to appear so I have implemented this through dynamic columns on the grid's DetailTableDataBind method before I bind it to the datasource. This worked fine and all the columns are created accordingly but when I select/expand another row, all my dynamic columns (on the previously selected row) disappears. I have tried creating the columns on the ItemDataBound method as well but to no avail. Any thoughts?

Thanks,
DJ 
DJ
Top achievements
Rank 1
 answered on 23 Jul 2013
4 answers
96 views
I know I'm sort of "taking over" the Grid forum :) But first I do every search possible in old forum posts, in the demos, in the code base and in the on-line docs.
I just hope many of those issues when solved will be helpful to other users as well or maybe (who knows) give suggestions for bugfixes or new features.

Anyway... as stated in the topic it seems that when you have a ToolTipManager on the page with AutoTooltipify="true", filter columns textboxes all show empty Tooltips. I don't want to add "meaningful" tooltips such as "Write your filter here" since I think cluttering the page with tooltips is counter-productive.
Setting the tooltip text to ""  in aspx column declaration doesn't solve the problem
Any solution?
Also I inspected the input element and it seems it has no tooltip, no title and no alt attribute so why this empty tooltip shows up?

Also I couldn't seem to find a way to localize the "open calendar popup" picker tooltip (and his little brother time picker) 

Thanks in advance
Massimiliano
Top achievements
Rank 1
 answered on 23 Jul 2013
1 answer
176 views
I've spent half the day searching for a solution to this but I just can't get it.

I have a TabStrip which is loaded on demand (each tab has its own user control).  On this particular one, I am loading a form view.  The Edit and Insert templates on the formview are identical (except for the command buttons).  Here is the EditItemTemplate.

<EditItemTemplate>
    <div class="formLine">
        <div class="formField66">
            Name of Employer:
            <telerik:RadTextBox ID="txtEmployerName" runat="server" MaxLength="50" Width="400" Text='<%# Bind("Name") %>'></telerik:RadTextBox>
        </div>
    </div>
    <div class="formLine">
        <div class="formField66">
            Employment Address:
            <telerik:RadTextBox ID="txtEmployerAddress" runat="server" MaxLength="50" Width="400" Text='<%# Bind("Address") %>'></telerik:RadTextBox>
        </div>
    </div>
    <div class="formLine">
        <div class="formField33">
            City, State:
            <asp:LinkButton ID="lnkAddEmploymentCity" runat="server" OnClick="lnkAddEmploymentCity_Click">ADD CITY</asp:LinkButton>
            <br />
            <telerik:RadComboBox ID="cboEmploymentCity" runat="server" EmptyMessage="Type city ..." DataSourceID="dsCities" DataValueField="IDNumber" DataTextField="CITY"
                MarkFirstMatch="true" DropDownAutoWidth="Enabled">
                <ItemTemplate>
                    <%# Eval("CITY") %>, <%# Eval("State") %>, <%# Eval("ZIPCODE1") %>  <%# Eval("COUNTY") %>
                </ItemTemplate>
            </telerik:RadComboBox>
            ,
            <telerik:RadTextBox ID="txtEmploymentState" runat="server" MaxLength="2" Width="45px" Enabled="false" Text='<%# Bind("State") %>'></telerik:RadTextBox>
        </div>
        <div class="formField33">
            County:<br />
            <telerik:RadTextBox ID="txtEmploymentCounty" runat="server" MaxLength="50" Enabled="false" Text='<%# Bind("County") %>'></telerik:RadTextBox>
        </div>
        <div class="formField33">
            Zip:<br />
            <telerik:RadMaskedTextBox ID="txtEmploymentZip" runat="server" Mask="#####" Enabled="false" Text='<%# Bind("ZipCode") %>'></telerik:RadMaskedTextBox>
        </div>
    </div>
    <div class="formLine">
        <div class="formField33">
            Phone Number:<br />
            <telerik:RadMaskedTextBox ID="txtEmploymentPhoneNumber" runat="server" Mask="(###) ###-####" Columns="15" Text='<%# Bind("Phone") %>'></telerik:RadMaskedTextBox>
        </div>
        <div class="formField66">
            Employment Begin Date:
            <telerik:RadDatePicker ID="txtEmploymentStartDate" runat="server" MinDate="1/1/1900" SelectedDate='<%# Bind("BeginDate") %>'></telerik:RadDatePicker>
        </div>
    </div>
    <div class="formLine">
        <div class="formField66">
            Occupation:
            <telerik:RadTextBox ID="txtEmploymentOccupation" runat="server" MaxLength="255" Width="400" Text='<%# Bind("Occupation") %>'></telerik:RadTextBox>
        </div>
    </div>
    <asp:Button runat="server" Text="Update this Record" CommandName="Update" ID="UpdateButton" CausesValidation="True" />
    <asp:Button runat="server" Text="Cancel Edit" CommandName="Cancel" ID="UpdateCancelButton" CausesValidation="False" />
</EditItemTemplate>

In the FormView's ItemCreated event I set the RadCombo box to AutoPostback and also attach the SelectedIndexChanged event handler:
protected void frmEmployment_ItemCreated(object sender, EventArgs e)
{
    RadComboBox cbo = (RadComboBox)frmEmployment.FindControl("cboEmploymentCity");
    if (cbo != null)
    {
        cbo.AutoPostBack = true;
        cbo.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(cboEmploymentCity_SelectedIndexChanged);
    }
}
 
protected void cboEmploymentCity_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    RadTextBox txtEmploymentCounty = frmEmployment.FindControl("txtEmploymentCounty") as RadTextBox;
    RadTextBox txtEmploymentState = frmEmployment.FindControl("txtEmploymentState") as RadTextBox;
    RadMaskedTextBox txtEmploymentZip = frmEmployment.FindControl("txtEmploymentZip") as RadMaskedTextBox;
    int addressId = 0;
    if (Int32.TryParse(e.Value, out addressId))
    {
        var addressInfo =
            (from z in db.ZipCodes where z.IDNumber == addressId select z).SingleOrDefault();
        txtEmploymentCounty.Text = addressInfo.COUNTY;
        txtEmploymentState.Text = addressInfo.State;
        txtEmploymentZip.Text = addressInfo.ZIPCODE1;
    }
    else
    {
        txtEmploymentCounty.Text = string.Empty;
        txtEmploymentState.Text = string.Empty;
        txtEmploymentZip.Text = string.Empty;
    }
}

The idea: the user selects a city from the RadComboBox, and in turn the State, Zip, and County RadTextBoxes are updated with data from the database.

The major frustration here is that it works fine when I dealing with a new record.  When I enter Edit mode on the FormView, and change the index of the RadComboBox, the whole FormView disappears from view, but seems to be stuck in Edit mode.

I've pulled the Ajax from the user control.  There is, however, a RadAjaxManager on the parent page which I use to allow the tab strip and the page views to update each other.

Any help is greatly appreciated!

Kevin F
Top achievements
Rank 1
 answered on 23 Jul 2013
2 answers
129 views
I have a hierarchal radgrid control that consists of a master table and 2 detail tables which sit on a web form.  The web form also has a text box on it that's used for querying the info you want shown in the grid.  Initially the radgrid is not visible, so all the user sees is the text box when the app is launched.  Upon data entry (same page is launched again through a response.redirect "Page name" in a button click event), the grid becomes visible and the data is loaded and bound to the grid through the NeedDataSource method. However when the page returns, the master table data is being shown correctly in the grid, but the row expander to get to the detail tables is not enabled which prevents the user from drilling down any further.  I've got events to assign the detail datasource when the row is expanded, so I know it works.  I've done test on the grid where I load the grid on the initial load based on some hard coded criteria and I'm able to drill down without having to set any other properties.  Why is it that I can't do this based on user submitted data in a click event?
Larry
Top achievements
Rank 1
 answered on 23 Jul 2013
7 answers
127 views
This is probably fairly simple, but I have a chart, attached, where the data fed into the chart for the number of feet (along the left) are not what's showing up on the chart itself.  In the case shown, number of feet are actually (4,8,12,16,20,24,28,32,35), but they show up as (4,7,10,13,16,19,22,25,28,31,34) in the bar chart.  Does anyone have any idea what might be happening here?  

Laurie
Top achievements
Rank 2
 answered on 23 Jul 2013
1 answer
57 views
Hi, what is the best scenario for achieving this sample from ext.net  in telerik framework:

For each sample, this package creates a new tab window:

Ext.net Examples tab windowed

This is the closest sample in Telerik:
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/application-scenarios/add-remove-tabs/defaultcs.aspx

Does it exist some similar control or a closer aproach to it?


Thanks in advance.
Vessy
Telerik team
 answered on 23 Jul 2013
5 answers
419 views
Hello,

I am using the server-side method for using a Filter Template with a RadComboBox on a RadGrid.  I have it working using this method but how do I set the SelectedValue of the RadComboBox using this method?  The client-side method has some Eval code in the control on the page but that doesn't work for the server-side method.  I assumed I would set the SelectedValue property of the RadComboBox in the codebehind during the RadComboBox_SelectedIndexChanged method but I can't seem to make it work.  Maybe because I don't know how to access the RadComboBox control properly?

thanks,

Steve
Naga
Top achievements
Rank 1
 answered on 23 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?