Folks,
Using VS 2010 with RadControls for ASP.NET AJAX Q3 2012. I am using below link as a prototype.
http://demos.telerik.com/aspnet-ajax/editor/examples/edittemplate/defaultcs.aspx
Attached is my Grid and I would like export only the Selected Row Rad Editor content to PDF in i a new window. below is is my complete radgrid declaration.
Any help is appreciated.
Thanks
gc_0620
______________<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
/>
<
telerik:RadSkinManager
ID
=
"QsfSkinManager"
runat
=
"server"
ShowChooser
=
"true"
/>
<
telerik:RadFormDecorator
ID
=
"QsfFromDecorator"
runat
=
"server"
DecoratedControls
=
"All"
EnableRoundedCorners
=
"false"
/>
<
telerik:RadGrid
ID
=
"MyDataGrid"
runat
=
"server"
AutoGenerateColumns
=
"False"
DataSourceID
=
"SqlDataSource1"
AllowAutomaticUpdates
=
"True"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
AutoGenerateEditColumn
=
"True"
AutoGenerateDeleteColumn
=
"True"
CellSpacing
=
"0"
GridLines
=
"None"
AllowFilteringByColumn
=
"True"
AllowSorting
=
"True"
>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"True"
/>
</
ClientSettings
>
<
MasterTableView
DataKeyNames
=
"ID"
CommandItemDisplay
=
"Top"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
></
CommandItemSettings
>
<
RowIndicatorColumn
Visible
=
"True"
FilterControlAltText
=
"Filter RowIndicator column"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
Visible
=
"True"
FilterControlAltText
=
"Filter ExpandColumn column"
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridTemplateColumn
UniqueName
=
"ID"
Display
=
"false"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"IdLabel"
runat
=
"server"
Text='<%# Eval("ID") %>'></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"Content"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblField1"
CssClass
=
"text"
runat
=
"server"
Text='<%# Eval("Content") %>'></
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadEditor
ID
=
"RadEditorEdit"
SkinID
=
"DefaultSetOfTools"
ContentFilters
=
"DefaultFilters,PdfExportFilter"
runat
=
"server"
content='<%# Bind("Content") %>'>
<
ExportSettings
OpenInNewWindow
=
"true"
>
</
ExportSettings
>
</
telerik:RadEditor
>
</
EditItemTemplate
>
<
InsertItemTemplate
>
<
telerik:RadEditor
ID
=
"RadEditorEdit"
runat
=
"server"
SkinID
=
"DefaultSetOfTools"
ContentFilters
=
"DefaultFilters,PdfExportFilter"
content='<%# Bind("Content") %>'>
<
ExportSettings
OpenInNewWindow
=
"true"
>
</
ExportSettings
>
</
telerik:RadEditor
>
</
InsertItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"Export"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"LinkButton1"
OnClick
=
"Button1_Click"
runat
=
"server"
Text
=
"PDF Export"
></
asp:LinkButton
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
</
telerik:RadGrid
>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:TelerikConnectionString2 %>"
SelectCommand="SELECT [ID], [Content] FROM [BlogPosts]" UpdateCommand="UPDATE [BlogPosts] SET [Content] = @Content WHERE [ID] = @ID"
DeleteCommand="DELETE FROM [BlogPosts] WHERE [ID] = @ID" InsertCommand="INSERT INTO [BlogPosts] ([PublishDate], [Category], [Title], [Content]) VALUES (GETDATE(), 'Foo', 'Bar',@Content)">
<
DeleteParameters
>
<
asp:Parameter
Name
=
"ID"
Type
=
"Int32"
></
asp:Parameter
>
</
DeleteParameters
>
<
InsertParameters
>
<
asp:Parameter
Name
=
"Content"
Type
=
"String"
></
asp:Parameter
>
</
InsertParameters
>
<
UpdateParameters
>
<
asp:Parameter
Name
=
"Content"
Type
=
"String"
></
asp:Parameter
>
<
asp:Parameter
Name
=
"ID"
Type
=
"Int32"
></
asp:Parameter
>
</
UpdateParameters
>
</
asp:SqlDataSource
>
</
form
>
I have following code.
1. What I want to achieve is, to keep updating label2 as program statements proceeds eg. "Loading,.... ", "Connecting....."
"Applying Changes......" "Done..". The Idea is to keep user inform about the current status , when processing takes longer time.
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Telerik"
>
<
asp:Label
ID
=
"Label2"
runat
=
"server"
ForeColor
=
"Red"
>Loading... </
asp:Label
>
<
asp:Image
ID
=
"Image1"
runat
=
"server"
Width
=
"224px"
Height
=
"48px"
ImageUrl
=
"~/Loading.gif"
>
</
asp:Image
>
</
telerik:RadAjaxLoadingPanel
>
Following is my code behind.
protected
void
RadGrid1_NeedDataSource(
object
sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
Label2.Text =
"Connecting to Source"
;
......... Long code to retrieve data from DB into UC datasource.
RadGrid1.DataSource = uc;
Label2.Text =
"Apply Results."
;
}
But this does not seem to work...... Is there a better workarond ?
-JD
<
telerik:RadStyleSheetManager
id
=
"RadStyleSheetManager1"
runat
=
"server"
>
<
StyleSheets
>
<
telerik:StyleSheetReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Skins.Editor.css"
/>
<
telerik:StyleSheetReference
Assembly
=
"Telerik.Web.UI.Skins"
Name
=
"Telerik.Web.UI.Skins.WebBlue.Editor.WebBlue.css"
/>
<
telerik:StyleSheetReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Skins.Window.css"
/>
<
telerik:StyleSheetReference
Assembly
=
"Telerik.Web.UI.Skins"
Name
=
"Telerik.Web.UI.Skins.WebBlue.Window.WebBlue.css"
/>
</
StyleSheets
>
</
telerik:RadStyleSheetManager
>
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
|
<
link
href
=
"css/MySkin/Button.MySkin.css"
rel
=
"stylesheet"
type
=
"text/css"
/>