Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
112 views
Hi,

I have question here related to Rad Grid PDF Export.

Is there any way to avoid hard coding width inside the table (<table width="70px">), In our scenario, we are getting the width from CSS file but it fails while we do export data to Pdf file, we get very weird server error, pasted below-

We don't want to hard code this width inside the table, please suggest some alternative way of doing it.

<telerik:GridTemplateColumn UniqueName="Symbol">
                    <HeaderTemplate>
                        <asp:Label ID="labelHSymbol" runat="server" Text="Symbol"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table width="70px">
                            <colgroup>
                                <col />
                            </colgroup>
                            <tr>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="labelSymbol" runat="server" Text='<%# Bind("Symbol") %>'></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>

Server Error in '/' Application.
System.SystemException: At least one of minimum, optimum, or maximum IPD must be specified on table.
  at Telerik.Web.Apoc.ApocDriver.FireApocError(String message)
  at Telerik.Web.Apoc.Fo.Flow.Table.SetIPD(Boolean bHasProportionalUnits, Int32 maxAllocIPD)
  at Telerik.Web.Apoc.Fo.Flow.Table.CalcFixedColumnWidths(Int32 maxAllocationWidth)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
  at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)
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.SystemException: System.SystemException: At least one of minimum, optimum, or maximum IPD must be specified on table.
  at Telerik.Web.Apoc.ApocDriver.FireApocError(String message)
  at Telerik.Web.Apoc.Fo.Flow.Table.SetIPD(Boolean bHasProportionalUnits, Int32 maxAllocIPD)
  at Telerik.Web.Apoc.Fo.Flow.Table.CalcFixedColumnWidths(Int32 maxAllocationWidth)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
  at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
  at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
  at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)
 
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:
 
 
[SystemException: System.SystemException: At least one of minimum, optimum, or maximum IPD must be specified on table.
   at Telerik.Web.Apoc.ApocDriver.FireApocError(String message)
   at Telerik.Web.Apoc.Fo.Flow.Table.SetIPD(Boolean bHasProportionalUnits, Int32 maxAllocIPD)
   at Telerik.Web.Apoc.Fo.Flow.Table.CalcFixedColumnWidths(Int32 maxAllocationWidth)
   at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
   at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
   at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area)
   at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area)
   at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area)
   at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area)
   at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
   at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
   at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
   at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
   at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
   at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
   at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)]
   Telerik.Web.Apoc.ApocDriver.FireApocError(String message) +82
   Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader) +701
   Telerik.Web.Apoc.ApocDriver.Render(XmlReader inputReader, Stream outputStream) +192
   Telerik.Web.Apoc.ApocDriver.Render(TextReader inputReader, Stream outputStream) +43
   Telerik.Web.UI.Grid.Export.TableViewExporter.PdfExportRenderForm(HtmlTextWriter nullWriter, Control form) +1120
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +8827569
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +31
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   Telerik.Web.UI.Grid.Export.TableViewExporter.PdfExportRenderPage(HtmlTextWriter nullWriter, Control page) +92
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +109
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060
 
 
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Vivek
Top achievements
Rank 2
 answered on 16 May 2013
3 answers
168 views
I have had multiple complaints from clients about this.  The problem is that when you use mainly IE9 junk code will be added to the radeditor just by typing.  I have even reproduced this in the RadEditor Demo just click into the ul (which by the way takes multiple clicks) and then press the backspace key.  As soon as you do that you should see that the editor adds &nbsp;&nbsp; (viewed by switching to source) for apparently no reason it didn't exist before pressing the backspace key and only exits after pressing the backspace key.  In my editor I sometimes get 8 or 9 &nbsp; when pressing the backspace key.  Also I have seen (usually when there is an unclosed tag) it adding between 3-8 </div> or closing tags when only one is necessary. However that is on save and then looking at the code in the editor again.  I am also doing a Server.HtmlEncode(RadEditor1.Content) and storing that in the database.  Let me know if there is a fix for this other than forcing IE8 compatibility mode.
Misho
Telerik team
 answered on 16 May 2013
0 answers
202 views
I am working with radautocompletebox to fetch email addresses for a user from sharepoint userprofile. 
i have a webservice method created that returns the matching email address. 
the first time it works and when i search again for another user or same user whenever i type anything in the box it throws the erro called object refrence not set to an instance of object. but if i reload the page again then it works. 

here is the code for my webservices and the rad autocompletebox. 
//error i am getting at the browser when i type anything second time in the radautocompletebox...
 
 
SCRIPT5022: Sys.InvalidOperationException: Type Telerik.Web.UI.AttributeCollection has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
ScriptResource.axd?d=QJ81aqhAwulu2hIOFMDEkrm2EPI_p5Rwn1qI6uFkGM6jPgRdNCdVCW-Ayu0H8f67BVUhz1dDf0p53SEzAsTbe86n4C8no9dnNoDIOecQwHTcrKnohckOhEi-82CZIS9S59Q-OnLMc6Zo--sMwRT5nIG_jACybbgI7netGoKwKlFGkZtn0&t=ffffffffb868b5f4, line 1717 character 42
 
SEC7115: :visited and :link styles can only differ by color. Some styles were not applied to :visited.
 
  
 
  
 
//web service method that returns the selected email address of the input typed in the radautcompletebox
[WebMethod]
 
public  AutoCompleteBoxData FilterEmailaddress(RadAutoCompleteContext context)
 
        {
 
            string prefixText = context.Text.ToString();      
 
           
 
            List<AutoCompleteBoxItemData> result = new List<AutoCompleteBoxItemData>();
 
            AutoCompleteBoxData dropdowndata = new AutoCompleteBoxData();
 
            List<String> existingemailadd = UserEmailAddress();
 
            var q = from string s in existingemailadd
 
                    where s.ToLower().StartsWith(prefixText.ToLower().Trim())
 
                    select s;
 
            foreach (string s in q)
 
            {
 
                AutoCompleteBoxItemData itemdata = new AutoCompleteBoxItemData();
 
                itemdata.Text = s;
 
                itemdata.Value = s;
 
                result.Add(itemdata);
 
  
 
            }
 
  
 
            if (result.Count > 0)
 
            {
 
                dropdowndata.Items = result.ToArray();
 
            }
 
  
 
            return dropdowndata;
 
        }
 
  
 
//list returing the emailaddresses for all users from the userprofile
 
        private  List<String> UserEmailAddress()
 
        {
 
            List<String> emailaddress = new List<string>();
 
            HttpContext context = System.Web.HttpContext.Current;
 
            string protocol = context.Request.ServerVariables["HTTPS"].ToString().Equals("ON", StringComparison.CurrentCultureIgnoreCase) ? "https" : "http";
 
            string port = context.Request.ServerVariables["SERVER_PORT"].ToString();
 
            string server = context.Request.ServerVariables["Server_Name"].ToString();
 
            string address = string.Format("{0}://{1}:{2}", protocol, server, port);
 
            SPSecurity.RunWithElevatedPrivileges(delegate
 
                {
 
                    using (SPSite site = new SPSite(address))
 
                    {
 
                        try
 
                        {
 
                            SPServiceContext servicecontext = SPServiceContext.GetContext(site);
 
                            UserProfileManager userProfileManager = new UserProfileManager(servicecontext);
 
                            foreach (UserProfile user in userProfileManager)
 
                            {
 
                                string emailadd = (string)user["WorkEmail"].Value;
 
                                emailaddress.Add(emailadd);
 
  
 
  
 
                            }
 
  
 
                        }
 
                        catch (Exception ex)
 
                        {
 
                            
  
 
  
 
                        }
 
                    }
 
                });
 
  
 
            return emailaddress;
 
  
 
  
 
        }
 
  
 
  
// Radautocompletebox in aspx
 
<telerik:RadAutoCompleteBox ID="RadAutoCompleteBox1" AllowCustomEntry="true"
 
                    DropDownHeight="150px" DropDownWidth="250px" runat="server" InputType="Text"
 
                    Filter="Contains">
 
                    <TextSettings SelectionMode="Single" />
 
                    <WebServiceSettings Path="/_layouts/WebServices/emailService.asmx"
 
                        Method="FilterEmailaddress" />
 
                </telerik:RadAutoCompleteBox>
Uttam Dhakal
Top achievements
Rank 1
 asked on 16 May 2013
5 answers
173 views
http://itweb.ca/JobSeeker/CreateNewUser.aspx

In google chrome the combobox works and in ie it does not.

Is this a bug?
Dimitar Terziev
Telerik team
 answered on 16 May 2013
1 answer
401 views
I have a load on demand RadTreeView displaying perfectly in my project, however only the root node and the root node's child nodes react to being selected; as in RadTreeView.GetSelectedCount returns 0 when a node is selected that is a child of a root node child node, and RadTreeView.SelectedNodes[0] throws an out of range exception in the same scenario.

Any ideas?

Thanks,
Matt
Boyan Dimitrov
Telerik team
 answered on 16 May 2013
3 answers
80 views
I have this set to true however on the advanced form it still only shows time from 8am - 5:30pm.
Brian
Top achievements
Rank 1
 answered on 16 May 2013
5 answers
149 views
Test environment:
Telerik.Web.Design version 2011.1.413.35
Platform: Windows Server 2003 SP2, Internet Explorer 7.0 (7.0.5730.13)
Silverlight on client: version 5.1.10411.0

Inside our web application, we're using the RadAsynUpload control to show the red/green color solid dot to indicate success/failure of loading of client file(s). The following javacript has been added to disable flash and use the Silverlight

<script type="text/javascript">

//Disable usage of flash in favor of Silverlight.

Telerik.Web.UI.RadAsyncUpload.Modules.Flash.isAvailable =

 

function () { return false; };

</script>


The issue we're having is the control behavior is correct on my local machine (IE 9.0). But in the VM environment (pseudo production) as described earlier, the red dot is displayed even if the client file loaded is a small and not opened anywhere else.
The same file if I try to open in my local machine, the green dot is displayed indicating success.
Here's the additional relevent code snippet:

<telerik:RadAsyncUpload ID="RawFileRadAsyncUpload" runat="server"
                MultipleFileSelection="Automatic" Skin="Windows7" OnClientFileUploadFailed="OnClientFileUploadFailed">
                <Localization Select="Browse..." />
            </telerik:RadAsyncUpload>


Javascript:
 function OnClientFileUploadFailed(sender, args) {
                    document.getElementById('<%=ErrorLabel.ClientID %>').innerHTML = args.get_message();
                    args.set_handled(true);
                }
Please advise, if we're missing anything. Thanks!

Hristo Valyavicharski
Telerik team
 answered on 16 May 2013
2 answers
289 views
I am updated my project to utilize the RadAsynchUpload control and cannot get the FileUploaded event to fire. I am using the control in two places, one just a page with an upload button and the other inside of a RadGrid. Everything is working fine in the RadGrid. I am able to select the file and then click the update button, where it is firing off the FileUploaded event. For some reason, this is not working in the standalone sense. I can't seem to understand what I'm missing.

<telerik:RadAsyncUpload ID="radAsyncUpload" runat="server" EnableInlineProgress="true" MaxFileInputsCount="1" OnClientFileUploaded="onClientFileUploaded" OnClientFileUploadRemoved="onClientFileUploadRemoved" PostbackTriggers="radUpload" />
 
<telerik:RadButton ID="radUpload" runat="server" Text="Upload" Enabled="false" CausesValidation="false" />
 
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
      <script type="text/javascript">
          function onClientFileUploaded(sender, args) {
              var radUpload = $find("<%=radUpload.ClientID %>");
 
              radUpload.set_enabled(true);
          }
          function onClientFileUploadRemoved(sender, args) {
              var radUpload = $find("<%=radUpload.ClientID %>");
 
              radUpload.set_enabled(false);
          }
      </script>
 </telerik:RadScriptBlock>
Plamen
Telerik team
 answered on 16 May 2013
2 answers
143 views
Hi

Is there any posibility that user confirm his action before onclick method start
somethin like this

<telerik:RadButton ID="btnEdit" runat="server" OnClientClicked="ConfirmEdit" OnClick="btnEdit_Click"></telerik:RadButton>

So, I would like that in JS user confirm his action in ConfirmEdit method and after that if he clicked on 'OK' to call btnEdit_Click method on server side

Petar
Top achievements
Rank 1
 answered on 16 May 2013
1 answer
99 views
Hi,

Is it possible to invert a Radbutton? If possible, someone please help with a solution

Thanks,
Merlin
Princy
Top achievements
Rank 2
 answered on 16 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?