Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
113 views
Hi Team,
I am working with Line chart and I got unexpected output.


Please find the actual output of the chart in the image 
LineChartImage_Actual.jpg. In that, the "Custom" value starts at 5:00 AM and Ends at 6:00 AM.  And "MyFiles" starts at 9:00 AM and ends at 9:30 AM.  Again "Custom" starts at 9:30 AM and Ends at 10:00 AM.

I want to join the point mark of "MyFiles" at 9:30 AM and the point mark of "Custom" at 9:30 AM. And in the same way join the point mark of "Custom" at 10:00 AM and point mark of "Music" at 10:00 AM as these are adjacent point Marks in order to show a series of activities done as shown in the LineChartImage_Expected.jpg.

Please help to achieve my above requirement. Else advise me to use the relevant chart. Thanks in advance.
The code which i used is given below.

Aspx:
<telerik:RadChart ID="radLineChart" runat="server" Width="1200" Height="800px"
                                            Margins-Left="10px" ChartImageFormat="Jpeg" Margins-Right="10px" UseSession="false">
                                            <Appearance BarWidthPercent="50">
                                                <FillStyle MainColor="52, 52, 52">
                                                </FillStyle>
                                            </Appearance>
                                            <ChartTitle Visible="false">
                                                <TextBlock Text="Habit report">
                                                </TextBlock>
                                            </ChartTitle>
                                            <Legend Visible="False"></Legend>
                                            <PlotArea>
                                                <Appearance Dimensions-Margins="20px, 10px, 90px, 150px">
                                                    <FillStyle MainColor="52, 52, 52">
                                                    </FillStyle>
                                                </Appearance>
                                                <XAxis Appearance-LabelAppearance-RotationAngle="45" LayoutMode="Between" AxisLabel-TextBlock-Appearance-Position-AlignedPosition="BottomLeft">
                                                </XAxis>
                                            </PlotArea>
                                        </telerik:RadChart>

Cs :
                        radLineChart.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortTime;
                        //radLineChart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 90;

                        ChartSeries series = new ChartSeries();
                        series.Type = ChartSeriesType.Line;
                        series.DataYColumn = "AppGroupId";
                        series.DataXColumn = "Time";

                        radLineChart.Series.Add(series);

                        radLineChart.PlotArea.XAxis.IsZeroBased = false;
                        radLineChart.PlotArea.XAxis.AutoScale = false;
                        //radLineChart.PlotArea.YAxis.IsZeroBased = false;
                        radLineChart.PlotArea.YAxis.AutoScale = false;

                        const double hourStep = 1 / 24.0;
                        double startTime = timeValue.AddHours(0).ToOADate();
                        double endTime = timeValue.AddHours(23).ToOADate();
                        radLineChart.PlotArea.XAxis.AddRange(startTime, endTime, hourStep);

                        ChartAxisItem cai_0 = new ChartAxisItem();
                        cai_0.TextBlock.Text = "Idle";
                        cai_0.Value = 0;
                        cai_0.TextBlock.Appearance.AutoTextWrap = AutoTextWrap.True;
                        radLineChart.PlotArea.YAxis.Items.Add(cai_0);

                        int i = 0;
                        for (i = 0; i < ds.Tables[1].Rows.Count; i++)
                        {
                            ChartAxisItem cai = new ChartAxisItem();
                            cai.TextBlock.Text = ds.Tables[1].Rows[i]["Name"].ToString();
                            cai.Value = Convert.ToInt32(ds.Tables[1].Rows[i]["AppRowId"]);
                            cai.TextBlock.Appearance.AutoTextWrap = AutoTextWrap.True;
                            radLineChart.PlotArea.YAxis.Items.Add(cai);
                        }

                        radLineChart.Series[0].Appearance.LabelAppearance.Visible = false;
                        //radLineChart.Series[0].Appearance.PointMark.Dimensions.Width = 5;
                        radLineChart.Series[0].Appearance.FillStyle.MainColor = System.Drawing.Color.FromArgb(234, 84, 134);

                        // visually enhance the data points
                        radLineChart.Series[0].Appearance.PointMark.Dimensions.Width = 5;
                        radLineChart.Series[0].Appearance.PointMark.Dimensions.Height = 5;
                        radLineChart.Series[0].Appearance.PointMark.FillStyle.MainColor = System.Drawing.Color.Black;
                        radLineChart.Series[0].Appearance.PointMark.Visible = true;

                        radLineChart.DataSource = FormattedRawData(ds.Tables[0], ds.Tables[1]);//, list);
                        radLineChart.DataBind();

                        radLineChart.Visible = true;
                        lblTitle.Visible = true;
                        lblTitle.Text = _reportTitle + " for " + txtStartDate.SelectedDate.Value.ToString("yyyy-MM-dd");


dhamo
Top achievements
Rank 1
 answered on 04 Nov 2011
1 answer
88 views

Hello I have a rad Grid with Edit template : 



On UpdateButton click , button cause full post back and fires validation on page .. my grid is in Update Panel.

How can I sent to server side only grid when I press Update Button
Jayesh Goyani
Top achievements
Rank 2
 answered on 04 Nov 2011
1 answer
81 views
Hi,

I have read your threads and have followed the direction in regards to getting the Telerik Chart to render in a SharePoint 2010 Web Part.  Quick question, if there is no data in the Chart it should display right?

Here is what I have done so far.

1. Added the chart to a SharePoint visual web part
2. Added the following safe controls to the web.config.
          <SafeControl Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TypeName="*" Safe="True" SafeAgainstScript="False" />
          <SafeControl Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Charting" TypeName="*" Safe="True" SafeAgainstScript="False" />
3. Added the following httphandler to the <system.web><httpHandlers>
          <add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
4. Set the UseSession to false as well as set the TempImagesFolder

        <telerik:RadChart ID="RadChart1" runat="server"

 

 

 

        TempImagesFolder="~/_Layouts/TelericChartsTemp" UseSession="False"

 

 

 

        DataSourceID="XmlDataSource1">

5. Gave write permission to the application pool account to the /_Layouts/TelericChartsTemp folder
6. Deployed the solution but see the web part with a red X
7. I have also validated that the images are being copied to the /_Layouts/TelericChartsTemp folder

I am obviously missing something that is simple.  Please help.

Regards,

Maui

 

 

 

 

Giuseppe
Telerik team
 answered on 04 Nov 2011
4 answers
229 views
Hi,
I have a TabStrinp which have RadTabs. I want to increase the height of Tab head. Actually the problem is that when i increase the height of tab the background image remain small. 
Kate
Telerik team
 answered on 04 Nov 2011
4 answers
505 views
I have a textbox control inside the FilterTemplate as shown below:

<telerik:GridTemplateColumn UniqueName="firstname" > 
    <ItemTemplate> 
        ... 
    </ItemTemplate> 
    <FilterTemplate>                                 
        <asp:textbox runat="server" id="txtBox1" text=""/> 
    </FilterTemplate> 
</telerik:GridTemplateColumn> 

How can I get the textbox control when the RadGrid PreRender event is occurred?

Thanks
Brew
Shinu
Top achievements
Rank 2
 answered on 04 Nov 2011
5 answers
128 views
Hi,

I have implemented a grid using telerik that contains 3 level of details.Now the task is how to implement export to excel function? so that the whole data gets exported to a single excel file instead of either the pasrent or child information
I am trying the same from a long time but could not get a solution.
Please help me.A Demo or link to a video or code snippets will also be helpful.

Thanks in advance,
Tarang
Mira
Telerik team
 answered on 04 Nov 2011
2 answers
89 views
Hi,
how to "configure" RadGrid for having column width always set to max nexessary width for showing a value/text complete? If header text is longer than any value in normal rows than column width should be set to that value and if a value in normal rows is having longest text/value than column width should be set to that rows necessary width for showing that value complete. No unnecessary whitespace is wanted.

Rgds,
Jesper
Jesper
Top achievements
Rank 1
 answered on 04 Nov 2011
1 answer
112 views
Hi,
I have RadGrid with a templatecolumn with RadCheckbox, when I'm going to export the data, my RadGrid catches Exception in own ItemDataBound event, I'm going to check if e.Item.FindControl("mycheckbox") method returns null.
But when I open Excel I don't find the Column with checkbox.

Regards
Shinu
Top achievements
Rank 2
 answered on 04 Nov 2011
4 answers
115 views
I want to log user actions in FileExplorer , for example there when user delete a file, I insert a log record into my database but I can not see any server side event for this. Is there any trick for doing this?


Regards
Mazdak
Dobromir
Telerik team
 answered on 04 Nov 2011
2 answers
100 views
Hi, i have a master page
and in a placeolder an ascx with a grid, when i try to download the file return me an jscript error, how can i disable the ajax when i try to download?

thanks!

post some code:
<telerik:RadGrid runat="server" ID="rgrDocuments" Skin="Office2010Blue" Height="30%"
                    ShowStatusBar="True" AllowFilteringByColumn="True" AutoGenerateColumns="false"
                    CellSpacing="0" GridLines="None" ShowGroupPanel="True"
                oncolumncreated="rgrDocuments_ColumnCreated" 
                onitemcommand="rgrDocuments_ItemCommand">
                                     
                    <GroupingSettings  CaseSensitive="false"/>
                    <ClientSettings AllowDragToGroup="True">
                        <Selecting  AllowRowSelect="true" />
                    </ClientSettings>
 
                    <MasterTableView Width="100%" >
                        <Columns>
                            <telerik:GridTemplateColumn AllowFiltering="false">
                                <ItemTemplate>
                                    <asp:ImageButton runat="server" ID="btnDownload" CommandName="cmdDownload" ImageUrl="~/Images/down.png" Height="24px" Width="24px" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn AllowFiltering="false">
                                <ItemTemplate>
                                    <asp:ImageButton runat="server" ID="btnDelete" CommandName="cmdDelete" ImageUrl="~/Images/elimina.png" Height="24px" Width="24px" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn Visible="false" DataField="N" UniqueName="N°" HeaderText="Anno" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith" ShowFilterIcon="false"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="MES" UniqueName="Tipo" HeaderText="<%$ Resources:Documenti, docu_GriTipo %>" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith" ShowFilterIcon="false"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CIT" UniqueName="Nome" HeaderText="<%$ Resources:Documenti, docu_GriNome %>" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith" ShowFilterIcon="false"></telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
 
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Windows7">
                    </HeaderContextMenu>
</telerik:RadGrid>
protected void rgrDocuments_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "cmdDownload")
            {
                GridDataItem item = e.Item as GridDataItem;
 
                byte[] array = RecuperaBlobDocumento(short.Parse(item["N°"].Text));
                string fileName = RecuperaNomeFile(short.Parse(item["N°"].Text));
 
                Response.Clear();
                Response.ContentType = "application/octet-stream";
                Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName);
                Response.BinaryWrite(array);
                Response.End();
            }
<
telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
               </telerik:RadAjaxManager>
 
               <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Office2010Black"
               </telerik:RadAjaxLoadingPanel>
 
               <telerik:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" runat="server" >
                   <asp:ContentPlaceHolder ID="Body" runat="server"/>
               </telerik:RadAjaxPanel>
Aldo
Top achievements
Rank 2
 answered on 04 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?