Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
133 views

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";

 

}


Princy
Top achievements
Rank 2
 answered on 01 Sep 2011
3 answers
142 views
Hi Telerik User,
I  am going to use RadScheduler following this tutorila link on telerik http://demos.telerik.com/aspnet-ajax/scheduler/examples/customization/defaultcs.aspx  and http://www.telerik.com/help/aspnet-ajax/scheduler-getting-started.html
but there is not enough info about in implementation . When edit Appointment its open window but there are Date filed and Dropdown not editable seems no action and Save ,Close button also not working Please help me,
Here is  the Code 

 <telerik:RadScheduler runat="server" ID="RadScheduler1" Width="100%" DayStartTime="08:00:00"
                                            DayEndTime="18:00:00" TimeZoneOffset="03:00:00" EnableDescriptionField="true" ShowFullTime ="true"
                                            AdvancedForm-EnableCustomAttributeEditing="true" AdvancedForm-EnableResourceEditing="true"
                                            DataKeyField="ID" DataSubjectField="Message_Subject" DataDescriptionField="Message_Body"
                                            DataStartField="Event_Start_Date" DataEndField="Event_End_Date" Height="500"
                                            OnAppointmentDelete="RadScheduler1_AppointmentDelete"              OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
                                            OnAppointmentInsert="RadScheduler1_AppointmentInsert">
                                            <AdvancedForm Modal="true" Width="400" />
                                            <Localization AdvancedAllDayEvent="All day"></Localization>
                                            <TimelineView UserSelectable="false" />
                                            <TimeSlotContextMenuSettings EnableDefault="true" />
                                            <AppointmentContextMenuSettings EnableDefault="true" />
                                            <Reminders Enabled="true" />
                                            <ResourceStyles>
                                                <telerik:ResourceStyleMapping Type="Calendar" Text="ROWNA Team" ApplyCssClass="rsCategoryPattern"
                                                    BorderColor="#B0CC9B" />
                                                <telerik:ResourceStyleMapping Type="Calendar" Text="My Schedule" ApplyCssClass="rsCategoryRed" />
                                            </ResourceStyles>
                                        </telerik:RadScheduler>
Error
System.InvalidOperationException: A control with ID '_scheduler$RadCalendar1' could not be found for the trigger in UpdatePanel '_scheduler$RadCalendar2Panel'.
   at System.Web.UI.UpdatePanelControlTrigger.FindTargetControl(Boolean searchNamingContainers)
   at System.Web.UI.AsyncPostBackTrigger.Initialize()
   at System.Web.UI.UpdatePanelTriggerCollection.Initialize()
   at System.Web.UI.UpdatePanel.Initialize()
   at System.Web.UI.UpdatePanel.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.AddedControl(Control control, Int32 index)
   at System.Web.UI.ControlCollection.Add(Control child)
   at Telerik.Web.UI.RadAjaxControl.CreateUpdatePanel(Control initiator, String eventName, Control updated, UpdatePanelRenderMode panelRenderMode, Unit panelHeight)
   at Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Control.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</td></tr></Table>

NEMEE
Top achievements
Rank 1
 answered on 01 Sep 2011
1 answer
89 views
Hi,

 I am using RadGrid. I have a requirement where I need to show and hide columns based on user choice. So I have used the EnableHeaderContextMenu="true" option which enabled columns hide and unhide feature. I want to save those changes to DB so that when the user visits next time he has see the customized page. Is there a way I can do that.

<telerik:RadGrid ID="rgCatalogs" runat="server" AllowPaging="True" GridLines="None"
            Skin="Office2007" Width="90%" OnItemCreated="rgCatalogs_ItemCreated"
            EnableHeaderContextFilterMenu="true" AllowSorting="false">
            <MasterTableView ShowFooter="true" EnableHeaderContextMenu="true">
            </MasterTableView>
            </ClientSettings>--%>
        </telerik:RadGrid>

Thanks in Advance,
Ram
Jayesh Goyani
Top achievements
Rank 2
 answered on 01 Sep 2011
4 answers
178 views
Hi,
I am trying to export the radgrid data to a pdf and excel file.
I cannot seem to format the headers although I can format the data rows.
I am using Need data source method for databinding and
OnItemCommand, OnItemCreated and OnExcelExportCellFormatting methods for formatting while exporting to pdf or excel.

Thanks!

Princy
Top achievements
Rank 2
 answered on 01 Sep 2011
2 answers
157 views
Hi Expert,

           I'm using the Rad Menu. When i click the menu "Rad Confirm" is appear. If user click the "Yes" i will go to func1 and "No" to func2. In side a func1 has "Rad Confirm" dialog appear and click yes/no.

           My problem is i can't capture the first "Rad Confirm" yes/no function.
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");               
                    }

            kindly please guide to me.

Best Regards,
ALEX
Top achievements
Rank 1
 answered on 01 Sep 2011
5 answers
293 views

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!!

RkW
Top achievements
Rank 1
 answered on 01 Sep 2011
2 answers
82 views
Hi Team,

Please let me know, Can I export data to 2007 excel format from RADGRID.? If yes let me know the version.

Thanks,
Babu R
Babu Raghu
Top achievements
Rank 1
 answered on 31 Aug 2011
2 answers
172 views
Hello!

I downloaded the lastest telerik for asp.net (Evaluation version for developer). and used VS 2010 for my project.

My project developed and tested in solution works fine (my computer use IIS5.1)

But it throw javascript error: 'get_postBackElement().id' is null or not an object  Telerik.Web.UI.WebResource.axd when we move to dev server.

What cause the problem? Is there anything which we didn't install on dev server or anything not in config file?

Please help to save my energy.

Thanks in advance.

Amy

I think it may be something wrong on the config file which is not suitable to IIS 7.0

Please help me to figure it out. Thanks! I use telerik.web.ui.dll Version:2011.2.712.40
<?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>
Francisco
Top achievements
Rank 1
 answered on 31 Aug 2011
4 answers
145 views
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2011.1.413.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" name="Telerik.Web.UI.WebResource" />

It would be nice to have.
Karl Mikesell
Top achievements
Rank 1
 answered on 31 Aug 2011
2 answers
129 views

Hi,
I was watching the following video on File Uploaded in Silverlight for SharEPoint 2010. I have few queries on that:

http://tv.telerik.com/watch/silverlight/video/telerik-silverlight-controls-and-sharepoint-2010-part-5

1. It is mentioned in the video that the ScratchArea folder is not required to chunk the files if we have enabled RBS.
How it differs, where does the chunk data of the large file goes if we are not using / creating the folder.

2. If i have a scenario where i am using the RBS feature of SharePoint 2010 only for files more than 10MB, in such a scenario how can i or where to put the if condition that if the file is less than 10 MB use the ScracthArea folder to chunk the large file . How we can achieve such a scenario?

3. In the video there is a mention about the this.Request.Form["RadUAG_fileName"]. Now if the file is uploaded from 3-4 browsers by different users, how the file names will be?

4. If we are enabling the RBS , whether the uploadhandler.ashx is required.  How different the project (Server Project-SharePoint Empty Project) will be in structure if we are using of have a facility to switch RBS and non-RBS implementation depending upon the size of the file.

5. this video shows the silverlight webpart which is deployed to the SharePoint Page to upload the file. What if i have a silverlight application which is out of SharePoint environment, hosted in some other server. I want to upload a huge file from the silverlight application to the SharePoint Document Library.

Thanks in advance.
Veena R

 

ramireddy
Top achievements
Rank 1
 answered on 31 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?