Hi,
I have a problem with radgrid export command item buttons. My setup is as follows;
I have a user control within a sharepoint web part. In that user control are multiple rad grids (some housed within child user controls). Each radgrid sits within an ASP.NET update panel. Initially my issue was that while these grids were within an ASP.NET update panel, the export buttons would not work, which was fine as I understood why.
To solve this I added an event handler for the OnItemCreated event of each radgrid. Below is the code for the event handler;
While testing this code change outside of SharePoint (standard asp.net website under IIS7), this worked just fine, I could export to excel as intended, and everything else within the update panel was still working correctly with respect to ajax.
As soon as I published this out to my sharepoint environment (SharePoint 2010 SP1) to test, I ran into an issue. Export to excel still worked just fine, but after using any of the export buttons to download a document, I could no longer interact with the application, in that nothing on the web part would post back anymore (I have a number of rad combo boxes, toolbars etc both within the update panels and outside of the update panels).
I used the same markup for a rad script manager in both the non sharepoint test website and in the sharepoint masterpage of the site hosting the web part.
Do you have any ideas why this might be? Or potential work arounds? At the moment its not feasible to change from the current method of using ASP.NET update panels to telerik ajax controls without significant reworking of the application (which is quite large). So any work arounds would be much appreciated.
Thanks
I have a problem with radgrid export command item buttons. My setup is as follows;
I have a user control within a sharepoint web part. In that user control are multiple rad grids (some housed within child user controls). Each radgrid sits within an ASP.NET update panel. Initially my issue was that while these grids were within an ASP.NET update panel, the export buttons would not work, which was fine as I understood why.
To solve this I added an event handler for the OnItemCreated event of each radgrid. Below is the code for the event handler;
protected
void
rgv_ItemCreated(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridCommandItem)
{
Button btncmd = (e.Item
as
GridCommandItem).FindControl(
"ExportToExcelButton"
)
as
Button;
if
(btncmd !=
null
) { RadScriptManager.GetCurrent(
this
.Page).RegisterPostBackControl(btncmd); }
btncmd = (e.Item
as
GridCommandItem).FindControl(
"ExportToWordButton"
)
as
Button;
if
(btncmd !=
null
) { RadScriptManager.GetCurrent(
this
.Page).RegisterPostBackControl(btncmd); }
btncmd = (e.Item
as
GridCommandItem).FindControl(
"ExportToCsvButton"
)
as
Button;
if
(btncmd !=
null
) { RadScriptManager.GetCurrent(
this
.Page).RegisterPostBackControl(btncmd); }
}
}
While testing this code change outside of SharePoint (standard asp.net website under IIS7), this worked just fine, I could export to excel as intended, and everything else within the update panel was still working correctly with respect to ajax.
As soon as I published this out to my sharepoint environment (SharePoint 2010 SP1) to test, I ran into an issue. Export to excel still worked just fine, but after using any of the export buttons to download a document, I could no longer interact with the application, in that nothing on the web part would post back anymore (I have a number of rad combo boxes, toolbars etc both within the update panels and outside of the update panels).
I used the same markup for a rad script manager in both the non sharepoint test website and in the sharepoint masterpage of the site hosting the web part.
<
telerik:RadScriptManager
id
=
"ScriptManager"
runat
=
"server"
EnablePageMethods
=
"false"
EnablePartialRendering
=
"true"
EnableScriptGlobalization
=
"false"
EnableScriptLocalization
=
"true"
ScriptMode
=
"Release"
/>
Do you have any ideas why this might be? Or potential work arounds? At the moment its not feasible to change from the current method of using ASP.NET update panels to telerik ajax controls without significant reworking of the application (which is quite large). So any work arounds would be much appreciated.
Thanks