Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
478 views

Hi

Some of my users need to export to excel a huge quantity of information, 40.000 records or more.

i have two problems

1) The operation takes a lot of time (6 minutes or even more). How can i develop a timeout?

2) In my production server an exception is being triggered. But i cannot reproduce that exception in my development environment, so i don't know where to catch it. Below is a copy of the error i'm getting in the production server.:

========

Exception of type 'System.OutOfMemoryException' was thrown.
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.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

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:

[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
   System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity) +34
   System.Text.StringBuilder.GetNewString(String currentString, Int32 requiredLength) +73
   System.Text.StringBuilder.Append(Char value) +97
   System.IO.StringWriter.Write(Char value) +28
   System.Web.UI.HtmlTextWriter.RenderBeginTag(HtmlTextWriterTag tagKey) +534
   System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) +47
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +17
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +7
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   Telerik.Web.UI.GridTable.RenderContents(HtmlTextWriter writer) +1962
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
   Telerik.Web.UI.GridTable.Render(HtmlTextWriter writer) +1802
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +7
   Telerik.Web.UI.GridTableViewBase.Render(HtmlTextWriter writer) +27
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderForm(HtmlTextWriter nullWriter, Control form) +1045
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +2065835
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +59
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +68
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +37
   Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderPage(HtmlTextWriter nullWriter, Control page) +102
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +2065835
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
   System.Web.UI.Page.Render(HtmlTextWriter writer) +26
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +619
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +2065835
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
   System.Web.UI.Page.Render(HtmlTextWriter writer) +26
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1896
===================

I use the method "RadGrid.MasterTableView.ExportToExcel()" , Visual Studio 2005 and RadControls for ASPNET AJAX Q2 2008.

Could you help me with this?

Daniel
Top achievements
Rank 1
 answered on 24 Feb 2015
3 answers
156 views
Hi

I have added dynamically at runtime "GridTemplateColumn" from code behind that column type checkbox how will do this

then when i click button control i need find control for checkbox 
Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Feb 2015
2 answers
83 views
On our web solution, using the editor, in chrome, a tab inserts this:

<p><span class="Apple-tab-span" style="white-space: pre;"> </span></p>

not an issue, but if you immediately press (delete), the html is changed to:

<span class="Apple-tab-span" style="white-space: pre; color: #56585a; font-family: Arial, Helvetica, sans-serif; font-size: 0.8em; background-color: #93bfd9;">

It's like the tab delete sequence triggers some type of macro. 

Anyone seen anything like this? And have a potential solution?

Thanks,
Todd.
Todd A
Top achievements
Rank 1
 answered on 24 Feb 2015
1 answer
187 views
Hi all,

I'm encountering some strange behavior using RadImageEditor.

I have code that displays two images on a page.  This in itself works fine.  However, attempting to resize the image on the server side causes the first image to not display at all, and the second image to not change its size upon display, though stepping through the code and looking at the properties indicates the Height and Width values are changed as expected.  Anyone have an explanation for this behavior?  Code included below.

Thanks in advance for any insights!

--Randy


            try
            {
                RadImageEditor1.ImageUrl = PathToUrl(imagerelpath);
                Telerik.Web.UI.ImageEditor.EditableImage ei = RadImageEditor1.GetEditableImage();
                ei.Resize((int)(ei.Width * .5), (int)(ei.Height * .5));  // browser rendering works as expected (shown full size) without this line
                RadImageEditor1.Height = ei.Height + 58;
                RadImageEditor1.Width = ei.Width;
            }
            catch (Exception ex)
            {
            }

            try
            {
                RadImageEditor2.ImageUrl = PathToUrl(backuprelpath);
                Telerik.Web.UI.ImageEditor.EditableImage ei2 = RadImageEditor2.GetEditableImage();
                ei2.Resize((int)(ei2.Width * .5), (int)(ei2.Height * .5));  // browser rendering works as expected (shown full size) without this line
                RadImageEditor2.Height = ei2.Height + 58;
                RadImageEditor2.Width = ei2.Width;
            }
            catch (Exception ex)
            {
            }
Vessy
Telerik team
 answered on 24 Feb 2015
1 answer
88 views
I have created a radgrid that functions with edit inplace and updates from an outside button to update an receords that were changed.  
I also would like to use the insert button to be able to add a new record. 
I am running in to a problem with the dropdowns because on an insert there is not a value to 'bind/eval', I need the dropdown to say "select' or something similar.  
Can I combine both items in the way I am trying?  I've attached the aspx from my column.  
Please advise.

                <telerik:GridTemplateColumn  UniqueName="PartNumber" SortExpression="PartNumber" AllowFiltering ="true"
                        HeaderText="Part Number"  ReadOnly="false" ItemStyle-VerticalAlign="Top" Visible="true" >
                             <ItemTemplate>
                           <asp:DropDownList ID="DropPart" runat="server" DataSourceID="dsPartNumbers" DataTextField="PartNumber" 
                                DataValueField="CustomerPartNumberID" SelectedValue='<%# DataBinder.Eval(Container.DataItem,"CustomerPartNumberID") %>'  >
                            </asp:DropDownList>
                            </ItemTemplate>
                              <EditItemTemplate>
                                 <asp:DropDownList ID="EditDropPartNumber" runat="server" DataSourceID="dspartNumbers" DataTextField="PartNumber" AppendDataBoundItems="true"
                                DataValueField="CustomerPartNumberID" SelectedValue='<%# bind("CustomerPartNumberID") %>'>
                                  </asp:DropDownList>
                                  <asp:RequiredFieldValidator ID="Validator1" ControlToValidate="EditDropPartNumber" 
                                  ErrorMessage="*Required" runat="server" Display="Dynamic" InitialValue="-- Select --" ForeColor="Red">
                                      </asp:RequiredFieldValidator>
                                </EditItemTemplate>
                    </telerik:GridTemplateColumn>
Konstantin Dikov
Telerik team
 answered on 24 Feb 2015
1 answer
135 views
Hi

     How can I use a Rad grid to perform batch edit, Edit form and Pop-Up edit combined?

     I have a grid which uses batch edit with some drop down, check box and text box control. I want to use Edit form to edit and display another grid (which is                related to the individual rows in the first grid) by clicking on one button similar to the edit button. Also I want to show a pop-up to display and edit other related          data with the first grid on clicking on another button. How can i achieve this?

Thanks & Regards
Lijo Sebastian
Viktor Tachev
Telerik team
 answered on 24 Feb 2015
1 answer
66 views
Hello,

I have a RadGrid, this RadGrid uses an Edit Form Template containing multiple controls for user input. In particular, I am interested in how I can add existing values to a RadComboBox which has multiple checkbox options when the edit form is opened.

Currently, I have methods to get all the values I need to check from my database. I also have all other elements in the grid initialized on edit mode because they are bound in my markup. Below is the code I am trying to use to check some items in the RadComboBox (OnEditOrInsertMode handles RadGrid.OnItemCreated, getFormFactorIds is a function that returns a list of ids to be checked.):

01.protected void OnEditOrInsertMode(object sender, GridItemEventArgs e)
02.{
03.    // Initalizes the RadComboBoxFormFactor combobox like all the other controls in the form.
04.    if (e.Item is GridEditableItem && e.Item.IsInEditMode)
05.    {
06.        GridEditableItem item = (GridEditableItem) e.Item;
07.        RadComboBox formFactorComboBox = (RadComboBox) e.Item.FindControl("RadComboBoxFormFactor");
08.        List<int> formFactorIds = (List<int>) getFormFactorIds((int) ((GridEditableItem)e.Item).GetDataKeyValue("CID"));
09. 
10.        formFactorComboBox.DataBind();
11.        foreach (RadComboBoxItem rcbItem in formFactorComboBox.Items)
12.        {
13.            rcbItem.Checked = formFactorIds.Contains(int.Parse(rcbItem.Value));
14.        }
15.        formFactorComboBox.DataBind();
16.    }
17.}


But, this seems to have no effect when I verify that a particular item has values marked in the multiple select combobox, and step through the code in the debugger and watch the 'Checked' values be set to 'true'.

What is causing the 'Checked' values to be set back to false?
Am I setting the 'Checked' values in the correct handler?

Thanks
Eyup
Telerik team
 answered on 24 Feb 2015
2 answers
97 views
Hi,

I want to hide the text under control (check the attached image file).

And I want to get "SaveSettings" values like json/xml format. Is it possible?
If possible I want take them from javascript, but if it is impossible I want to know how to get this settings from code behind in xml or json format
Eyup
Telerik team
 answered on 24 Feb 2015
1 answer
53 views
Hi,
I need to find a list of filtered rows/columns value on server side. Is it possible?
As you can see on the attached file I found the value but they are a not public member

Thanks
Angel Petrov
Telerik team
 answered on 24 Feb 2015
11 answers
575 views

I have a rad grid inside a update panel.
Add a trigger in update panel on a button.
this works fine but when we click on header of grid fro sorting then it throws a error column name is not find.

Please suggest me what i will do to remove this problem. Its vary urgent
Kostadin
Telerik team
 answered on 24 Feb 2015
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
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
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?