Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
282 views
Hi,

I'm trying to export the rad grid information in pdf file but while exporting to pdf, my header data is not getting exported, not sure why it's happening or missing some settings, please let me know how can i export rad grid data to pdf file with headers.
Princy
Top achievements
Rank 2
 answered on 17 May 2013
7 answers
351 views
Hi All,
I am trying to use the GridAttachmentColumn in the Grid, but don't want to have to use an SQLDataSource control.
I have objects and data-layers for the retrieving and control of my file objects, so I was wondering how I fill out this column with the bound information from my datalayer (it is a DataSet)?
At this point, it seems I need to abandon this new column type and use ItemTemplates instead with a nested RadUpload control.
Anyone had any experience with binding this column programmatically?
Thanks,
Steele.
SKande
Top achievements
Rank 2
 answered on 16 May 2013
4 answers
781 views
I have a RadGrid on an aspx page that does not seem to page properly.  Any attempt at pressing any of the paging buttons (Next page, Last Page, 2nd page, 3rd page, etc) causes a small dark flash on the screen but does nothing otherwise.  A second attempt at pressing a button will cause the page to refresh without the grid even being rendered.

Really appreciate the help on this.

<telerik:RadAjaxManager ID="RadAjaxMgr" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="rGrid_Employee_Roster">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rGrid_Employee_Roster" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadGrid ID="rGrid_Employee_Roster" runat="server" CellSpacing="0"
GridLines="None" AllowPaging="true"
ShowGroupPanel="True" EnableLinqExpressions="False"
OnNeedDataSource="rGrid_Employee_Roster_NeedDataSource">
<GroupingSettings CaseSensitive="False" ShowUnGroupButton="True" />
<ClientSettings AllowDragToGroup="True"></ClientSettings>
<MasterTableView AutoGenerateColumns="False"
AllowFilteringByColumn="True" AllowSorting="True" AllowPaging="true" PageSize="18"
ShowGroupFooter="True"
NoMasterRecordsText="No employees for this Cost Center"
CommandItemDisplay="Top" EnableLinqGrouping="False">
<CommandItemSettings ExportToPdfText="Export to PDF" ShowAddNewRecordButton="False" ShowExportToExcelButton="True" ShowExportToPdfButton="True"></CommandItemSettings>
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="EmployeeName"
FilterControlAltText="Filter EmployeeName column" HeaderText="Name"
ReadOnly="True" SortExpression="EmployeeName" UniqueName="EmployeeName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Lmp_Num"
FilterControlAltText="Filter Lmp_Num column" HeaderText="Lmp Num"
SortExpression="Lmp_Num" UniqueName="Lmp_Num" AllowFiltering="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Position"
FilterControlAltText="Filter Position column" HeaderText="Position"
SortExpression="Position" UniqueName="Position">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Company"
FilterControlAltText="Filter Company column" HeaderText="Company"
SortExpression="Company" UniqueName="Company">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Work_Shift_Num" DataType="System.Int32"
FilterControlAltText="Filter Work_Shift_Num column" HeaderText="Shift Num"
SortExpression="Work_Shift_Num" UniqueName="Work_Shift_Num">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Type"
FilterControlAltText="Filter Type column" HeaderText="Type" ReadOnly="True"
SortExpression="Type" UniqueName="Type">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Cost_Ctr"
FilterControlAltText="Filter Cost_Ctr column" HeaderText="Cost Ctr"
UniqueName="Cost_Ctr">
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn DataField="Full_Time" DataType="System.Boolean"
FilterControlAltText="Filter Full_Time column" HeaderText="Ful Time"
SortExpression="Full_Time" UniqueName="Full_Time" AllowFiltering="False">
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn DataField="Tdy_Volunteer" DataType="System.Boolean"
FilterControlAltText="Filter Tdy_Volunteer column" HeaderText="Tdy Vol"
SortExpression="Tdy_Volunteer" UniqueName="Tdy_Volunteer"
AllowFiltering="False">
</telerik:GridCheckBoxColumn>
</Columns>
<EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>

Here is the code behind:

protected void rGrid_Employee_Roster_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    this.rGrid_Employee_Roster.DataSource = EmployeeRoster.GetDataByCostCtr(Convert.ToInt32(lbl_Cost_Center_Num.Text));
}

Tim
Top achievements
Rank 1
 answered on 16 May 2013
4 answers
137 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
192 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
217 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
200 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
421 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
91 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
154 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?