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

I have a RadGrid using Batch Edit mode and the data being editing/displayed by the grid is a single column.

When I Add Record, and then press return without entering any text, the data is accepted and BatchEditCellValueChanging client event is not fired and a blank record is added to my data to be saved.  If I edit a cell with content already in it, clear the contents, then press Enter, BatchEditCellValueChanging is fired, and I can cancel the event to prevent the change from taking place.

How do I intercept the Add Record situation on the client side and prevent the blank record from being added to the client-side data?

Viktor Tachev
Telerik team
 answered on 08 Sep 2015
3 answers
186 views

Hello,

At the moment I am setting the MinDate and MaxDate properties on a RadDatePicker ​in the code behind. This works well with regard to the calendar because it is not possible to select dates outside of the range with the mouse.

However, the user may still enter dates by typing. At the moment, the default behaviour isn't great. What I would is to present the user with a meaningful message if they type a date outside of the range, preferably when the control loses focus.

I am wondering what the best way to do this is? Do I need to implement something based on <asp:CompareValidator/> or is there a better way?

Thanks in advance,

John.

Eyup
Telerik team
 answered on 08 Sep 2015
5 answers
89 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
95 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
131 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
144 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
101 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
96 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
207 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
479 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?