Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
364 views

I have a HTML Chart that works great to plot Line Series data against hourly date/time values in the X axis.  I want to shade weekend dates based on the selected date range.  So this needs to be done dynamically in code.  I suspect that I'm not setting the From/To values correctly.  I found one reference that suggested that these should be in OADate format.  But this doesn't seem to work.  But there may be other issues that I'm not seeing.  Here is my code.  Any help is greatly appreciated.

Here's the relevant Markup

<telerik:RadHtmlChart runat="server" Width="1000px" Height="300px"  BackColor="AntiqueWhite" PlotArea-XAxis-LabelsAppearance-TextStyle-FontSize="9pt"
      ID="rhcLogsLast24hrs" BorderWidth="1"  >
      <PlotArea>
          <Series>
 
              <telerik:LineSeries DataFieldY="LogParserSuccess" Name="Log Parser" >
                  <TooltipsAppearance Color="White" DataFormatString="{0:n0}"/>
                  <LabelsAppearance Visible="False" DataFormatString="{0:n0}" />
                  <Appearance  FillStyle-BackgroundColor="#5ab7de">
                      <FillStyle ></FillStyle>
                  </Appearance>
                  <LineAppearance Width="1" />
                  <MarkersAppearance MarkersType="Circle" BackgroundColor="White" Size="8" BorderColor="#5ab7de"
                      BorderWidth="2"></MarkersAppearance>
 
                      <TooltipsAppearance Color="White">
                          <ClientTemplate>
                              #=dataItem.LogParserSuccess# Million Log Events Parsed on<br />#=dataItem.Hour#
                          </ClientTemplate>
                      </TooltipsAppearance>
                               </telerik:LineSeries>                                                                                                         
          </Series>
          <XAxis DataLabelsField="Hour"   >
 
              <LabelsAppearance RotationAngle="90"   DataFormatString="{0:M/d h tt}">
              </LabelsAppearance>
              <TitleAppearance Text="Hour">
              </TitleAppearance>
          </XAxis>
          <YAxis>
              <LabelsAppearance DataFormatString="{0:n0}" >
              </LabelsAppearance>
              <TitleAppearance Text="Log Events" >
              </TitleAppearance>
          </YAxis>
 
      </PlotArea>
      <Legend >
          <Appearance Visible="True" Position="Right">
          </Appearance>
      </Legend>
      <ChartTitle Text="Log Events">
      </ChartTitle>
  </telerik:RadHtmlChart>

Here is the relevant Code Behind:

rhcLogsLast24hrs.PlotArea.XAxis.LabelsAppearance.DataFormatString = "{0:M/d h tt}"
           rhcLogsLast24hrs.PlotArea.XAxis.TitleAppearance.Text = "Hour"
           rhcLogsLast24hrs.PlotArea.YAxis.TitleAppearance.Text = "Log Events (Millions)"
           If ts.TotalHours > 24 Then
               rhcLogsLast24hrs.PlotArea.XAxis.LabelsAppearance.Step = ts.TotalHours / 20
           End If
 
           Dim I As Integer = 0
           For Each dr As DataRow In dt.Rows
               Dim thisdate As DateTime = dr("Hour")
 
               If thisdate.DayOfWeek = DayOfWeek.Saturday Or thisdate.DayOfWeek = DayOfWeek.Sunday Then
                   Dim band As PlotBand = New PlotBand()
                   band.Color = System.Drawing.Color.Green
                   band.Alpha = 190
                   band.From = thisdate.ToOADate
                   band.To = thisdate.AddHours(1).ToOADate
                   rhcLogsLast24hrs.PlotArea.XAxis.PlotBands.Add(band)
               End If
               I += 1
           Next
      rhcLogsLast24hrs.DataSource = dt
       rhcLogsLast24hrs.DataBind()

 

Thanks!

 

Danail Vasilev
Telerik team
 answered on 19 Sep 2016
2 answers
234 views

my form is pretty wide and the pdf export has data overlapping

gvMonthly.ExportSettings.FileName = GetGridFilename()
gvMonthly.ExportSettings.ExportOnlyData = True
'gvMonthly.ExportSettings.IgnorePaging = True
gvMonthly.ExportSettings.OpenInNewWindow = True
gvMonthly.MasterTableView.ExportToPdf()

is there anything I can do like tell the font to be smaller or have it wrap the text better? or landscape?

Doug
Top achievements
Rank 1
 answered on 19 Sep 2016
2 answers
376 views

 

Hi..
    Here i have two code snipets.  In first i used bound column for displaying record in rad grid in runtime.  
If i using template column its not working (It throughing an error like Data binding error).

My concept is IF i get the column from database means it should show the Data value Else column should be disappear.

PLEASE HELP ME ON THIS ISSUE... Thanks in advance.
  
WORKING
------------------------------------------------------

public void Bind_grid()

        {

            tkgvPerformance.Columns[0].Visible = false;

           

            string Query = "select c.DepartmentID from tblEMP c";

            tkgvPerformance.DataSource = Fs.GetDataTable(Query, CommandType.Text);

            tkgvPerformance.DataBind();

        }

 

 

 

<telerik:RadGrid ID="tkgvPerformance" runat="server" AutoGenerateColumns="False"

                        GridLines="None" Skin="Sunset" AllowFilteringByColumn="True" AllowSorting="True">

                        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default">

                        </HeaderContextMenu>

                        <MasterTableView>

                            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>

                            <Columns>

                                <telerik:GridBoundColumn DataField="EMPname" HeaderText="CourseName" UniqueName="CourseName">

                                </telerik:GridBoundColumn>

                                <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Sub1">

                                    <ItemTemplate>

                                        <asp:CheckBox ID="CheckBox1" runat="server" Text='<%#Eval("DepartmentID") %>' ForeColor="Red"

                                            Font-Bold="true" />

                                        <telerik:RadNumericTextBox ID="txtPassMark" runat="server" MaxLength="3" Width="35px">

                                        </telerik:RadNumericTextBox>

                                        <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" MaxLength="3" Width="35px">

                                        </telerik:RadNumericTextBox>

                                        <asp:Label ID="Label1" runat="server" Text="100" ForeColor="Gray"></asp:Label>

                                    </ItemTemplate>

                                    <ItemStyle CssClass="style1" />

                                </telerik:GridTemplateColumn>

                            </Columns>

                        </MasterTableView>

                    </telerik:RadGrid>



NOTWORKING
------------------------------------------------------
public void Bind_grid()

        {

            tkgvPerformance.Columns[1].Visible = false;

           

            string Query = "select c.EMPname from tblEMP c";

            tkgvPerformance.DataSource = Fs.GetDataTable(Query, CommandType.Text);

            tkgvPerformance.DataBind();

        }

 

 

 

<telerik:RadGrid ID="tkgvPerformance" runat="server" AutoGenerateColumns="False"

                        GridLines="None" Skin="Sunset" AllowFilteringByColumn="True" AllowSorting="True">

                        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default">

                        </HeaderContextMenu>

                        <MasterTableView>

                            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>

                            <Columns>

                                <telerik:GridBoundColumn DataField="EMPname" HeaderText="CourseName" UniqueName="CourseName">

                                </telerik:GridBoundColumn>

                                <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Sub1">

                                    <ItemTemplate>

                                        <asp:CheckBox ID="CheckBox1" runat="server" Text='<%#Eval("DepartmentID") %>' ForeColor="Red"

                                            Font-Bold="true" />

                                        <telerik:RadNumericTextBox ID="txtPassMark" runat="server" MaxLength="3" Width="35px">

                                        </telerik:RadNumericTextBox>

                                        <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" MaxLength="3" Width="35px">

                                        </telerik:RadNumericTextBox>

                                        <asp:Label ID="Label1" runat="server" Text="100" ForeColor="Gray"></asp:Label>

                                    </ItemTemplate>

                                    <ItemStyle CssClass="style1" />

                                </telerik:GridTemplateColumn>

                            </Columns>

                        </MasterTableView>

                    </telerik:RadGrid>

Hatem
Top achievements
Rank 1
 answered on 19 Sep 2016
9 answers
180 views
We are using Telerik version "2013..3.1114.35" . We have CMS type of
application. And facing issue with form tag. When form tag placed under
radEditor. Any alternative to this problem. Is this issue resolved in
latest version. Need help on this as early as possible.
Amol
Top achievements
Rank 1
 answered on 19 Sep 2016
1 answer
837 views
where i can download demos of asp.net ajax for offline use ?
Marin Bratanov
Telerik team
 answered on 19 Sep 2016
1 answer
68 views

Hi,

First the problem occurs in IE not in Firefox.

I have this string in html view: <a href="http://TEST?TestId=<%TEST_GUID%>">here</a>

In Firefox it looks like this:

HTML View: <a href="http://TEST?TestId=<%TEST_GUID%>">here</a>
Switch to design: here
Switch to HTML: <a href="http://TEST?TestId=<%TEST_GUID%>">here</a>

In IE 11

HTML View: <a href="http://TEST?TestId=<%TEST_GUID%>">here</a>
Switch to design: ">here
Switch to HTML: <a href="http://TEST?TestId=<%TEST_GUID% originalAttribute=" href"="" test?testid='<%TEST_GUID%"'>"&gt;here</a>

As you can see editing this in IE alway crashes the hyperlink.

Is there any way to fix this?

Marin Bratanov
Telerik team
 answered on 19 Sep 2016
2 answers
232 views

I use EditItemTemplate and RadNumericTextBox.

How set default value to 100 into the RadNumericTextBox if the user does not fill in the value?

 

<telerik:GridTemplateColumn UniqueName="sortid" SortExpression="sortid" HeaderText="Sortering" EditFormHeaderTextFormat="" HeaderStyle-Width="100px">
    <ItemTemplate>
        <asp:Label ID="lblSortid" Text='<%# Eval("sortid") %>' runat="server" />
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadNumericTextBox ID="tbSortid" Width="100px" MaxLength="3" Text='<%# Bind("sortid") %>' EmptyMessage="Sortering (100)" ToolTip="Sortering" runat="server">
            <NumberFormat DecimalDigits="0" GroupSeparator="" />
        </telerik:RadNumericTextBox>
        <asp:RequiredFieldValidator
            ID="rfvSortid"
            ControlToValidate="tbSortid"
            Display="Dynamic"
            ErrorMessage="Sortering (100)?"
            ForeColor="#FF0000"
            SetFocusOnError="true"
            runat="server" />
    </EditItemTemplate>
</telerik:GridTemplateColumn>

Viktor Tachev
Telerik team
 answered on 19 Sep 2016
5 answers
103 views

We wrote this web page using telerik controls and for some reason, it won’t work in IE 9.

The issue is a display issue. The google map won’t load and the entire box displays in half size (only in IE9) It works in every other browser including IE 7 and 8. We upgraded to the latest Telerik DLLs ( I believe). We are looking for a fix or direction on how to get this resolved in IE9.

Here is the page in question:
http://www.alarm.org/Search/MapSearch.aspx?ZipCode=75248

Thanks for your help!
Marin Bratanov
Telerik team
 answered on 19 Sep 2016
2 answers
85 views

Sometimes I got javascript error (I translated error message by myself from polish):

err_msg = Could not get property „getTextElement” for not defined or null reference (line 16762)
 
documentState = completed
 
url = .../Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35:pl-PL:7dd8b7c5-dd18-48e6-97c2-5a5a060b2752:ea597d4b:b25378d2;Telerik.Web.UI:pl-PL:ead0d100-d31b-4d13-9451-88908208aae7:16e4e7cd:f7645509:22a6274a;||:4c5db2b2:de3312b1:eff1b1fc;Telerik.Web.UI, Version=2015.2.729.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4:pl-PL:ead0d100-d31b-4d13-9451-88908208aae7:24ee1bba:c128760b:874f8ea2:19620875:4877f69a:f46195d3:92fe8ea0:fa31b949:490a9d4e:bd8f85e4:cda80b3:383e4ce8:e330518b:2003d0b8:88144a7a:1e771326:c8618e41:1a73651d:333f8d94:ed16cbdc:e524c98b:b7778d6c:6d43f6d9:407acb1c:e4f8f289

 

I could not reproduce it while developing, but on production this error appears quite often. I suppose that mentioned Javascript code tries to refer to control (button) when it is not rendered yet, but I have no idea how to resolve it. 

Ivan Danchev
Telerik team
 answered on 19 Sep 2016
1 answer
186 views

Hi,

 

We have a problem with captcha in Production environment. In development and testing is working fine.

In production we have a webapp in port 1800 for administration and a extended site in port 80 for anon users, when you access via 80 the captcha does not display the image and is returning error 401. http://www.molymet.cl/es/Paginas/Contact-Us.aspx

I'm attaching both webconfig.

 

Marin Bratanov
Telerik team
 answered on 19 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?