Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
123 views
Is there a way to control height between nodes in a TreeList?
Issac
Top achievements
Rank 1
Iron
 answered on 17 Apr 2012
2 answers
154 views

Not able to pull the –ve values on to X-Axis: MY RESULTS ARE LIKE AS in image Not able to pull the –ve values on to X-Axis. PLEASE OBSERVE CAPACITY DELAY RESULTS HAS –VE VALUES ALSO, WHICH ARE GOING TO X-AXIS.

WHEN AM TRYING TO DISPLAY THEM BY USING THE BELOW CODE,

radchartcontrole.Series.Clear()

radchartcontrole.DataSource = ds.Tables.Item(charttableValue)

radchartcontrole.DataBind()

radchartcontrole.Series(0).DataXColumn = “CapacityDelay

radchartcontrole.Series(0).DataYColumn = “Count_InvestigationId

 

Result is as in image Not able to pull the –ve values on to X-Axis1

 

After zoom in, the results in Image  Not able to pull the –ve values on to X-Axis2

 

PLEASE FIND THE BELOW CODE BEHIND METHOD, WHICH IS PLAYING MAIN ROLE FOR THIS DEVELOPMENT

Private Sub ChartLoad(ByRef radchartcontrole As RadChart, ByRef monthlyradchartcontrole As RadChart, ByRef dataXColumnName As String, ByRef dataYColumnName As String, ByRef xaxislableName As String, ByRef yaxislableName As String, ByRef monthlyXaxislableName As String, ByRef monthlyYaxislableName As String, ByRef monthlyYaxisDataColumn As String, ByRef monthlyXaxisDataColumn As String, ByRef avgDataColumn As String, ByRef charttableValue As Int32, ByRef monthlytableValue As Int32, ByRef avgTableValue As Int32, ByRef chartTitle As String, ByRef updatePaneltoHide As UpdatePanel, ByRef timeLinesAvgLabel As String)

 

Dim strErrorMessage As String = String.Empty

Dim ds As New DataSet

ds = CType(ViewState("ChartsDataset"), DataSet)

 

'Checking if there is no data in dataset then dispalying the message as not data found otherwise loading the chart with data set results.

        If ds Is Nothing Then

            updatePaneltoHide.Visible = False

            lblAvgDisplay.Text = "No Data Found for the " + chartTitle

            lblAvgDisplay.ForeColor = System.Drawing.Color.Red

            lblAvgDisplay.Font.Bold = True

            lblAvgDisplay.Width = 300

 

        Else

 

           

            'Binding the Metrics delay chart data for the selected metrics

            radchartcontrole.Series.Clear()

            radchartcontrole.DataSource = ds.Tables.Item(charttableValue)

            radchartcontrole.DataBind()

            radchartcontrole.Series(0).DataXColumn = dataXColumnName

            radchartcontrole.Series(0).DataYColumn = dataYColumnName

 

            radchartcontrole.Series(0).Appearance.BarWidthPercent = CType("10", Decimal)

            'radchartcontrole.Series(0).Name = "Capacity Delay"

 

 

            'By default, If there any additional serieses adding to the chart, we are removing them

            If radchartcontrole.Series.Count > 0 Then

                For i = 1 To radchartcontrole.Series.Count - 1

                    radchartcontrole.RemoveSeriesAt(i)

                Next

            End If

 

            radchartcontrole.PlotArea.XAxis.AutoScale = True

            radchartcontrole.PlotArea.XAxis.AutoShrink = True

 

            radchartcontrole.PlotArea.XAxis.AxisLabel.TextBlock.Text = xaxislableName

            radchartcontrole.PlotArea.XAxis.AxisLabel.Visible = True

            radchartcontrole.PlotArea.XAxis.AxisLabel.Appearance.Position.Auto = True

            radchartcontrole.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Red

radchartcontrole.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.Position.Auto = True

            'radchartcontrole.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = CType("45", Single)

 

radchartcontrole.PlotArea.YAxis.AxisLabel.TextBlock.Text = yaxislableName

radchartcontrole.PlotArea.YAxis.AxisLabel.Visible = True

            radchartcontrole.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Red

radchartcontrole.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.Position.Auto = True

 

Dim metricsAvg As String

metricsAvg = CType(ds.Tables(avgTableValue).Rows(0).Item(avgDataColumn), String)

            radchartcontrole.ChartTitle.TextBlock.Visible = False

 

            'Metrics Avg label display

            lblAvgDisplay.Text = timeLinesAvgLabel + metricsAvg + "days"

            lblAvgDisplay.Font.Bold = True

            lblAvgDisplay.ForeColor = System.Drawing.Color.Red

 

            'Metrics titile and legend display based on the tab selected

            radchartcontrole.ChartTitle.TextBlock.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.TopRight

            radchartcontrole.ChartTitle.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Red

            radchartcontrole.Legend.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.Bottom

            radchartcontrole.PlotArea.Appearance.Dimensions.AutoSize = True

 

            'Binding the monthly chart data

            monthlyradchartcontrole.Clear()

            monthlyradchartcontrole.DataSource = ds.Tables.Item(monthlytableValue)

            monthlyradchartcontrole.DataBind()

            monthlyradchartcontrole.Series(0).DataXColumn = monthlyXaxisDataColumn

            monthlyradchartcontrole.Series(0).DataYColumn = monthlyYaxisDataColumn

 

            monthlyradchartcontrole.PlotArea.XAxis.AxisLabel.TextBlock.Text = monthlyXaxislableName

            monthlyradchartcontrole.PlotArea.XAxis.AxisLabel.Visible = True

            monthlyradchartcontrole.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Red

            monthlyradchartcontrole.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.Position.Auto = True

 

            monthlyradchartcontrole.PlotArea.YAxis.AxisLabel.Visible = True

            monthlyradchartcontrole.PlotArea.YAxis.AxisLabel.TextBlock.Text = monthlyYaxislableName

            monthlyradchartcontrole.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Red

            monthlyradchartcontrole.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.Position.Auto = True

 

End If

 

 

 

 

 

 

<telerik:RadChart AutoLayout="True" Height="450px" ID="CapacityRadChart"

                                                runat="server" Skin="WebBlue" Width="950px">

                                                <ClientSettings EnableZoom="True" ScrollMode="Both"/>

                                                <Appearance>

                                                    <FillStyle MainColor="249, 250, 251">

                                                    </FillStyle>

                                                    <Border Color="160, 170, 182" />

                                                </Appearance>

                                                <Legend>

                                                    <Appearance Dimensions-Margins="1%, 1%, 1px, 1px"

                                                        Dimensions-Paddings="1px, 1px, 1px, 1px"

                                                        Position-AlignedPosition="Top">

                                                        <ItemTextAppearance TextProperties-Color="102, 102, 102">

                                                        </ItemTextAppearance>

                                                        <FillStyle MainColor="216, 222, 227">

                                                        </FillStyle>

                                                        <Border Color="160, 170, 182" />

                                                    </Appearance>

                                                </Legend>

                                                <PlotArea>

                                                        <YAxis AutoScale="True" AxisMode="Extended">

                                                            <Appearance>

                                                                <MajorGridLines Color="227, 227, 227" />

                                                                <MinorGridLines Color="227, 227, 227" />

                                                                <TextAppearance AutoTextWrap="False"/>                        

                                                            </Appearance>                    

                                                            <AxisLabel>

                                                                <TextBlock>

                                                                    <Appearance TextProperties-Color="140, 140, 140" Position-AlignedPosition="TopLeft">

                                                                    </Appearance>

                                                                </TextBlock>

                                                            </AxisLabel>

                                                        </YAxis>    

                                                        <XAxis AutoScale="True" DataLabelsColumn="RIID's" MaxValue="0" Step="0">

                                                            <Appearance>

                                                                <MajorGridLines Color="227, 227, 227" Width="0" />

                                                                <TextAppearance AutoTextWrap="True" />

                                                            </Appearance>

                                                            <AxisLabel>

                                                                <TextBlock>

                                                                    <Appearance TextProperties-Color="140, 140, 140" Position-AlignedPosition="BottomRight">

                                                                    </Appearance>

                                                                </TextBlock>

                                                            </AxisLabel>

                                                        </XAxis>

                                                        <Appearance>

                                                            <FillStyle FillType="Solid" MainColor="">

                                                            </FillStyle>

                                                        </Appearance>

                                                </PlotArea>                 

                                                <ChartTitle>

                                                    <Appearance>

                                                        <FillStyle MainColor = "">

                                                        </FillStyle>

                                                    </Appearance>

                                                    <TextBlock Text="Capacity Timeliness" >

                                                        <Appearance TextProperties-Color="102, 102, 102"

                                                            TextProperties-Font="Arial, 7pt" Position-AlignedPosition="Bottom">

                                                        </Appearance>

                                                    </TextBlock>

                                                 </ChartTitle>

                                            </telerik:RadChart>

 



 

Pawar
Top achievements
Rank 1
 answered on 17 Apr 2012
0 answers
95 views

Simone
Top achievements
Rank 1
 asked on 17 Apr 2012
1 answer
92 views
Is it possible to determine whether a grid is using simple or advanced data binding? We have some common routines which it turns out need to do different things depending on what kind of data binding is being used.
Richard
Top achievements
Rank 1
 answered on 17 Apr 2012
3 answers
241 views
I am using the Telerik ScriptManager with EnableCDN="True", but I want to load jQuery from Google's CDN instead since my page will not work if I rely on the jQuery loaded only from the Telerik Scrip Manager (I'm guessing it's an order of operations problem). 

Is there any way to prevent the Telerik ScriptManager from loading jQuery and just have it rely on the already loaded Google CDN jQuery?
Ivan Zhekov
Telerik team
 answered on 17 Apr 2012
2 answers
261 views
I've whittled down my project to the following code. If you change the pagesize of the radgrid in this example, the ItemDataBound event will be called each time an item is databound. In my example, I change the HeaderText to the count field, and then I change the first data row's cell to a different color

But only the data item shows the color change. The header item doesn't show any change until the next time I change the page size from the browser, and then it's back at zero where it should have been the first time I changed the page size. In fact, it's always one behind. Why would there be a difference in behavior like this? Is this how it's supposed to work and if so what is the benefit here?

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <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>
    </asp:ScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    <telerik:AjaxUpdatedControl ControlID="RadButton1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadButton1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    <telerik:AjaxUpdatedControl ControlID="RadButton1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <div>
            <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" GridLines="None" GroupingEnabled="False"
                ShowStatusBar="True" Skin="Windows7" OnNeedDataSource="RadGrid1_NeedDataSource" AllowSorting="True" AllowCustomPaging="True"
                AllowPaging="True" OnItemDataBound="RadGrid1ControlItemDataBound" PageSize="20" >
                <HeaderContextMenu />
                <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="True" PageButtonCount="6" ShowPagerText="False" />
                <ExportSettings HideStructureColumns="true" ExportOnlyData="true" IgnorePaging="true"
                    FileName="FlashSalesExport" OpenInNewWindow="True" />
                <MasterTableView AllowCustomSorting="True" CommandItemDisplay="Top">
                    <CommandItemSettings ShowExportToCsvButton="true" ShowRefreshButton="False" ShowAddNewRecordButton="False" />
                    <PagerStyle PageButtonCount="6" Position="Bottom" Wrap="True" AlwaysVisible="True"
                        ShowPagerText="False" />
                    <HeaderStyle HorizontalAlign="Center" />
                </MasterTableView>
                <FilterMenu EnableImageSprites="False" />
                <EditItemStyle Font-Bold="True" />
            </telerik:RadGrid>
    </div>
    <telerik:RadButton ID="RadButton1" runat="server"
        Text="RadButton">
    </telerik:RadButton>
    </form>
</body>
</html>

using System;
 
using Telerik.Web.UI;
 
public partial class Default : System.Web.UI.Page
{
    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = new string[]
        {
            Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString(),
        };
    }
 
    private int Count
    {
        get
        {
            if (Session["Count"] == null)
                Session["Count"] = 0;
            else
                Session["Count"] = (int)Session["Count"] + 1;
 
            return (int)Session["Count"];
        }
    }
 
    protected void RadGrid1ControlItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridHeaderItem)
        {
            GridHeaderItem item = e.Item as GridHeaderItem;
 
            if (item.OwnerTableView.AutoGeneratedColumns.Length > 0)
            {
                item.OwnerTableView.AutoGeneratedColumns[0].HeaderText = Count.ToString();
            }
        }
        else if (e.Item is GridDataItem)
        {
            if (rowcount++ == 0)
                e.Item.Cells[2].ForeColor = System.Drawing.Color.Red;
        }
    }
 
    int rowcount = 0;
}

A second question is how would I get the RadButton to induce a rebind of the RadGrid? I could put code to do that in the Page_Load event but only on a postback, but then I get multiple postbacks and a lot of extra work that I don't need. The button is set to update the grid (and itself) but unless I implement the page_load, I'm not going to get anything.

Any help would be appreciated.


Daniel
Top achievements
Rank 1
 answered on 17 Apr 2012
3 answers
225 views
Hi,
I am using radsplitter in my application..
It should appear appear in the right side of the page, i am using the Java script to set the size of the Splitter when user closes and opens the Splitter
When I open the Spliiter, I have Rad Panel bar inside the Spliiter, in one of the Panel bars i have a button, when i click the button the Page is not responding and the browser is closing automatically.

so when ever i click the button in the splitter when the DOC is selected a pop raised with the following error  
"A Script in the page may be busy , or it may have stopped responding".

I have attached Image file which contains the error message that i am getting when i click the button

Below is the code that I have Used:

<telerik:RadScriptBlock ID="rcb" runat="server">
<script type="text/javascript">
    function Servicechangesize() {
        var splitter = $find("<%=RadSplitter_CreateService.ClientID%>");
        var width = 335;
        splitter.set_width(width);
    }

    function ServiceChangeUndockSize() {
        var splitter = $find("<%=RadSplitter_CreateService.ClientID%>");
        var width = 22;
        splitter.set_width(width);
    }
</script>
</telerik:RadScriptBlock>

<telerik:RadSplitter ID="RadSplitter_CreateService" runat="server" Orientation="Vertical" Width="25"
                             VisibleDuringInit="false" Height="565" Skin="Outlook">
                           <telerik:RadPane ID="RadPane_CreateService" runat="server" BackColor="#DEE0C8">
                                <telerik:RadSlidingZone ID="RadSlidingZone_CreateService" runat="server" BorderColor="AliceBlue" BorderWidth="3px" BorderStyle="Solid"
                                     SlideDirection="Left">   
                                  <telerik:RadSlidingPane ID="RadSlidingPane_CreateService" runat="server" Title="Widgets" EnableDock="true" EnableResize="false"  
                                                                        OnClientUndocked="ServiceChangeUndockSize" OnClientDocked="Servicechangesize" Width="310" BorderColor="AliceBlue"                                                                                                        
                                                                       style="border-style:solid;border-width:3px;" BorderWidth="3px" BorderStyle="Solid" >
                                    <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Height="100%" 
                                                                     ExpandMode="FullExpandedItem" Skin="Outlook"  Width="100%">
                                        <Items>
                                            <telerik:RadPanelItem Text="Email" ImageUrl="Styles/Images/note.gif" Expanded="True">
                                                <Items>
                                                     <telerik:RadPanelItem Value="AccountInformation" runat="server">
                                                       <ItemTemplate>
                                                            <div class="text" style="background-color: #fff">
                                                                 <uc1:email ID="email1" runat="server" />
                                                            </div>
                                                       </ItemTemplate>
                                                     </telerik:RadPanelItem>
                                                </Items>
                                            </telerik:RadPanelItem>
                                            <telerik:RadPanelItem Text="Mail" ImageUrl="Styles/Images/email.png" Expanded="True">
                                                    <Items>
                                                        <telerik:RadPanelItem ImageUrl="Styles/Images/sent.gif" Text="Personal Folders" />
                                                        <telerik:RadPanelItem ImageUrl="Styles/Images/del.png" Text="Deleted Items" />
                                                        <telerik:RadPanelItem ImageUrl="Styles/Images/inbox.gif" Text="Inbox" />
                                                        <telerik:RadPanelItem ImageUrl="Styles/Images/sent.gif" Text="My Mail" />
                                                        <telerik:RadPanelItem ImageUrl="Styles/Images/sent.gif" Text="Sent Items" />
                                                        <telerik:RadPanelItem ImageUrl="Styles/Images/sent.gif" Text="Outbox" />
                                                        <telerik:RadPanelItem ImageUrl="Styles/Images/sent.gif" Text="Search Folders" />
                                                    </Items>
                                            </telerik:RadPanelItem>
                                            <telerik:RadPanelItem Text="Calender" ImageUrl="Styles/Images/cal.gif" >
                                                    <Items>
                                                        <telerik:RadPanelItem Value="AccountInformation" runat="server">
                                                            <ItemTemplate>
                                                                <div class="text" style="background-color: #fff">
                                                                    <telerik:RadCalendar ID="RadCalendar1" runat="server" Skin="Windows7" Width="240px">
                                                                   </telerik:RadCalendar>
                                                                </div>
                                                            </ItemTemplate>
                                                        </telerik:RadPanelItem>
                                                    </Items>
                                             </telerik:RadPanelItem>
                                            <telerik:RadPanelItem Text="File Upload"  ImageUrl="Styles/Images/task.gif">
                                                <Items>
                                                    <telerik:RadPanelItem Value="AccountInformation" runat="server">
                                                        <ItemTemplate>
                                                            <div class="text" style="background-color: #fff">
                                                                    <asp:Button runat="server" CssClass="save_btn" id="btnTest"  Text="Save" onclick="btnTest_Click"/>
                                                             </div>
                                                    </ItemTemplate>
                                                </telerik:RadPanelItem>
                                            </Items>
                                        </telerik:RadPanelItem>
                                        </Items>
                                    </telerik:RadPanelBar>
                                 </telerik:RadSlidingPane>
                               </telerik:RadSlidingZone>                            
                            </telerik:RadPane>  
                       </telerik:RadSplitter>


Please help me in doing this.

Thanks & Regards
N Aravind







Dobromir
Telerik team
 answered on 17 Apr 2012
1 answer
67 views
If I have text in the editor and attempt to get it on post bacl in IE9, it always returns an empty string.  Although in firefox and Chrome, this doesn't happen and it works grea.   Any ideas on how to get the Content text in IE? 
Rumen
Telerik team
 answered on 17 Apr 2012
4 answers
732 views
Hi all.

Just a simple question. Can I have the button inside the textbox in a RadTextBox? I need that to comply with the design of the website, I can't have it to the left or right of the textbox part.

Thanks.
Jose Guay
Richard
Top achievements
Rank 1
 answered on 17 Apr 2012
0 answers
64 views
I have an Grid with a TemplateColumn in there i have an RadTextBox, when i hit the export button nothing gets displayed.
Once I change the RadTextBox to ASP:TextBox everything works as expected, am i doing something wrong or does telerik not support telerik stuff. :)

Same goes for RadNumericTextBox...
Random
Top achievements
Rank 1
 asked on 17 Apr 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?