I use ExporttoPDF feature and follow the demo.
I included 2 buttons on the page - server side events.
One button just simple RadScheduler1.ExportToPdf() statement
Second button is the function to bind data to radgrid and then export grid to PDF
<
asp:Panel
ID
=
"customButtons"
runat
=
"server"
BorderStyle
=
"None"
BorderColor
=
"#FFFFFF"
>
<
telerik:RadButton
ID
=
"RadButton2PDF"
runat
=
"server"
Text
=
"Export to PDF"
OnClick
=
"RadButton2PDF_Click"
><
Icon
PrimaryIconUrl
=
"../Images/PDF.gif"
/></
telerik:RadButton
>
<
telerik:RadButton
ID
=
"Button2Print"
runat
=
"server"
Text
=
"Print the schedule"
OnClick
=
"Button2Print_Click"
><
Icon
PrimaryIconUrl
=
"../Images/Printer.png"
/></
telerik:RadButton
> </
asp:Panel
>
PDF file has been generated, BUT, when I click on the button, page become inactive and never become active again, loading image is shown and page has never been reloading.
How to eliminate the loading process. I don't need to reload the page on these events. Again both events are server side
Thank you for your help.
I was trying to use RadAjaxLoadingPanel, but somehow I am not sure what I am missing. I am just trying to show the Panel on different occasion and is being used only for purpose of indication of progress, and hence am not using any AjaxManager or UpdatePanel in the code.
My aspx file would maybe contain:
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
CdnSettings-TelerikCdn
=
"Disabled"
>
<
Services
>
<
asp:ServiceReference
Path
=
"~/CR.asmx"
InlineScript
=
"True"
/>
</
Services
>
</
telerik:RadScriptManager
>
Loading Panel:
<
telerik:RadAjaxLoadingPanel
ID
=
"loadingPanel"
runat
=
"server"
>
</
telerik:RadAjaxLoadingPanel
>
Then I have a Grid Control:
<
telerik:RadGrid
AllowFilteringByColumn
=
"False"
AllowPaging
=
"False"
AllowSorting
=
"False"
AutoGenerateColumns
=
"False"
CellPadding
=
"0"
CellSpacing
=
"0"
CssClass
=
"gridCrossRoads"
GridLines
=
"None"
ID
=
"gridObject"
runat
=
"server"
>
<
ClientSettings
AllowGroupExpandCollapse
=
"false"
EnableAlternatingItems
=
"false"
EnableRowHoverStyle
=
"true"
>
<
Scrolling
AllowScroll
=
"true"
UseStaticHeaders
=
"true"
/>
<
Selecting
AllowRowSelect
=
"True"
/>
<
ClientEvents
OnRowDataBound
=
"GridRowBound"
></
ClientEvents
>
</
ClientSettings
>
<
MasterTableView
AllowFilteringByColumn
=
"False"
AllowNaturalSort
=
"False"
ClientDataKeyNames
=
"Id"
DataKeyNames
=
"Id"
EnableColumnsViewState
=
"False"
EnableViewState
=
"False"
HierarchyLoadMode
=
"Client"
NoMasterRecordsText="<div
class
=
'noRec'
>No records to display.</
div
>" TableLayout="Auto">
<
Columns
>
<
telerik:GridHyperLinkColumn
DataNavigateUrlFields
=
"Id"
DataNavigateUrlFormatString
=
"javascript:ShowWindow({0});"
DataTextField
=
"MasterObject"
DataTextFormatString
=
"{0}"
HeaderText
=
"Eye Color"
UniqueName
=
"MasterObject"
>
<
HeaderStyle
CssClass
=
"gridHeader"
Width
=
"40%"
></
HeaderStyle
>
<
ItemStyle
CssClass
=
"gridItem"
Width
=
"40%"
></
ItemStyle
>
</
telerik:GridHyperLinkColumn
>
<
telerik:GridBoundColumn
DataField
=
"Code"
EmptyDataText
=
"---"
HeaderText
=
"Code"
UniqueName
=
"Code"
>
<
HeaderStyle
CssClass
=
"gridHeader"
Width
=
"20%"
></
HeaderStyle
>
<
ItemStyle
CssClass
=
"gridItem"
Width
=
"20%"
></
ItemStyle
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Status"
EmptyDataText
=
"---"
HeaderText
=
"Status"
UniqueName
=
"Status"
>
<
HeaderStyle
CssClass
=
"gridHeader"
Width
=
"20%"
></
HeaderStyle
>
<
ItemStyle
CssClass
=
"gridItem"
Width
=
"20%"
></
ItemStyle
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"Temp"
>
<
HeaderStyle
CssClass
=
"gridHeader"
Width
=
"20%"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
Width
=
"20%"
/>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
I populate the code using JavaScript
<script type=
"text/javascript"
>
$(document).ready(
function
()
{
_grid = $find("<%= gridObject.ClientID %>");
_loadingPanel = $find(
"<%= loadingPanel.ClientID %>"
);
isLoadingPanelDisplayed =
false
;
ShowLoadPanel(window._grid);
setTimeout(GetEyeColorData, 100); //this is a ajax function which populates the grid using javascript
ResizeAdminGrid();
});
//This function is in a .js file, there is another function HidePanel which hides the panel but it is commented.
function ShowLoadPanel(control)
{
if (window._loadingPanel && !window.isLoadingPanelDisplayed)
{
if (!control)
{
control = window._grid;
}
if (control)
{
window._loadingPanel.show(control);
}
window.isLoadingPanelDisplayed = true;
}
}
</script>
I don't know what's wrong in this script, though the Loading Panel never shows. To see if the Panel is rendered into the DOM, I tried to set the display property of loading panel via jQuery to inline and it worked though it shows before the Grid, but I know the Loading Panel has properly being rendered.
I have a RadioButtonList like this:
<asp:RadioButtonList ID="myRbl" runat="server" AutoPostBack="true">
<asp:ListItem Selected="True" Value="0">Option 0</asp:ListItem>
<asp:ListItem Value="1">Option 1</asp:ListItem>
<asp:ListItem Value="2">Option 2</asp:ListItem>
</asp:RadioButtonList>
and a ToolTipManger:
Dim controlClientID As String = myRbl.ClientID
DirectCast(Page.Master.FindControl("RadToolTipManager1"), RadToolTipManager).TargetControls.Add(controlClientID, True)
I don't know how to add a tooltip for each listed item in my RadioButtonList .
If I do something like listItemOpen.Attributes.Add("title", "Option 0") it does add a tool tip to the listed item and it doesn't work with the tooltipmanager. It work only with a tool tip at the button level.
rgTools.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx;
Hi,
I want to Hide a Week Number in GridDateTimeColumn. I dont know how to do this. Is there any property to hide this. Please let me know if any solution for this.
Thanks,
muthukumar c
TLDR Version:
In situations where a databound value falls outside the options on a RadComboBox, how can I over-ride the default behavior (selecting the first option in the list) with showing the value as empty?
Example:
If I have a RadComboBox with selectable options A,B,C and D and it is bound a field with current value of G, I want the value of the RadComboBox to be empty, rather than defaulting to option A.
Business details (If interested)
We have a business object that contains an employee who is responsible for it. This is selected and edited by a RadComboBox. This works well in typical usage.
However, when an employee leaves the company, the business object will still list them as the person responsible for it. The next time the item is edited, the ex-employee will no longer be in the drop-down select list. This causes the RadComboBox to default to the first employee on the list, with no warning that the field needs to be intentionally selected before saving.
We would like to be able to control the behavior when an ex-employee is on the object, the combobox will show up as empty, and thus trigger the required field validation. (Our rule is that the person must be updated upon the first edit after they leave.)
</
asp:ScriptManager
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AutoGenerateHierarchy
=
"True"
CellSpacing
=
"0"
Culture
=
"de-DE"
GridLines
=
"None"
>
<
MasterTableView
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
></
CommandItemSettings
>
<
RowIndicatorColumn
Visible
=
"True"
FilterControlAltText
=
"Filter RowIndicator column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
Visible
=
"True"
FilterControlAltText
=
"Filter ExpandColumn column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
ExpandCollapseColumn
>
<
NestedViewTemplate
>
<
asp:Panel
runat
=
"server"
ID
=
"configControlContainer"
CssClass
=
"viewWrap"
Visible
=
"true"
>
<
telerik:RadTabStrip
runat
=
"server"
ID
=
"TabStrip1"
MultiPageID
=
"Multipage1"
SelectedIndex
=
"0"
>
<
Tabs
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Satzart 2"
PageViewID
=
"PageView1"
>
</
telerik:RadTab
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Satzart 3"
PageViewID
=
"PageView2"
>
</
telerik:RadTab
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Satzart 4"
PageViewID
=
"PageView3"
>
</
telerik:RadTab
> </
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
runat
=
"server"
ID
=
"Multipage1"
SelectedIndex
=
"0"
RenderSelectedPageOnly
=
"false"
>
<
telerik:RadPageView
runat
=
"server"
ID
=
"PageView1"
>
<
telerik:RadGrid
ID
=
"RadGrid2"
runat
=
"server"
AutoGenerateHierarchy
=
"True"
CellSpacing
=
"0"
Culture
=
"de-DE"
GridLines
=
"None"
/>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
</
asp:Panel
>
</
NestedViewTemplate
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"id"
FilterControlAltText
=
"Filter column column"
UniqueName
=
"column"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Satzart"
FilterControlAltText
=
"Filter column1 column"
UniqueName
=
"column1"
>
</
telerik:GridBoundColumn
>
</
Columns
>
I have a problem with this page, it does not display correctly:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Prueba2.aspx.cs" Inherits="Prueba2" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
meta
http-equiv
=
"Content-Type"
content
=
"text/html; charset=utf-8"
/>
<
link
href
=
"~/Content/bootstrap-grid.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"~/Content/bootstrap-reboot.css"
rel
=
"stylesheet"
/>
<
link
href
=
"~/Content/bootstrap.css"
rel
=
"stylesheet"
/>
<
link
href
=
"~/Content/font-awesome.css"
rel
=
"stylesheet"
/>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadCodeBlock
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
</
script
>
</
telerik:RadCodeBlock
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
<
Scripts
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
></
asp:ScriptReference
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
></
asp:ScriptReference
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQueryInclude.js"
></
asp:ScriptReference
>
</
Scripts
>
</
telerik:RadScriptManager
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManagerEspecies"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"pnFecha"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"pnFecha"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
CssClass
=
"loadingPanel"
Transparency
=
"20"
>
</
telerik:RadAjaxLoadingPanel
>
<
telerik:RadWindowManager
ID
=
"rdwManager"
runat
=
"server"
>
</
telerik:RadWindowManager
>
<
div
class
=
"container-fluid"
>
<
div
class
=
"card"
runat
=
"server"
>
<
div
class
=
"card-body"
>
<
telerik:RadTabStrip
runat
=
"server"
ID
=
"RadTabStrip1"
MultiPageID
=
"RadMultiPage1"
SelectedIndex
=
"0"
>
<
Tabs
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Prueba"
PageViewID
=
"rpvFicha"
Value
=
"rpvFicha"
></
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
runat
=
"server"
ID
=
"RadMultiPage1"
SelectedIndex
=
"0"
CssClass
=
"card"
>
<
telerik:RadPageView
runat
=
"server"
ID
=
"rpvFicha"
CssClass
=
"card-body"
>
<
telerik:RadPanelBar
runat
=
"server"
ID
=
"rpnFicha"
Width
=
"100%"
Style
=
"margin-bottom: 0px"
>
<
Items
>
<
telerik:RadPanelItem
runat
=
"server"
Expanded
=
"False"
Text
=
"Coordenadas"
Visible
=
"true"
Value
=
"habitats"
>
<
ContentTemplate
>
<
telerik:RadTextBox
ID
=
"RadTextBox1"
runat
=
"server"
Rows
=
"3"
MaxLength
=
"3500"
Wrap
=
"false"
Width
=
"100%"
TextMode
=
"MultiLine"
></
telerik:RadTextBox
>
</
ContentTemplate
>
</
telerik:RadPanelItem
>
</
Items
>
<
Items
>
<
telerik:RadPanelItem
runat
=
"server"
Expanded
=
"False"
Text
=
"BibliografÃa"
Visible
=
"true"
Value
=
"bibliografia"
>
<
HeaderTemplate
>
<
a
class
=
"rpExpandable"
>
<
span
class
=
"rpExpandHandle"
></
span
>
</
a
>
<
asp:Label
Text
=
"label1"
ID
=
"label1"
runat
=
"server"
CssClass
=
"rpText"
> </
asp:Label
>
</
HeaderTemplate
>
<
ContentTemplate
>
<
telerik:RadTextBox
ID
=
"rdtSituacion"
runat
=
"server"
Rows
=
"3"
MaxLength
=
"3500"
Wrap
=
"false"
Width
=
"100%"
TextMode
=
"MultiLine"
></
telerik:RadTextBox
>
</
ContentTemplate
>
</
telerik:RadPanelItem
>
</
Items
>
<
Items
>
<
telerik:RadPanelItem
runat
=
"server"
Expanded
=
"False"
Text
=
"Observaciones"
Visible
=
"true"
Value
=
"observaciones"
>
<
ContentTemplate
>
<
telerik:RadTextBox
ID
=
"RadTextBox2"
runat
=
"server"
Rows
=
"3"
MaxLength
=
"3500"
Wrap
=
"false"
Width
=
"100%"
TextMode
=
"MultiLine"
></
telerik:RadTextBox
>
</
ContentTemplate
>
</
telerik:RadPanelItem
>
</
Items
>
</
telerik:RadPanelBar
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
</
div
>
</
div
>
</
div
>
</
form
>
</
body
>
</
html
>
In my webconfig i have this configuration:
<
add
key
=
"Telerik.Web.UI.RenderMode"
value
=
"lightweight"
/>
But if i change the rendermode from the panel to Classic it is displayed well, What is the problem?
Thank you in advance