Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
73 views

Ian using read grid view to display details on my website. But the exporttoexcel and exporttoword options give me junk balus as result. What's as the exporttoword2007 and exporttoexcel2007 works correctly.

what's the reason for this. Does this have anything to do with the word out office installation on the servers?

I am using an old version telerik 4.0.1.

 Please assist.

Nithin
Top achievements
Rank 1
 answered on 08 Sep 2015
1 answer
76 views

Hi!!

Good Morning

As a step the selected value of a cell to a textbox ?

My code is this:

TextBox1.Text = RadGrid1.MasterTableView.Items(1).ToString

but in my texbox result shows me that:

 

"Telerik.Web.UI.GridDataItem "

beforehand thank you very much , have a good day.

Regards!! 

 

Eyup
Telerik team
 answered on 08 Sep 2015
1 answer
105 views

I have a page that contains a Button. By pressing this button, a RadWindow pops up. this RadWindow contains a RadImageEditor and should show a different image in each time (takes its value from the button). 

in my case the server function which load the image to RadImageEditor does not fire! any help to do that in server on client side?

Thanks.

Marin Bratanov
Telerik team
 answered on 08 Sep 2015
2 answers
122 views

I'm using a handler to upload directly into my azure sql db.

Have adjusted web web config to allow 100mb and applicationhost config to allow everything seems to work ok. Files of various sizes upload fine until I try a file of 18MB. No errors reported, I get the little green light on the uploader but nothing actually gets into the DB.

Unsure where to start looking as no error gets reported.

Any ideas?

Handler code below if it helps....

 

<%@ WebHandler Language="C#" Class="Handler" %>
using System;
using System.Web;
using Telerik.Web.UI;
public class Handler : AsyncUploadHandler
{
protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)
{
System.IO.Stream fileStream = file.InputStream;
byte[] attachmentBytes = new byte[fileStream.Length];
fileStream.Read(attachmentBytes, 0, Convert.ToInt32(fileStream.Length));
System.Data.SqlClient.SqlConnection conn = null;
try
{
try
{
conn = new System.Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["etb"].ConnectionString);
conn.Open();
System.Data.SqlClient.SqlCommand insertCommand = new System.Data.SqlClient.SqlCommand("INSERT INTO STAFF_DOC(FILENAME,FILESIZE,DOC,CONTENT_TYPE,SHORT_DESC,STAFF_ID) VALUES( @FileName, @FileSize, @FileData, @ContentType,'test',26)", conn);
insertCommand.Parameters.Add("@FileName", System.Data.SqlDbType.VarChar).Value = file.FileName;
insertCommand.Parameters.Add("@FileData", System.Data.SqlDbType.VarBinary).Value = attachmentBytes;
insertCommand.Parameters.Add("@ContentType", System.Data.SqlDbType.VarChar).Value = file.ContentType ;
insertCommand.Parameters.Add("@FileSize", System.Data.SqlDbType.VarChar).Value = attachmentBytes.Length;
int queryResult = insertCommand.ExecuteNonQuery();
}
catch (Exception ex){}
}
finally
{
if (conn != null)
{fileStream.Close();
conn.Close();}
}
return CreateDefaultUploadResult<UploadedFileInfo>(file);
}

 

 

Chris
Top achievements
Rank 1
 answered on 08 Sep 2015
1 answer
75 views

Hi,

I'm using 2015.01.401 of your controls.

I'm trying to do a template column and your demo at http://demos.telerik.com/aspnet-ajax/pivotgrid/examples/templates/defaultvb.aspx?show-source=true

has several calls in the pivotgrid templates, to GetDataItem()

However, that doesn't appear to be a built-in method and you don't define that in the page or code-behind.

Where is it?

Thanks,

Brent

Angel Petrov
Telerik team
 answered on 08 Sep 2015
2 answers
79 views

Hi

 I am loading radhtml charts on the top of the existing charts using "OnClientSeriesClicked" 

I have set x Axis label rotation angel for the already loaded charts, during loading of the new chart using client seriers clicked  event the already loaded charts get animated and it looses it X-Axis Label rotation and Y-Axis max value.

 Can someone help me in fixing  this issue.

Thanks in Advance and Regards
Khadeer

Danail Vasilev
Telerik team
 answered on 08 Sep 2015
1 answer
186 views

Hi, 

Currently we're using RadGrid in conjunction with the Scheduler as an "Event Picker" so the user can drag and drop onto the schedule. 

The problem I'm facing is with the length of these events in the RadGrid. We're using Bootstrap for our responsive design framework.

 Here is our RadGrid

<div class="col-sm-7 col-md-5 col-lg-4 hidden-print" id="event-types-list-container">
            <div id="event-types-list">
                <telerik:RadGrid runat="server" ID="EventTypesRadGrid"
                    GridLines="None"
                    AutoGenerateColumns="False"
                    AllowAutomaticInserts="True" AllowAutomaticUpdates="true"
                    ShowFooter="false" AllowScroll="true" AllowSorting="false"
                    onitemdatabound="EventTypesRadGrid_ItemDataBound">
                    <clientsettings allowrowsdragdrop="True">
                        <Selecting AllowRowSelect="True" />
                        <ClientEvents OnRowDropping="Sch_AppointmentDropped" />
                    </clientsettings>                   
                    <mastertableview datakeynames="ScheduleEventTypeID" insertitemdisplay="Bottom" editmode="InPlace" ClientDataKeyNames="ScheduleEventTypeID">
                        <SortExpressions>
                            <telerik:GridSortExpression FieldName="Name" SortOrder="Ascending" />
                        </SortExpressions>
                        <Columns>
                            <telerik:GridTemplateColumn DataField="Subject" HeaderText="Event Types">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="NameLabel" Text='<%# Bind("Name") %>' CssClass="schedule-appointment-title events-container-appointment"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="draggable" />
                            </telerik:GridTemplateColumn>
                        </Columns>
                    </mastertableview>
                </telerik:RadGrid>
            </div>
          
        </div>

 
See RadGrid-1.jpg attachment.

 

The problem is the RadGrid is adding an inline style to itself of 390px (the width of the longest "event"). I've tried to override the styles with inline width: 170px for testing but to no success. 

Is there a way to make the RadGrid obey the width of its parent and wrap the text of the "events" / rows

 

Konstantin Dikov
Telerik team
 answered on 08 Sep 2015
4 answers
444 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
160 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
104 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?