<telerik:GridTemplateColumn DataField="CLASS" SortExpression="SEP_CW_CRSE_CLASS" UniqueName="SEP_CW_CRSE_CLASS"> <ItemTemplate> <asp:Label ID="lbCRSEClass" runat="server" Visible="false" Text='<%# Eval("SEP_CW_CRSE_CLASS") %>' /> <asp:DropDownList ID="rdbCRSEClass" runat="server" Width="75px" OnSelectedIndexChanged="rdbCRSEClass_SelectedIndexChanged" AutoPostBack="true" CommandArgument='<%# ((GridItem)Container).ItemIndex %>' /> <%--<telerik:RadComboBox ID="rdbCRSEClass" runat="server" OnSelectedIndexChanged="rdbCRSEClass_SelectedIndexChanged" AutoPostBack="true" CommandArgument='<%# DataBinder.Eval(Container,"ItemIndex") %>'> </telerik:RadComboBox>--%> <%--<telerik:RadComboBox ID="rdbCRSEClass" runat="server" OnSelectedIndexChanged="rdbCRSEClass_SelectedIndexChanged" AutoPostBack="true" CommandArgument='<%# ((GridItem)Container).ItemIndex %>'> </telerik:RadComboBox>--%> </ItemTemplate> </telerik:GridTemplateColumn>//RadComboBoxSelectedIndexChangedEventArgs protected void rdbCRSEClass_SelectedIndexChanged(object sender, EventArgs e) { string cmdArg = ((DropDownList)sender).Attributes["CommandArgument"]; //string cmdArg = ((RadComboBox)sender).Attributes["CommandArgument"]; int ItemIndex = Convert.ToInt32(cmdArg); DropDownList rdbGEGRAD = (DropDownList)(gvClassTERM.Items[ItemIndex].FindControl("rdbGEGRAD")); DropDownList rdbCRSEClass = (DropDownList)(gvClassTERM.Items[ItemIndex].FindControl("ddltCRSEClass"));}My problem is my radgrid only exports when the user selects page 1 on the rad grid. ie. If user selects page 2 through infinity and then exports it the grid. The excel spreadsheet will have the column names but no data. But if the user is has paging page 1 selected it will export the entire data set. I stumped.
I have attaced the code that I am using. Thank you for any help
<
telerik:RadButton ID="RadBtnExport" CssClass="button" Width="150px" Text="Export to Excel" OnClick="RadBtnExport_Click" runat="server" Skin="WebBlue"></telerik:RadButton>
<
telerik:RadGrid ID="RadGridResults" runat="server"
AllowPaging="True" AllowSorting="True"
AllowFilteringByColumn="True" GridLines="None"
EnableLinqExpressions="False" PageSize="30" Width="900px" Skin="WebBlue"
EnableImageSprites="True" AllowCustomPaging="true" ExportSettings-ExportOnlyData="true"
AutoGenerateColumns="true" ExportSettings-IgnorePaging="true"
OnNeedDataSource="RadGridSearchResults_NeedDataSource" OnSortCommand="RadComboBoxReport_SortCommand">
<MasterTableView CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="false" CommandItemSettings-ShowExportToExcelButton="true">
<RowIndicatorColumn>
<HeaderStyle Width="10px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="10px"></HeaderStyle>
</ExpandCollapseColumn>
<PagerStyle Mode="NumericPages" AlwaysVisible="true"/>
<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" />
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="True" SaveScrollPosition="True">
</Scrolling>
</ClientSettings>
</telerik:RadGrid>
protected void RadBtnExport_Click(object sender, System.EventArgs e)
{
try
{
if (RadGridResults.Items.Count > 0)
{
RadGridResults.ExportSettings.ExportOnlyData =
true;
RadGridResults.ExportSettings.IgnorePaging =
true;
//call the method on export formatting
RadGridResults.ExcelExportCellFormatting +=
new Telerik.Web.UI.OnExcelExportCellFormattingEventHandler(RadGridResults_ExcelExportCellFormatting);
RadGridResults.MasterTableView.ExportToExcel();
}
}
catch (Exception ex)
{
StackTrace stackTrace = new StackTrace();
LogException.LogErrorMessage(ex, stackTrace.GetFrame(1).GetMethod().Name);
lblErrMsg.Text =
Messages.ReportExportError;
}
}
protected void RadGridResults_ExcelExportCellFormatting(object source, ExcelExportCellFormattingEventArgs e)
{
e.Cell.Style[
"mso-number-format"] = @"0000";
}
if (!clickCalledAfterRadconfirm) { eventArgs.set_cancel(true); lastClickedItem = eventArgs.get_item(); if (docno!='' && docno!=null && docno!=undefined && oppno!='' && oppno!=null && oppno!=undefined) radconfirm("Do you want to update to CRM Opportunity: <span style='color:red'>" + oppno + " </span>? <br/>", confirmCallbackFunction,450,50,"","Update to CRM");
//i wann do this way
if yes then
do func1
else
if confirm("Do you want to do func2?") then
do func2
////////////////////////////////////////////////// else radalert("<span style='color:red'> Document No. or Opportunity is empty.<br/>" + "You cannot use Update-to Crm function.<span style='color:red'>",350,80,"Update to CRM"); }I am firing the following function with a tab selection and collapse a RadPane. But then I cannot simply expand it using mouse. I can only expand it again programmatically.
function CollapsePane(paneId)
{
var splitter = $find("<%= RadSplitter1.ClientID %>");
var pane = splitter.getPaneById(paneId);
if (pane)
{
pane.collapse();
}
}
Also I need to know how to change RadPane to a specific size
(in javacript).
I expect an answer ASAP.
Thanks!!
<?xml version="1.0"?> <configuration> <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <section name="SLSCommunicationPortal.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> </sectionGroup> </configSections> <connectionStrings> <add name="CommonLogconnectionString" connectionString="Data Source=xxxxx;Initial Catalog=xxxx;Integrated Security=SSPI;Connect Timeout=120;Pooling=true; Min Pool Size=5;" providerName="System.Data.SqlClient" /> <add name="xxxx" connectionString="Data Source=xxxxx;Initial Catalog=xxxxx;Integrated Security=SSPI;Connect Timeout=120;Pooling=true; Min Pool Size=5;" providerName="System.Data.SqlClient" /> </connectionStrings> <appSettings> <add key="xxxxx" value="xxxxx"/> <add key="xxxxx" value="xxxxx" /> <add key="LogDir" value="xxxxx"/> <add key="Telerik.Skin" value="Office2010Blue"/> <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled"/> <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled"/> </appSettings> <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </assemblies> </compilation> <pages> <controls> <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/> </controls> </pages> <httpHandlers> <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/> <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/> <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/> <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/> <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/> </httpHandlers> <httpModules> <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/> <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/> </httpModules> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules runAllManagedModulesForAllRequests="true"> <remove name="RadUploadModule"/> <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode"/> <remove name="RadCompression"/> <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode"/> </modules> <handlers> <remove name="ChartImage_axd"/> <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode"/> <remove name="Telerik_Web_UI_SpellCheckHandler_axd"/> <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode"/> <remove name="Telerik_Web_UI_DialogHandler_aspx"/> <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode"/> <remove name="Telerik_RadUploadProgressHandler_ashx"/> <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode"/> <remove name="Telerik_Web_UI_WebResource_axd"/> <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode"/> </handlers> </system.webServer> <applicationSettings> <SLSCommunicationPortal.Properties.Settings> <setting name="xxxxxx" serializeAs="String"> <value>xxxxx</value> </setting> </SLSCommunicationPortal.Properties.Settings> </applicationSettings> </configuration>