Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
454 views
Dear Telerik,

I am using RadGrid Prometheus to export a report to PDF. One of my data test data elements contains lots of special characters to make sure the application handles that data correctly. Here is that data item:

Dev /Item\3!@#$%^&amp;*(){}[];:'",<.>?/~`

It shows fine in the grid, but on export to PDF, I get this error:

Error Description: Invalid XHTML. RadGrid has to render correct XHTML in order to export to PDF.

Parse error:

Name cannot begin with the '.' character, hexadecimal value 0x2E. Line 1230, position 44.



Do I have to manually trap and convert these somehow to make them work?

Thanks,

Don
Eyup
Telerik team
 answered on 08 Sep 2015
4 answers
171 views

Hello. Could you help me, please?

I don't see DefaultValue annotations for elements of interface.

As example I see "DatePopupButtonToolTip" instead of the annotation [DefaultValue("Open the calendar popup.")]

public class DateTimePicker : RadDateTimePicker
{
    private DateTimePicker.BDDatePickingCalendar _calendar;
    private DateTimePicker.BDRadDateInput _dateInput;
 
    public override RadCalendar Calendar
    {
        get
        {
            if (_calendar == null)
            {
                _calendar = new DateTimePicker.BDDatePickingCalendar();
            }
            return _calendar;
        }
    }
 
    public override RadDateInput DateInput
    {
        get
        {
            if (_dateInput == null)
            {
                _dateInput = new DateTimePicker.BDRadDateInput();
            }
            return _dateInput;
        }
    }
 
    public override DateTime? SelectedDate
    {
        get
        {
            return DateInput.SelectedDate;
        }
        set
        {
            base.SelectedDate = value;
            DateInput.SelectedDate = value;
        }
    }
 
    private class BDRadDateInput : RadDateInput
    {
        private string GetClientControlType()
        {
            Attribute clientScriptResource = TypeDescriptor.GetAttributes(this)[typeof(ClientScriptResourceAttribute)];
            return ((ClientScriptResourceAttribute)clientScriptResource).ComponentType;
        }
 
        protected override IEnumerable<ScriptDescriptor> GetScriptDescriptors()
        {
            var descriptor = new DateTimePicker.BDControlScriptDescriptor(GetClientControlType(), ClientID);
            ((IControl)this).DescribeComponent(descriptor);
            return new List<ScriptDescriptor>(new ScriptDescriptor[] { descriptor });
        }
    }
 
    private class BDDatePickingCalendar : DatePickingCalendar
    {
        private string GetClientControlType()
        {
            Attribute clientScriptResource = TypeDescriptor.GetAttributes(this)[typeof(ClientScriptResourceAttribute)];
            return ((ClientScriptResourceAttribute)clientScriptResource).ComponentType;
        }
 
        protected override IEnumerable<ScriptDescriptor> GetScriptDescriptors()
        {
            var descriptor = new DateTimePicker.BDControlScriptDescriptor(GetClientControlType(), ClientID);
            ((IControl)this).DescribeComponent(descriptor);
            return new List<ScriptDescriptor>(new ScriptDescriptor[] { descriptor });
        }
    }
 
    private class BDControlScriptDescriptor : ScriptControlDescriptor, IScriptDescriptor
    {
        public BDControlScriptDescriptor(string type, string elementID)
            : base(type, elementID)
        {
        }
 
        protected override string GetScript()
        {
            return base.GetScript().Replace(@" ", " ");
        }
    }
 
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        EnableAjaxSkinRendering = true;
        Calendar.EnableAjaxSkinRendering = true;
        DateInput.EnableAjaxSkinRendering = true;
    }
} 
Konstantin Dikov
Telerik team
 answered on 07 Sep 2015
1 answer
111 views
I'm using Telerik.Web.UI.RadTreeView, version 2013.1.220.45. My application is a .NET 4.5 running on Windows Server 2012, IIS 8.0.
Currently I'm seeing the server's IIS memory increases every time the page loads (I hit Refresh). It's not happening when I remove the RadTreeView control. How can I make sure the control doesn't build-up the server's memory on each load? Or is there any memory leak issues that I should be concerned about? 

Thanks in advance.
Nencho
Telerik team
 answered on 07 Sep 2015
3 answers
495 views

I have the following problem with a Telerik RadDropDownList:
Markup:

 

<asp:UpdatePanel ID="updatepanelInput" runat="server" UpdateMode="Conditional">
   <ContentTemplate>
      <asp:TextBox ID="txtInput" runat="server" ClientIDMode="Static" />
      <asp:Button ID="btnSearch" OnClick="btnDoSearch_Click" runat="server" ClientIDMode="Static" />
      <telerik:RadDropDownList ID="ddlResults" runat="server" ClientIDMode="Static" DropDownWidth="70%" AutoPostBack="true" OnSelectedIndexChanged="ddlResults_SelectedIndexChanged"/>
      <telerik:RadDropDownList ID="ddlHistoryDates" runat="server" ClientIDMode="Static" AutoPostBack="true" OnSelectedIndexChanged="ddlHistoryDates_SelectedIndexChanged" />
   </ContentTemplate>
   <Triggers>
      <asp:AsyncPostBackTrigger ControlID="ddlResults" EventName="DataBound" />
   </Triggers>
</asp:UpdatePanel>

Code behind:
protected void btnDoSearch_Click(object sender, EventArgs e)
{
     AsynchronousQueryExecutor.Call(dataservice.getQuickSearch(currentLan, txtInput.Text, (int)SearchOptions.IncludeInactive), QuickSearchLoaded, LoadFailed); //on query success 'QuickSearchLoaded' will be executed
}
 
public void QuickSearchLoaded(List<spData4_QuickSearch_NomenBaseResult> result)
{
    ddlResults.DataSource = result;
    ddlResults.DataValueField = "id";
    ddlResults.DataTextField = "description";
    ddlResults.DataBind();
 
    AsynchronousQueryExecutor.Call(dataservice.getHistoryDates(result.FirstOrDefault().id), HistoryDatesLoaded, LoadFailed); //on query success 'HistoryDatesLoaded' is executed
}
public void HistoryDatesLoaded(List<spData4_Historiek_GetHistoriek_BedragenResult> result)
{
    ddlHistoryDates.DataSource = result;
    ddlHistoryDates.DataValueField = "DateHistory";
    ddlHistoryDates.DataTextField = "Item";
    ddlHistoryDates.DataBind();
}

So basically when btnSearch is clicked a query result should fill ddlResults and based on this result a new query is executed and returning a result which should be filled in ddlHistoryDates. Both query are executed successfully, but only ddlResults is showing data. ddlHistoryDates stays empty.
Calling updatePanelInput.Update() after ddlHistoryDates.DataBind() is giving me the following error:
the update method can only be called on updatepanel with id before render
Anyone who knows what i'm doing wrong?

 

Ivan Danchev
Telerik team
 answered on 07 Sep 2015
2 answers
138 views

 Hey guys,

 I'm using the radasyncupload control to import an excel sheet in my application. 

 However whenever I try to query this excel file I get an OleDBException with the following message:

"The Microsoft Access database engine could not find the object 'Sheet1$'. Make sure the object exists....."

 

I did make sure there's actually a "Sheet1" in the excel file before uploading. Also when I navigate through file explorer to the uploads folder and try to open the uploaded excel file I get a corrupted file error.

I've attached a sample project with an upload page and 2 buttons. 

1. The upload button queries the excel file uploaded through the radasyncupload control

2. The query button queries an excel file already part of the project. Querying this file does not give me any exceptions.

 

Any idea why the file uploaded with radasyncupload gives me this exception?

 

Had to upload the project elsewhere due to attachment-size limits:

http://we.tl/gcko7it2HH​

Raoul
Top achievements
Rank 1
 answered on 07 Sep 2015
1 answer
157 views

Hi!

I'm using the RadWizard in a popupwindow. The steps have different content which results in different heights. The exact size cannot be determined during build as this varies.

How can I remove the height attribute in CSS for rwzContent as this setting appears to be the culprit in a very ugly display of the 'higher' step.

The first wizard step is quite small (see attachment step1.png). The resulting 2nd step therefore is just as small (see attachment step2-current.png). If I remove during debugging the height attribute from .rwzContent (current value 52px) then the steps are nicely displayed (see attachment step2-expected.png)

 

Magdalena
Telerik team
 answered on 07 Sep 2015
1 answer
127 views

Hi, I'm attempting to remove all built-in Telerik skins and CSS.  I've set all RadTextBox controls to have the EnableEmbeddedSkins and EnableEmbeddedBaseStylesheet attributes to FALSE. I'm finding that in order for the two attributes mentioned above to function properly ALL Telerik controls on the page must have the same attributes set.  When I set all controls on the page with these values everything looks great. If I have any control on the page not set with those attributes then all of the controls get the skins and style sheets added even though I've set those two attributes.

I need to have my RadTextBox controls set to have no added skins or style sheets added but have my RadDateInput controls set to have the added skins and stylesheets. Is this how these attributes work or is there something else interfering with these attributes?

 

Thanks

 

 â€‹

Konstantin Dikov
Telerik team
 answered on 07 Sep 2015
0 answers
130 views

Hi,

I've a grid, and I want show an associated chart. My code works fine, but when I filter the grid, I want that the Chart is binding with the new grid's data.

 My code:

  <div class="col-md-9">
 
        <telerik:RadGrid ID="gridDatos" runat="server" GroupPanelPosition="Top" AllowPaging="True" ShowGroupPanel="True"
            AllowSorting="True" ShowFooter="True" AllowFilteringByColumn="true"
            OnDataBound="gridDatos_DataBound" CellSpacing="-1" GridLines="Both" OnNeedDataSource="gridDatos_NeedDataSource">
....
 
        </telerik:RadGrid>
     
    <div class="col-md-3">
        <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server">
        </telerik:RadHtmlChart>
    </div>
 

Code Behind

protected void gridDatos_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
       {
           int numeroSemana = 0;
           int estadoOperacion = 0;
           int tipoOperacion = 0;
 
           Int32.TryParse(comboNumeroSemanas.SelectedValue.ToString(), out numeroSemana);
           Int32.TryParse(comboEstadoOperacion.SelectedValue.ToString(), out estadoOperacion);
           Int32.TryParse(comboTipoOperacion.SelectedValue.ToString(), out tipoOperacion);
 
           if (numeroSemana <= 0 || estadoOperacion <= 0 || tipoOperacion <= 0)
               return;
 
           var datos = GetInforme(numeroSemana, tipoOperacion, estadoOperacion);
           gridDatos.DataSource = null;
           gridDatos.DataSource = datos;
 
       }

protected void gridDatos_DataBound(object sender, EventArgs e)
        {
            GenerarGrafico();

        }

        private void GenerarGrafico()
        {
            List<InformeProcesado> ds = gridDatos.DataSource as List<InformeProcesado>;

            if (ds == null)
                return;

            RadHtmlChart1.PlotArea.Series.Clear();

            ColumnSeries serie0 = new ColumnSeries();
            SeriesItem r0 = new SeriesItem();
            r0.YValue = ds.Sum(x => x.Rango0);
            serie0.Items.Add(r0);
            RadHtmlChart1.PlotArea.Series.Add(serie0);

            ColumnSeries serie1 = new ColumnSeries();
            SeriesItem r1 = new SeriesItem();
            r1.YValue = ds.Sum(x => x.Rango1);
            serie1.Items.Add(r1);
            RadHtmlChart1.PlotArea.Series.Add(serie1);

            ColumnSeries serie2 = new ColumnSeries();
            SeriesItem r2 = new SeriesItem();
            r2.YValue = ds.Sum(x => x.Rango2);
            serie2.Items.Add(r2);
            RadHtmlChart1.PlotArea.Series.Add(serie2);

            ColumnSeries serie3 = new ColumnSeries();
            SeriesItem r3 = new SeriesItem();
            r3.YValue = ds.Sum(x => x.Rango3);
            serie3.Items.Add(r3);
            RadHtmlChart1.PlotArea.Series.Add(serie3);

            ColumnSeries serie4 = new ColumnSeries();
            SeriesItem r4 = new SeriesItem();
            r4.YValue = ds.Sum(x => x.Rango4);
            serie4.Items.Add(r4);
            RadHtmlChart1.PlotArea.Series.Add(serie4);

            ColumnSeries serie5 = new ColumnSeries();
            SeriesItem r5 = new SeriesItem();
            r5.YValue = ds.Sum(x => x.Rango5);
            serie5.Items.Add(r5);
            RadHtmlChart1.PlotArea.Series.Add(serie5);

            ColumnSeries serie6 = new ColumnSeries();
            SeriesItem r6 = new SeriesItem();
            r6.YValue = ds.Sum(x => x.Rango6);
            serie6.Items.Add(r6);
            RadHtmlChart1.PlotArea.Series.Add(serie6);

            ColumnSeries serie7 = new ColumnSeries();
            SeriesItem r7 = new SeriesItem();
            r7.YValue = ds.Sum(x => x.Rango7);
            serie7.Items.Add(r7);
            RadHtmlChart1.PlotArea.Series.Add(serie7);
        }​

 

The chart display in bars the summatory values.

 

How can I do it?

 

Manolo
Top achievements
Rank 1
 asked on 07 Sep 2015
1 answer
46 views
It looks like a typo in the method name. Should that T really be there?
Hristo Valyavicharski
Telerik team
 answered on 07 Sep 2015
2 answers
240 views
I recently tried to use the CheckList filtering on a ​RadGrid but i havn't manage to put my buttons language in french.
I would like to translate the "Chek All", "Apply" and "Cancel" buttons into french. How is it possible?
I don't find these elements in the RadFilter.Main.resx or RadGrid.Main.resx.
jeremy
Top achievements
Rank 1
 answered on 07 Sep 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?