This might be a little hard to explain but i'm going to do my best because i'm stuck.
I've programatically created an EditTemplate Column using an IBindableTemplate.
The call looks like:
GridTemplateColumn col =
new
GridTemplateColumn();
col.ItemTemplate =
new
ItemLabel(column);
col.EditItemTemplate =
new
EditRadNumTextbox(grid, column);
I could create an insert template but the problem im having is even if i do have an insert template I'm not sure how to find and hide the labels so i end up with a labels in the left column with hidden controls in the right column in the edit form.
How do I find the label in edit/insert mode with in an IBindableTemplate class?
it appears i have two places i can look for it in
public void InstantiateIn(Control container)
or in the control databinding, but in insertmode there's nothing to bind to so i assume i should be able to find the label in InstantiateIn?
Or is there a way to set GridTemplateColumn to not show the label ion insert?
Any help would be much appreciated.
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?
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.
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.
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!!
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.
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);
}
}
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
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
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