Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
900 views
I've been trying all day without asking, but i give up.  If anybody can help me with this I would appreciate it.

Here is how much chart looks.

My chart

There are the issues I need help with.

    The labels on the left I have figured how to format, however, they are being cut off.  How do I shift the everything right so the labels are there?
    The next issue is how do I actually format the data as currency itself? (300119,302519 I would like to be $300,119,$302,519)
    How do I actually format the date as a real date on the graph?  For example 5082012 should be 5/08/2012.
    Is there a way to hide the series labels? for example the $$$ and Date?



Here is the code i'm using.  I might be weird but I prefer to do everything in behind code, so if there is a solution that way I would love it!  Hopefully this is easy!

private void BindChart2()
    {
        string[] ParamArgs = { "DealershipIdParam|DemoDealership" };
        DataTable ChartTable2 = MySQLProcessing.MySQLProcessor.StoreProcedureDTTable("CarLot_Dealership_Total_Listing_Value", ParamArgs, "CarLot_Dealership_Total_Listing_Value");
        DataTable MinTable = MySQLProcessing.MySQLProcessor.StoreProcedureDTTable("CarLot_Dealership_Min_Listing_Value", ParamArgs, "CarLot_Dealership_Min_Listing_Value");
        DataTable MaxTable = MySQLProcessing.MySQLProcessor.StoreProcedureDTTable("CarLot_Dealership_Max_Listing_Value", ParamArgs, "CarLot_Dealership_Max_Listing_Value");


        RadChart2.DataSource = ChartTable2;
        RadChart2.PlotArea.XAxis.AxisLabel.Visible = true;
        RadChart2.PlotArea.YAxis.AxisLabel.Visible = true;
        RadChart2.PlotArea.XAxis.DataLabelsColumn = "Date";
        RadChart2.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = -45;
        string[] min = MinTable.Rows[0].ItemArray[0].ToString().Split('.');
        string[] max = MaxTable.Rows[0].ItemArray[0].ToString().Split('.');
        RadChart2.PlotArea.YAxis.MinValue = Convert.ToInt32(min[0]);
        RadChart2.PlotArea.YAxis.MaxValue = Convert.ToInt32(max[0]);
        RadChart2.PlotArea.YAxis.Step = 1000;
        RadChart2.PlotArea.YAxis.AutoScale = false;
        RadChart2.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Verdana", 6, System.Drawing.FontStyle.Bold);
        RadChart2.PlotArea.YAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.Currency;
        //RadChart2.PlotArea.Appearance.Dimensions.Margins.Right = Telerik.Charting.Styles.Unit.Pixel(-400);
        //RadChart2.PlotArea.YAxis.AutoScale = true;
        //RadChart2.AutoLayout = true;
        RadChart2.DataBind();




<telerik:RadChart ID="RadChart2" runat="server" ChartImageFormat="Jpeg"
                  Skin="Metal" DefaultType="Line" Width="600px">
                  <Appearance Corners="Round, Round, Round, Round, 10">
                      <FillStyle FillType="Image">
                          <FillSettings BackgroundImage="{chart}" ImageDrawMode="Flip">
                          </FillSettings>
                      </FillStyle>
                      <Border Color="111, 111, 111" />
                  </Appearance>
                  <Legend Visible="False">
                      <Appearance Dimensions-Margins="16%, 3%, 1px, 1px"
                          Position-AlignedPosition="TopRight" Visible="False">
                          <ItemTextAppearance TextProperties-Color="Black">
                          </ItemTextAppearance>
                          <FillStyle MainColor="Transparent">
                          </FillStyle>
                          <Border Color="Transparent" />
                      </Appearance>
                  </Legend>
                  <PlotArea>
                      <DataTable Visible="True">
                      </DataTable>
                      <EmptySeriesMessage Visible="True">
                          <Appearance Visible="True">
                          </Appearance>
                      </EmptySeriesMessage>
                      <XAxis>
                          <Appearance Color="Transparent" MajorTick-Color="174, 174, 174">
                              <MajorGridLines Color="40, 255, 255, 255" PenStyle="Solid" />
                              <TextAppearance TextProperties-Color="51, 51, 51">
                              </TextAppearance>
                          </Appearance>
                          <AxisLabel>
                              <TextBlock Text="Date">
                                  <Appearance TextProperties-Color="51, 51, 51">
                                  </Appearance>
                              </TextBlock>
                          </AxisLabel>
                      </XAxis>
                      <YAxis AutoScale="False" MaxValue="100" MinValue="0" Step="10">
                          <Appearance Color="Transparent" MajorTick-Color="174, 174, 174"
                              MinorTick-Color="174, 174, 174">
                              <MajorGridLines Color="40, 255, 255, 255" />
                              <MinorGridLines Color="40, 255, 255, 255" />
                              <TextAppearance TextProperties-Color="51, 51, 51">
                              </TextAppearance>
                          </Appearance>
                          <AxisLabel>
                              <TextBlock Text="$$$">
                                  <Appearance TextProperties-Color="51, 51, 51">
                                  </Appearance>
                              </TextBlock>
                          </AxisLabel>
                      </YAxis>
                      <Appearance Corners="Round, Round, Round, Round, 4">
                          <FillStyle FillType="Image">
                              <FillSettings BackgroundImage="{plotarea}" ImageAlign="Top"
                                  ImageDrawMode="Flip" ImageFlip="FlipY">
                              </FillSettings>
                          </FillStyle>
                          <Border Color="174, 174, 174" Width="4" />
                      </Appearance>
                  </PlotArea>
                  <ChartTitle>
                      <Appearance Position-AlignedPosition="Top">
                          <FillStyle MainColor="Transparent">
                          </FillStyle>
                      </Appearance>
                      <TextBlock Text="Total Listing Monetary Value">
                          <Appearance TextProperties-Font="Arial, 16pt">
                          </Appearance>
                      </TextBlock>
                  </ChartTitle>
              </telerik:RadChart>

mysql produces

$$$    Date
300119    05082012
302519    05092012
302819    05102012
305219    05112012

i would prefer it to produce
$$$    Date
300119    05/08/2012
302519    05/09/2012
302819    05/10/2012
305219    05/11/2012


Thanks!!!
Evgenia
Telerik team
 answered on 16 May 2012
2 answers
454 views
Hello, please I need help. I need to change a diferent color for each item that I already databinded in a radlistbox. It doesnt matter if it's from the server or the client side. In addition Can I make separations like a radgrid in a Radlistbox?Thank You
Victor
Top achievements
Rank 1
 answered on 16 May 2012
2 answers
157 views
Hello, i have a radTabStrip with a radmultipage (and radpageview) inside. I put the radajaxmanager for show the loadingpanel when the page inside of the multipage loading but, the loading panel only appear a few second and hide when the page still does not load completely.


Here's my code...

TTabStrip.ascx 

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TTabStrip.ascx.cs" Inherits="OmegaWeb.WebControls.Seguridad.TTabStrip" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" Height="75px" Width="75px">
</telerik:RadAjaxLoadingPanel>
<telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0"
    CssClass="tabStrip" runat="server" MultiPageID="RadMultiPage1" Skin="Default"
    AutoPostBack="true" ShowBaseLine="True"
    ClickSelectedTab="True" ontabclick="RadTabStrip1_TabClick" >
</telerik:RadTabStrip>
<telerik:RadAjaxManager runat="server" ID="RadAjaxManagerProxy1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" EnableEmbeddedScripts="true">
    <telerik:RadPageView ID="RadPageView1" runat="server">
    </telerik:RadPageView>
</telerik:RadMultiPage>

CODE BEHIND
public partial class TTabStrip : System.Web.UI.UserControl
   {
       protected void Page_Load(object sender, System.EventArgs e)
       {
           if (!Page.IsPostBack)
           {
               DrillDownModel drillDown = GenericController<DrillDownModel>.Current;
               List<TabStripModel> tabs = SecurityInfo.GetTabStripsUsuario(drillDown);
 
               if (!SecurityInfo.HasAccessToDrillDown(drillDown))
               {
                   NotifyNoAccess(drillDown);
                   Server.Transfer("/NoAccessPage.aspx", false);
                   return;
               }
 
               tabs.ForEach(tab => AddTab(tab.Texto, tab.TargetDrillDownId == 0 ? tab.URL :
                   string.Format("/WebForms/DrillDown/DrillDownRedirect.aspx?TS={0}", tab.Id)));
               setPersistTab();
               
           }
 
       }
 
       private void setPersistTab()
       {
           string sessionTabId = string.Format("DrillDown_{0}", GenericController<DrillDownModel>.CurrentId);
           string tabName;
           if (HttpContext.Current.Session[sessionTabId] != null)
           {
               tabName = HttpContext.Current.Session[sessionTabId].ToString();
               RadTab tab = RadTabStrip1.FindTabByText(tabName);
               if (tab != null)
               {
                   tab.Selected = true;
                   RadPageView1.ContentUrl = tab.Value;
               }
           }
           else
           {
               RadTab tab = RadTabStrip1.Tabs.FirstOrDefault();
               if (tab != null)
               {
                   tab.Selected = true;
                   RadPageView1.ContentUrl = tab.Value;
               }
           }
 
       }
 
       private void AddTab(string tabName, string tabValue)
       {
           RadTab tab = new RadTab(tabName, tabValue);
           RadTabStrip1.Tabs.Add(tab);
       }
 
       private void NotifyNoAccess(DrillDownModel drilldown)
       {
           MailMessage mail = new MailMessage();
           mail.From = new MailAddress("Omega@uai.cl");
           mail.To.Add(ConfigurationManager.AppSettings["Omega Team"]);
           mail.Subject = "Acceso DrillDown - Omega";
           mail.IsBodyHtml = false;
           StringBuilder body = new StringBuilder();
           body.AppendLine(string.Format("DrillDownId:{0}", drilldown.Id));
           body.AppendLine(string.Format("Nombre DrillDown:{0}", drilldown.Titulo));
           body.AppendLine(string.Format("UsuarioId: {0}", SecurityInfo.LoginUser.Id));
           body.AppendLine(string.Format("Usuario: {0}", SecurityInfo.LoginUser.GetPersonaRef()._ApellidosNombre));
           body.AppendLine(string.Format("AUTH_USER: {0}", Request.ServerVariables["AUTH_USER"]));
           body.AppendLine(string.Format("LOGON_USER: {0}", Request.ServerVariables["LOGON_USER"]));
           body.AppendLine(string.Format("REMOTE_USER: {0}", Request.ServerVariables["REMOTE_USER"]));
           body.AppendLine(string.Format("REMOTE_ADDR: {0}", Request.ServerVariables["REMOTE_ADDR"]));
           body.AppendLine(string.Format("REMOTE_HOST: {0}", Request.ServerVariables["REMOTE_HOST"]));
           body.AppendLine(string.Format("SERVER_NAME: {0}", Request.ServerVariables["SERVER_NAME"]));
 
           mail.Body = body.ToString();
 
           SmtpClient smtp = new SmtpClient(ConfigurationManager.AppSettings["SMTPServer"]);
           smtp.Send(mail);
       }
 
       protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)
       {
 
           string sessionTabId = string.Format("DrillDown_{0}", GenericController<DrillDownModel>.CurrentId);
           HttpContext.Current.Session[sessionTabId] = e.Tab.Text;
 
           RadPageView1.ContentUrl = e.Tab.Value;
           RadPageView1.ResolveUrl(e.Tab.Value);
       }
 
 
   }


Orlando.
Orlando
Top achievements
Rank 1
 answered on 16 May 2012
4 answers
199 views
Hi,

I'm new to the Telerik controls and I'm using Entity Framework. I'm wondering how I can use my insert stored procedure for the insert command of my rad grid? I've seen documentation on how to do manual CRUD via SQLDataSource, but I'm looking for a way to avoid that and use my EF procedure instead.

Fairly new to EF, too, so if anyone has experience implementing this successfully I'd appreciate the help.

Thanks,
Nick 
Andrey
Telerik team
 answered on 16 May 2012
1 answer
197 views
I started playing with the Kendo DataViz for a mobile "Andon" display on a variety of devices (Android Tablet, Black Berry, IPhone, Windows).

I was really impressed with how quick I could get a chart to appear on all devices (I spent about an hour, and most of that was reading documentation).  So now, I am looking at my next steps in terms of a general solution, and that is where my questions come in.

1. What is the time frame for seeing the .Net class wrappers for Kendo so that we can control the Kendo UI/Data Viz elements at the server HTTP GET time?  E.g. if certain conditions occur, can I control the chart being rendered to the client?

2. Is there a way to aggregate data from a dataSource of type transport?  E.g. Suppose I have a list of orders with customer information and item quantities and prices, could I specify an aggregate by order and customer for total price?  Or, supoose I have a number of workflow task data with start and finish, could I average the expected time to finish?

(ok, I admit that could write a JSON service to do this for me, but I would rather have the aggregate in the client side processing, so that I don't need to modify my data access layers)

3. Will Kendo Dataviz support the WebSockets API to get data change events?  If so, how with the API work?

3. A. What is the best practice for telling a DataViz chart that it should go refresh its data?  E.g. Your data is now 5 minutes old, go get a new data.  I would prefer to do this without requiring the page to make a full round-trip to the web server.

3. B. Does DataViz support a straight XML stream (Mime: text/xml) to render a chart?  If so, where can I find examples?

4.  I am given to understand that the Kendo DataViz will only be available in the Ultimate Collection.  For those of us who received the launch-promo license to DataViz and we have Premium Collections, will our licenses and support for Kendo carry over with our subscription renewals?

Thanks in advance for any insights!
j.
Alexander Valchev
Telerik team
 answered on 16 May 2012
3 answers
122 views
I have a paragraph in the editor lie this (looking at html view):

    <p class="some-class">some text</p>

When the user presses 'Enter' to create a new line, the class is repeated:

    <p class="some-class">&nbsp;</p>

I would prefer that a new line create a <p> without the class - how can I make this happen?
Rumen
Telerik team
 answered on 16 May 2012
1 answer
434 views
Hi ,
I have a radgrid with 4 columns, where i have to edit 2nd column highlighted below. What are things i have to achieve this ?
With below code last row 2nd column of grid is in editable mode and entire row is getting highlighted..  what are things i have to do for editing all rows and only 2 column.

Please Suggest   .

   <telerik:RadGrid ID="rdGrdMenu" runat="server" AutoGenerateColumns="false" AllowFilteringByColumn="true"
                Skin="Office2007" GridLines="Both" OnItemDataBound="rdGrdMenu_ItemDataBound" >
                <MasterTableView EditMode="InPlace">
                    <Columns>
                        <telerik:GridBoundColumn HeaderText="Group Level" UniqueName="prdlvl" DataField="prdlvl"
                            Visible="true" ReadOnly="true">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderText="Description" UniqueName="prdlvldsc" DataField="prdlvldsc"
                            Visible="true" >
                        </telerik:GridBoundColumn>

                        <telerik:GridTemplateColumn HeaderText="Budget" UniqueName="budflg" DataField="budflg">
                            <ItemTemplate>
                                <cc1:AFSAt_CodeDropDown ID="drpDownBdgt" runat="server" AtCodeType="000006" Width="100%">
                                </cc1:AFSAt_CodeDropDown>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="Status" UniqueName="Status" DataField="codsts">
                            <ItemTemplate>
                                <cc1:AFSAt_CodeDropDown ID="drpDownStatus" runat="server" AtCodeType="000001" Width="100%">
                                </cc1:AFSAt_CodeDropDown>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

Codebehind :
     protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
        //to set the Grid always in edit mode
        foreach (GridDataItem item in rdGrdMenu.MasterTableView.Items)
        {
            item.Edit = true;
        }
        rdGrdMenu.Rebind();
    }

   Regards,
Akki      
Andrey
Telerik team
 answered on 16 May 2012
11 answers
409 views
Hi All,

I am using radscheduler in my application. i want to select more than one appointment set cancel the appointments at a time. please let me know how to get more than one appointment in appointment context menu and update the all selected appointment.

Thanks in advance,
Dhamu.
Plamen
Telerik team
 answered on 16 May 2012
1 answer
122 views

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebFormEditorDock.aspx.cs" Inherits="X.Model.GOV.Public.WebFormEditorDock" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
<title>RadEditor RibbonBar outerdiv Test</title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
</Scripts>
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<table width="640px" border="1" style="border-collapse:collapse;">
<tr><td><div id="outerdiv"></div></td></tr>
<tr><td><input type="text" runat="server" value="Please Input Title Here ..." style="width:99%;" /></td></tr>
<tr>
<td>
<telerik:RadEditor ID="RadEditor1" runat="server" ToolbarMode="Default" ToolsFile="~/xml/EditorRibbonBarDock.xml" Width="100%">
<Content>Please Input Text Here ...</Content>
</telerik:RadEditor>
</td>
</tr>
</table>
</form>
</body>
</html>

when i change ToolbarMode="Default" as ToolbarMode="RibbonBar", it work wrong.

EditorRibbonBarDock.xml

<?xml version="1.0" encoding="utf-8" ?>
<root>
<tools name="Base" tab="Base" Enabled="true" DockingZone="outerdiv">
<tool name="PasteStrip" size="large" />
<tool name="Cut" size="medium" />
<tool name="Copy" size="medium" shortcut="CTRL+C" />
<tool name="Print" size="medium" shortcut="CTRL+P" />
</tools>
</root>


Rumen
Telerik team
 answered on 16 May 2012
0 answers
96 views

David
Top achievements
Rank 1
 asked on 16 May 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?