Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
108 views

Hi, 

I got a problem for using RadGrid Pagination and Export, with Hierarchy detailsTables.

Indeed When I perform an export Excel, I want to get all data in details tables.

The export is Good with all datas.

But after the dowload when i click on next , previous or collapse.

the pagination at the first level is not more activate, and all grids are expanded.

I would like at least after the download to have all grids collapse.

 

<div class="tableSimple">            <telerik:RadGrid AllowPaging="true" ID="RadGridCompteFournisseur" OnItemDataBound="RadGridCompteFour_ItemCreated"  runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None"          MasterTableView-GroupLoadMode="Client" OnNeedDataSource="RadGridCompteFour_NeedDataSource" OnDetailTableDataBind="RadGridCompteFour_DetailTableDataBind" HierarchyDefaultExpanded="false"         ClientSettings-AllowExpandCollapse="true" SortingSettings-EnableSkinSortStyles="false" ClientSettings-EnableRowHoverStyle="true" OnItemCommand="RadGridCompteFournisseur_ItemCommand"         OnItemCreated="RadGridCompteFour_ItemCreated" OnPreRender="RadGridCompteFour_PreRender"          OnExcelMLExportRowCreated="RadGridCompteFour_ExcelMLExportRowCreated" OnExcelMLExportStylesCreated="RadGridCompteFour_ExcelMLExportStylesCreated">         <ExportSettings FileName="compte" Excel-Format="Html" ExportOnlyData="true" OpenInNewWindow="true"></ExportSettings>         <MasterTableView DataKeyNames="Nom,ID" Name="Compte" ShowHeader="true" ShowHeadersWhenNoRecords="false" UseAllDataFields="true" AllowSorting="true" AllowMultiColumnSorting="false" AllowNaturalSort="false">             <SortExpressions>                 <telerik:GridSortExpression FieldName="Nom" SortOrder="Ascending" />             </SortExpressions>             <Columns>                 <telerik:GridBoundColumn DataField="Nom" HeaderText="Nom" SortExpression="Nom" UniqueName="Nom" HeaderStyle-CssClass="colImmeNomHeader" ItemStyle-CssClass="colImmeNomItem" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" AllowSorting="False">                 </telerik:GridBoundColumn>                 <telerik:GridBoundColumn DataField="Solde" HeaderStyle-CssClass="colEcheanceDateHeader" ItemStyle-CssClass="colEcheanceDateItem" SortExpression="Solde" UniqueName="Solde" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">                 </telerik:GridBoundColumn>             </Columns>             <DetailTables>                 <telerik:GridTableView   Name="Immeubles"  DataKeyNames="ImmeNo,IDDTOImmeuble" Width="100%" ShowHeader="true" ShowHeadersWhenNoRecords="false" HorizontalAlign="Right" UseAllDataFields="true">                     <SortExpressions>                         <telerik:GridSortExpression FieldName="Ville" SortOrder="Ascending" />                     </SortExpressions>                     <Columns>                         <telerik:GridBoundColumn DataField="Nom" HeaderStyle-CssClass="colImmeNomHeader" ItemStyle-CssClass="colImmeNomItem" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" AllowSorting="False">                         </telerik:GridBoundColumn>                         <telerik:GridBoundColumn DataField="Adresse"  HeaderStyle-CssClass="colImmeAdresseHeader" ItemStyle-CssClass="colImmeAdresseItem" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" AllowSorting="False">                         </telerik:GridBoundColumn>                         <telerik:GridBoundColumn DataField="Ville" HeaderStyle-CssClass="colImmeVilleNomHeader" ItemStyle-CssClass="colImmeVilleNomItem" UniqueName="Ville" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">                         </telerik:GridBoundColumn>                         <telerik:GridBoundColumn DataField="Solde" HeaderStyle-CssClass="colPlanSoldeHeader" ItemStyle-CssClass="colPlanSoldeItem noWrap" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">                         </telerik:GridBoundColumn>                     </Columns>                     <DetailTables>                         <telerik:GridTableView Name="Details"  DataKeyNames="Piece1" Width="100%" ShowHeader="true" ShowHeadersWhenNoRecords="false" HorizontalAlign="Right" UseAllDataFields="true">                             <SortExpressions>                                 <telerik:GridSortExpression FieldName="DateValeur" SortOrder="Descending" />                             </SortExpressions>                             <Columns>                                 <telerik:GridBoundColumn DataField="Piece1" HeaderStyle-CssClass="colPieceHeader" ItemStyle-CssClass="colPieceItem" SortExpression="Piece1" UniqueName="Piece1" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="50px">                                 </telerik:GridBoundColumn>                                 <telerik:GridBoundColumn DataField="DateValeur" HeaderStyle-CssClass="colValeurDateHeader" ItemStyle-CssClass="colValeurDateItem" SortExpression="DateValeur" UniqueName="DateValeur" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">                                 </telerik:GridBoundColumn>                                 <telerik:GridBoundColumn DataField="DateEcheance" HeaderStyle-CssClass="colEcheanceDateHeader" ItemStyle-CssClass="colEcheanceDateItem" SortExpression="DateEcheance" UniqueName="DateEcheance" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">                                 </telerik:GridBoundColumn>                                 <telerik:GridBoundColumn DataField="Reference" HeaderStyle-CssClass="colReferenceHeader" ItemStyle-CssClass="colReferenceItem" HeaderText="Reference" SortExpression="Reference" UniqueName="Reference" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">                                 </telerik:GridBoundColumn>                                 <telerik:GridBoundColumn DataField="Libelle" HeaderStyle-CssClass="colLibelleHeader" ItemStyle-CssClass="colLibelleItem" SortExpression="Libelle" UniqueName="Libelle" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">                                 </telerik:GridBoundColumn>                                 <telerik:GridBoundColumn DataField="Debit" HeaderStyle-CssClass="colDebitHeader" ItemStyle-CssClass="colDebitItem noWrap" HeaderText="Debit" SortExpression="Debit" UniqueName="Debit" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">                                 </telerik:GridBoundColumn>                                 <telerik:GridBoundColumn DataField="Credit" HeaderStyle-CssClass="colCreditHeader" ItemStyle-CssClass="colCreditItem noWrap" HeaderText="Credit" SortExpression="Credit" UniqueName="Credit" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">                                 </telerik:GridBoundColumn>                                 <telerik:GridBoundColumn DataField="NonLettre" HeaderStyle-CssClass="colNonLettreHeader" ItemStyle-CssClass="colNonLettreItem noWrap" HeaderText="NonLettre" SortExpression="NonLettre" UniqueName="NonLettre" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">                                 </telerik:GridBoundColumn>                                 <telerik:GridBoundColumn DataField="PDF" HeaderStyle-CssClass="colPdfHeader" ItemStyle-CssClass="colPdfItem" HeaderText="PDF" SortExpression="PDF" UniqueName="PDF" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">                                 </telerik:GridBoundColumn>                             </Columns>                         </telerik:GridTableView>                     </DetailTables>                 </telerik:GridTableView>             </DetailTables>         </MasterTableView>     </telerik:RadGrid></div>

 

 

 

protected void btnExport_Click(object sender, EventArgs e)        {                RadGridCompteFournisseur.ExportSettings.IgnorePaging = true;                RadGridCompteFournisseur.AllowPaging = true;                foreach (GridTableView tbl in RadGridCompteFournisseur.MasterTableView.DetailTables)                {                    tbl.HierarchyDefaultExpanded = true; //disable paging for the detail grids for the export operation                    tbl.AllowPaging = false;                }                RadGridCompteFournisseur.MasterTableView.HierarchyDefaultExpanded = true;            RadGridCompteFournisseur.MasterTableView.DetailTables[0].HierarchyDefaultExpanded = true;            RadGridCompteFournisseur.MasterTableView.DetailTables[0].DetailTables[0].HierarchyDefaultExpanded = true;                                    RadGridCompteFournisseur.ExportSettings.OpenInNewWindow = true;            IsModeExport = true;            RadGridCompteFournisseur.MasterTableView.DetailTables[0].DetailTables[0].GetColumn("PDF").Visible = false;            RadGridCompteFournisseur.MasterTableView.ExportToExcel();            Statistique stat = Contexte.GestStat;            if (stat != null) stat.Tick("ExportComptes");        }

 

 

 

jonathan
Top achievements
Rank 1
 asked on 07 Nov 2017
0 answers
156 views
Hello,
I want to apply different currency culture for kendo grid column.
e.g. In kendo grid I have multiple columns. 'Price' is one of them.
for Record 1's price column : I want to apply '$' currency culture.
for Record 2's price column : I want to apply 'Euro' currency culture.
for Record 3's price column: I want to apply 'Pound(GBP) currency culture.
Please can you suggest me how can I implement different currency culture for kendo grid data column, I am new to kendo UI.
Thanks & Regards,
Bhavika
Bhavika
Top achievements
Rank 1
 asked on 06 Nov 2017
19 answers
474 views
When I add a PivotGrid to the page I get the following error. Does anybody know what is causing this, all other controls work just fine.


Parser Error Message: 'EncodingConverter' is unable to convert 'System.Text.UTF8Encoding' to 'System.ComponentModel.Design.Serialization.InstanceDescriptor'.

Source Error:

Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>Line 2:  <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>


Luc
Top achievements
Rank 1
 answered on 06 Nov 2017
1 answer
62 views
I am trying to find information about defining the properties within Media Manager in order to determine if it can be used to provide WCAG 2.0 compliant time based media. I've found information for Image Manager, links, tables as it relates to accessibility, but nothing around Media Manager. 


We're currently using version 2014.2.724.45 of the editor. Thanks in advance!
Rumen
Telerik team
 answered on 06 Nov 2017
0 answers
96 views

Hi there,

Whenever I try to set the visibility for a column through the HeaderContextMenu, the column correctly disappears. I am creating dynamic reports that can be reloaded so I need to save the visibility. Thus I press a button to save the report and none of the Visibility or Display variables are set to False for either MasterTableView.RenderColumns, Columns, or ColumnSettings. Any help? 

Thanks

Christopher
Top achievements
Rank 1
 asked on 05 Nov 2017
16 answers
770 views
I'm having a bit of trouble with client-side data-binding. I've looked through the examples and haven't seen where any of them address these problems.

If you add a GridBoundColumn with Display="false" (static declaration in aspx) while using client-side data-binding things can get weird.

First off, since the grid is not populated on the server, when it originally displays on the page it mysteriously has 10 empty rows. Once the client-side data-binding occurs the 10 empty rows disappear and the correct rows appear.

Kinda.

If there are less than 10 rows of data obtained during client-side data-binding then everything is great. The invisible GridBoundColumn is invisible. Perfect. However, if there are more than 10 rows then the "invisible" column suddenly becomes visible. If the "invsible" column is the first column, than all subsequent columns are displayed under the incorrect header. I've moved the "invisible" column to the end (last column) and set its width to 0px, but it still appears.

Furthermore, if I set AllowMultiRowSelection="true" and add a GridClientSelectColumn, the selection checkbox for each row does not appear. The checkbox in the header is there, but not the one on each row. Even though there are only 2 rows displayed in the grid, if I check the box in the header to select all rows the "grid.get_masterTableView().get_selectedItems().length" property shows 10 rows selected.

I tried to get rid of these mysterious 10 empty rows by data-binding the grid to an empty list on the server in the initial page load. That works, except that the "NoRecordsTemplate" is now displayed on initial page load and is not removed when client-side data-binding occurs. Now that I think about it, I don't think the NoRecordsTemplate ever works with client-side data-binding.

I realize that client-side data-binding will have it's limitations. I don't know how much (if any) of the above items telerik might be willing and able to fix.

Here's what I'm trying to accomplish, maybe there is another way:

1. Store the row id on the client (via client-side data-binding) and be able to retrieve that id using javascript. The id should not be visible to the user (it's a Guid).

2. Use the GridClientSelectColumn with client-side data-binding.

3. Show a message when no rows exist (NoRecordsTemplate).
Mari
Top achievements
Rank 1
 answered on 04 Nov 2017
7 answers
316 views
I have one ASP. Net Ajax Rad Window, its showing URL in status bar.
Can anyone tell me that how i hide this?
oeub
Top achievements
Rank 1
 answered on 03 Nov 2017
26 answers
1.7K+ views
Hello,

I have a RadGrid with a GridButtonColumn.  I have messages in a table in my database that I want to display instead of hard-coding the message in the ConfirmText property in the designer.  How do I go about setting the ConfirmText property dynamically?

I attempted to find the GridButtonColumn in the OnItemDataBound event, but received a message that a control cannot be cast as a GridButtonColumn.

Thanks,
Corin
Top achievements
Rank 1
 answered on 03 Nov 2017
3 answers
280 views

Sometimes i want to fit quite a few Column Series into the chart, so eventually they are becoming crowded.

Is it possible to use fixed width for series, but enable scrolling?

Vessy
Telerik team
 answered on 03 Nov 2017
1 answer
122 views

I am trying to implement the export to pdf from radscheduler.  In works fine on my local and when I publish to the demo site if I am in HTTP it works fine but if I go to HTTPS it gives the following error.  App logs and server event logs are not giving any more information:

Server Error in '/' Application.

An existing connection was forcibly closed by the remote host
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Source Error:
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.


Stack Trace:

[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +249

[IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.]
   System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +8442161
System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) +57
System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +243
   System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +470
System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +8572686
   System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +230
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +645
   System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +9
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +87
   System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +1467
   System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +84
System.Net.ConnectStream.WriteHeaders(Boolean async) +816

[WebException: The underlying connection was closed: An unexpected error occurred on a send.]
   System.Net.HttpWebRequest.GetResponse() +8442708
Telerik.Web.UI.Scheduler.SchedulerExporter.GetStyleSheet(String url) +120
Telerik.Web.UI.Scheduler.SchedulerExporter.GetStyleSheetFor(String controlName, Type controlType, Page page, String pathFormatString, String defaultPathFormatString) +318
Telerik.Web.UI.Scheduler.SchedulerExporter.GetStyleSheets(Page page) +99
Telerik.Web.UI.Scheduler.SchedulerExporter.RenderControl(Page page) +695
   Telerik.Web.UI.Scheduler.SchedulerExporter.PdfExportRenderForm(HtmlTextWriter nullWriter, Control form) +154
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +151
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +49
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +1040
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5363

Peter Milchev
Telerik team
 answered on 02 Nov 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?