Hi
Is it possible to define, which rows of a grid shall get the alternate style depending on a database value instead of alternate every second row?
Kind regards
GridTextBoxColumnEditor editor = manager.GetColumnEditor("CustomerID") as GridTextBoxColumnEditor;
editor.TextBoxControl.Enabled = false;
Is it possible to change the viewport breakpoints? I want the xs max-Width to change at 380px instead of 360 px.
Hi,
(using Telerik.Web.UI 2015.1.401.45)
I have my RadSchedular setup like this:
<
telerik:RadScheduler
ID
=
"RadScheduler1"
SelectedView
=
"WeekView"
OnClientDataBound
=
"wsOnSchedulerDataBound"
OnClientAppointmentsPopulating
=
"wsOnClientAppointmentsPopulating"
OnClientNavigationComplete
=
"wsOnClientNavigationComplete"
OnClientAppointmentInserting
=
"wsOnClientAppointmentInserting"
OnClientAppointmentEditing
=
"wsOnClientAppointmentEditing"
OnClientAppointmentDeleting
=
"wsOnClientAppointmentDeleting"
OverflowBehavior
=
"Expand"
StartInFullTime
=
"true"
StartEditingInAdvancedForm
=
"false"
AllowDelete
=
"true"
AllowEdit
=
"true"
AllowInsert
=
"true"
EnableRecurrenceSupport
=
"false"
AppointmentStyleMode
=
"Default"
Culture
=
"nl-NL"
FirstDayOfWeek
=
"Monday"
LastDayOfWeek
=
"Sunday"
runat
=
"server"
>
<
WebServiceSettings
Path
=
"wsPlanningServices.asmx"
ResourcePopulationMode
=
"ServerSide"
/>
<
AdvancedForm
Modal
=
"true"
></
AdvancedForm
>
<
AppointmentContextMenuSettings
EnableDefault
=
"true"
/>
<
TimeSlotContextMenuSettings
EnableDefault
=
"true"
/>
<
DayView
HeaderDateFormat
=
"dd-MM-yyyy"
/>
<
WeekView
HeaderDateFormat
=
"dd-MM-yyyy"
ColumnHeaderDateFormat
=
"ddd d MMM"
/>
<
MonthView
HeaderDateFormat
=
"MMMM yyyy"
/>
<
AgendaView
HeaderDateFormat
=
"dd-MM-yyyy"
/>
</
telerik:RadScheduler
>
As you can see, I explicitly set the culture to "nl-NL" and also specified a custom WeekView.ColumnHeaderDateFormat.
Now the column headers should read as eg. "Vr 15 juni", but instead they are rendered as "Fri 19 Jun".
So the columns headers are still displayed in English, despite the explicit "nl-NL" culture setting.
What am I missing here?
Hello,
I have a RadEditor control behaving well on IE11, however the toolbar layout is broken on IE8 - please see screenshots attached. It seems to break the toolbar every time there's an arrow next to the button, like in undo, redo, etc.
The toolbar is looking ok on Metro skin, it's only on Default skin where the issue is present.
I have included this directive in my page and the issue is gone: <meta http-equiv="X-UA-Compatible" content="IE=8" />
However this is causing other problems, is there any other way to get a permanent fix for this? I have installed recently version 2015.1.401.35
Regards
I am unable to get the image to export on the pdf. Here is my code:
protected void RadGrid1_PdfExporting(object sender, GridPdfExportingArgs e)
{
string tableWrapper = string.Empty;
tableWrapper = "<table><colgroup><col style='width:550px;' /></colgroup>";
tableWrapper += "<thead></thead><tbody><tr><td>" + e.RawHTML + "</td></tr>";
tableWrapper += "<tr><td> </td></tr>";
tableWrapper += "<tr><td> </td></tr>";
tableWrapper += "<tr><td style='padding-left:5px;'>" + AddPDFTables() + "</td></tr>";
tableWrapper += "</tbody><tfoot></tfoot></table>";
e.RawHTML = tableWrapper;
}
private string AddPDFTables()
{
string tables = string.Empty;
tables += "<?hard-pagebreak?>";
tables += "<table style='border-style:none; width:550px; font-size:8px; padding-left:2px; padding-right:2px; padding-top:2px;'>";
tables += "<colgroup><col style='width:200px; vertical-align:top;' /><col style='width:20px;' /><col style='width:200px; vertical-align:top;' /></colgroup>";
tables += "<thead></thead><tbody>";
tables += "<tr><td>" + CreateLegendPDF() + "</td><td> </td><td>" + CreateRejectCodePDF() + "</td></tr>";
tables += "</tbody></table>";
return tables;
}
private string CreateLegendPDF()
{
string legend = string.Empty;
legend += "<table style='border-style:solid; border-color:#5d8cc9; border-width:1px; width:200px; font-size:8px; padding-left:2px; padding-right:2px; padding-top:2px; padding-bottom:2px;'>";
legend += "<colgroup><col style='width:30px;' /><col style='width:150px;' /></colgroup>";
legend += "<thead><tr><th colspan='2' style='background-color:#bdcbde; font-weight:bold; font-size:9px; text-align:left; padding-left:2px;'>Content Areas</th></tr></thead>";
legend += "<tbody>";
if (listLegendRows.Count <= 0)
{
listLegendRows = (List<string>)ViewState["LegendList"];
}
if (listLegendRows.Count > 0)
{
foreach (string item in listLegendRows)
{
legend += item;
}
}
legend += "</tbody></table>";
return legend;
}
private string CreateRejectCodePDF()
{
string rejectString = string.Empty;
List<string> listRejectRows = new List<string>();
if (ViewState["RejectList"] != null)
{
listRejectRows = (List<string>)ViewState["RejectList"];
}
if (listRejectRows.Count > 0)
{
rejectString += "<table style='border-style:solid; border-color:#5d8cc9; border-width:1px; width:200px; font-size:8px; padding-left:2px; padding-right:2px; padding-top:2px; padding-bottom:2px;'>";
rejectString += "<colgroup><col style='width:30px;' /><col style='width:150px;' /></colgroup>";
rejectString += "<thead><tr><th colspan='2' style='background-color:#bdcbde; font-weight:bold; font-size:9px; text-align:left; padding-left:2px;'>ARDMS Reject Codes</th></tr></thead>";
rejectString += "<tbody>";
foreach (string item in listRejectRows)
{
rejectString += item;
}
rejectString += "</tbody></table>";
}
return rejectString;
}
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
if (isPdfExport)
{
GridItem item = e.Item as GridItem;
item.Style["font-family"] = "Segoe UI";
item.Style["font-size"] = "8px";
switch (item.ItemType) //Mimic RadGrid appearance for the exported PDF file
{
case GridItemType.CommandItem:
item.Style["display"] = "none";
item.Visible = true;
item.Style["background-color"] = "#000000";
break;
case GridItemType.Item:
item.Style["background-color"] = "#FFFFFF";
break;
case GridItemType.AlternatingItem:
item.Style["background-color"] = "#e8f1fc";
break;
case GridItemType.Header:
item.Style["background-color"] = "#bdcbde";
break;
case GridItemType.FilteringItem:
item.Style["display"] = "none";
item.Visible = false;
break;
case GridItemType.Footer:
item.Style["background-color"] = "#c3d8f1";
break;
}
if (item is GridCommandItem)
{
item.PrepareItemStyle(); //needed to span the image over the CommandItem cells
}
}
}
This is the error I am getting
[GridPdfExportException: Invalid XHTML. RadGrid has to render correct XHTML in order to export to PDF.
Parse error:
The 'tbody' start tag on line 674 position 83 does not match the end tag of 'thead'. Line 687, position 4.
at line:
</thead><tbody>]
I checked all the tags and they seem fine to me.
How do I correct this?
Thanks,
I am trying to track what a user is doing on a page to prevent them moving off a Page View before saving it, the problem I have is that when they go straight from the changed control to the tab strip the OnValueChanged event of the text box does not fire.
I have created a stripped out page to illustrate the problem which is below, there is no code behind in the demo.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
></
telerik:RadScriptManager
>
<
telerik:RadTabStrip
runat
=
"server"
ID
=
"RadTabStrip1"
Align
=
"Justify"
AutoPostBack
=
"true"
MultiPageID
=
"RadMultiPage1"
SelectedIndex
=
"0"
>
<
Tabs
>
<
telerik:RadTab
Text
=
"Basic Details"
PageViewID
=
"pageBasicDetails"
/>
<
telerik:RadTab
Text
=
"Permissions"
PageViewID
=
"pagePermissions"
/>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
runat
=
"server"
ID
=
"RadMultiPage1"
SelectedIndex
=
"0"
RenderSelectedPageOnly
=
"True"
>
<
telerik:RadPageView
runat
=
"server"
ID
=
"pageBasicDetails"
>
<
div
class
=
"contentWrapper"
>
<
table
>
<
tr
>
<
td
>
<
asp:Label
runat
=
"server"
ID
=
"lblFirstName"
AssociatedControlID
=
"FirstName"
Text
=
"First Name"
></
asp:Label
></
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"FirstName"
MaxLength
=
"50"
Width
=
"300px"
Text
=
"John"
><
ClientEvents
OnValueChanged
=
"SetDirty"
/></
telerik:RadTextBox
></
td
>
<
td
>
<
asp:RequiredFieldValidator
ID
=
"valFirstName"
ControlToValidate
=
"FirstName"
CssClass
=
"validation"
ErrorMessage
=
"First Name is required"
runat
=
"server"
/></
td
>
</
tr
>
<
tr
>
<
td
>
<
asp:Label
runat
=
"server"
ID
=
"lblLastName"
AssociatedControlID
=
"LastName"
Text
=
"Last Name"
></
asp:Label
></
td
>
<
td
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"LastName"
MaxLength
=
"50"
Width
=
"300px"
Text
=
"Smith"
><
ClientEvents
OnValueChanged
=
"SetDirty"
/></
telerik:RadTextBox
></
td
>
<
td
>
<
asp:RequiredFieldValidator
ID
=
"valLastName"
ControlToValidate
=
"LastName"
CssClass
=
"validation"
Display
=
"Static"
ErrorMessage
=
"Last Name is required"
runat
=
"server"
/></
td
>
</
tr
>
</
table
>
</
div
>
</
telerik:RadPageView
>
<
telerik:RadPageView
runat
=
"server"
ID
=
"pagePermissions"
>
<
div
class
=
"contentWrapper"
>
</
div
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
</
div
>
</
form
>
<
script
type
=
"text/ecmascript"
>
function SetDirty(sender, eventArgs) {
alert('SetDirty');
}
</
script
>
</
body
>
</
html
>
If you go into the page and edit the first name then move to the last name control, the client side function SetDirty fires as I would expect. If you then change it again but this time click directly to the Permissions tab the SetDirty function does not fire which does not seem correct as the control value is changed and there should still be a blur event.
Can you tell me what I am doing wrong?