Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
67 views
I am trying to make my columns not wrap in the resultant PDF document but have had no luck. Any help is appreciated. Here is my code:

        protected void ButtonExportToPDF_Click(object sender, EventArgs e)
        {
            isPdfExport = true;

            ConfigureExport();
            RadGridFacility.ExportSettings.Pdf.PaperSize = GridPaperSize.Legal;
            RadGridFacility.ExportSettings.Pdf.PageWidth = Unit.Parse("356mm");
            RadGridFacility.ExportSettings.Pdf.PageHeight = Unit.Parse("216mm");

            RadGridFacility.MasterTableView.Rebind();
            RadGridFacility.MasterTableView.ExportToPdf();
        }

 

        protected void RadGridFacility_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (isPdfExport && (e.Item is GridHeaderItem || e.Item is GridDataItem))
            {
                if (e.Item is GridDataItem)
             {
                    GridDataItem dataItem = (GridDataItem)e.Item;
                    dataItem.Style["font-size"] = "7pt";
                    dataItem.Style["white-space"] = "nowrap";

                    foreach (TableCell cell in dataItem.Cells)
                    {
                        cell.Style["white-space"] = "nowrap";
                        cell.Style["color"] = "red";
                    }
                }
                else
             {
                    GridHeaderItem headerItem = (GridHeaderItem)e.Item;
                    headerItem.Style["font-size"] = "7pt";
                    headerItem.Style["font-weight"] = "bold";
                }
            }
        }

        public void ConfigureExport()
        {
            RadGridFacility.ExportSettings.ExportOnlyData = true;
            RadGridFacility.ExportSettings.IgnorePaging = CheckBoxIgnorePaging.Checked;
            RadGridFacility.ExportSettings.OpenInNewWindow = false;
        }

Also tried code below but all columns are of type GridExpandColumn even tho they are GridBoundColumns in the aspx?? GridExpandColumn does not have the DataFormatString property

protected void RadGridFacility_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
{
       //add more column types to the conditional check if needed
       if (e.Column is GridBoundColumn)
       {
           (e.Column as GridBoundColumn).DataFormatString = "<nobr>{0}</nobr>";
       }
}

                        <telerik:RadGrid ID="RadGridFacility" runat="server" AllowPaging="True"
                            PageSize="100" AllowSorting="True"
                                AutoGenerateColumns="False" DataKeyNames="FacilityID"
                                DataSourceID="EntityDataSourceFacility" GridLines="None" Skin="Vista"
                                onitemdatabound="RadGridFacility_ItemDataBound"
                                 Font-Size="XX-Small"
                            onitemcreated="RadGridFacility_ItemCreated"
                            oncolumncreated="RadGridFacility_ColumnCreated" >

                            <PagerStyle Mode="NextPrevNumericAndAdvanced" PageButtonCount="5"
                                PagerTextFormat="Change page: {4} &amp;nbsp;Displaying page {0} of {1}. Total items: {5}." AlwaysVisible="True" />
                            <headercontextmenu><collapseanimation
                            duration="200" type="OutQuint" /></headercontextmenu>
                           
                            <mastertableview datakeynames="FacilityID"
                                datasourceid="EntityDataSourceFacility">
                                <norecordstemplate><div>There are no records to display</div></norecordstemplate>
                                <rowindicatorcolumn visible="False"><HeaderStyle Width="20px" /></rowindicatorcolumn>
                               
                                <Columns>
                                    <telerik:GridBoundColumn DataField="PermitNumber" HeaderText="Permit #" 
                                        SortExpression="PermitNumber" UniqueName="PermitNumber">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="TermNumber" HeaderText="Term"    
                                        SortExpression="TermNumber" UniqueName="TermNumber">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Mine" HeaderText="Mine"  HeaderStyle-Wrap="false"
                                        SortExpression="Mine" UniqueName="Mine">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="FTypeName" HeaderText="FType"  
                                        SortExpression="FTypeName" UniqueName="FTypeName">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  DataField="DistrictAbbrev" HeaderText="District" 
                                        SortExpression="DistrictAbbrev" UniqueName="DistrictAbbrev">
                                    </telerik:GridBoundColumn>                                   
                                    <telerik:GridBoundColumn  DataField="CountyCode" HeaderText="County" 
                                        SortExpression="CountyCode" UniqueName="CountyCode">
                                    </telerik:GridBoundColumn>                                   
                                    <telerik:GridBoundColumn  DataField="Acres" HeaderText="Acres" 
                                        SortExpression="Acres" UniqueName="Acres">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  DataField="MineralCode" HeaderText="Min" 
                                        SortExpression="MineralCode" UniqueName="MineralCode">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  DataField="TRS" HeaderText="T/R/S" 
                                        SortExpression="TRS" UniqueName="TRS">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  DataField="InitialOperation" HeaderText="Issued" 
                                        SortExpression="InitialOperation" UniqueName="InitialOperation">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  DataField="TerminationDate" HeaderText="Terminate" 
                                        SortExpression="TerminationDate" UniqueName="TerminationDate">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  DataField="PermitStatusCode" HeaderText="Status" 
                                        SortExpression="PermitStatusCode" UniqueName="PermitStatusCode">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  DataField="AnnualReportDate" HeaderText="Annual Date" 
                                        SortExpression="AnnualReportDate" UniqueName="AnnualReportDate">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  DataField="FSurface" HeaderText="Surface" 
                                        SortExpression="FSurface" UniqueName="FSurface">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  DataField="NonFed" HeaderText="NonFed" 
                                        SortExpression="NonFed" UniqueName="NonFed">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  DataField="LOMAffected" HeaderText="LOM Affect" 
                                        SortExpression="LOMAffected" UniqueName="LOMAffected">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn  DataField="Released" HeaderText="Released" 
                                        SortExpression="Released" UniqueName="Released">
                                    </telerik:GridBoundColumn>

                                </Columns>
                            </mastertableview>
                                   
                            <ClientSettings>
                               <Scrolling AllowScroll="True" UseStaticHeaders="True"  ScrollHeight="100%" />
                            </ClientSettings>
                            <FilterMenu EnableTheming="True" Skin="Vista">
                                <CollapseAnimation Duration="200" Type="OutQuint" />
                            </FilterMenu>
                        </telerik:RadGrid>

Daniel
Telerik team
 answered on 01 Sep 2009
4 answers
147 views
hello Sir,

I want a code of tree view which i want to right click on the node and when i right click i have a 3 options, "Click1" , "Click2" , "Click3" when i click option "Click1" then new node is add, when i click "Click2" option then i call the function, and when i click "Click3" Option then i call i function is in instantly update the name of the node.. or edit the node name and then i pass their name to my function parameter..

Please help me..

I am very thankful its a urgent request sir....

Thanks..
Vesko
Top achievements
Rank 2
 answered on 01 Sep 2009
2 answers
373 views
I want to position my RadDocks without using layout or zones.

The scenario is this:
I have a web page with a table-like layout (4x4 blocks).
In each of these blocks goes a web user control.
Each web user control has a RadDock.

Since RadDockZone only allows for other Telerik controls inside of it, I can't use it for positioning.

How do I make the RadDocks stay inside the blocks, and not position itself at the {0,0} position of the web page?
Henning
Top achievements
Rank 1
 answered on 01 Sep 2009
3 answers
202 views
Hi,

We seem to be having a few problems moving to the Prometheus controls as you may gather from the other threads Ive created!

Another problem we have come across relates to the RadAjaxManager when used with an ASP.NET wizard. We have recretated the error in a basic two step wizard, with a RadGrid on the second step tied to an ObjectDataSource control. When no RadAjaxManager is present, the grid only calls its databind method when the user progresses to the second step in the wizard.

However, if a RadAjaxManager is present on the page and set with the Wizards Id as the initiating and updated controls then the databind happens as soon as the page loads. This means all wizard steps are loaded and bound at the initialisation step.

The problem arose in our application where a later wizard step requires values from an earlier step in its databind process. We have modified our code in this instance, but this is far from ideal as this implementation was not there with the previous pre-prometheus RadAjaxManager.

Any help appreciated.
serg
Top achievements
Rank 1
 answered on 01 Sep 2009
1 answer
92 views
I'm having what I can only consider a CSS issue.  I'm using IE 8 and have a TabStrip on my page that has the Align property set to Justify.  When some of my pages load for some reason the last tab will be displayed below the TabStrip, and will then suddenly jump up on line with the rest of the tabs.  Although this does not "break" my site in terms of functionality it's quite annoying, since the content below my tabs jumps up as well.  A "quick clicking" user can get very annoyed by this behaviour.  Has anyone else experienced anything else like this?

Thanks,
Joe
Paul
Telerik team
 answered on 01 Sep 2009
4 answers
139 views
Hi,

I am using licensed ersion of telerik controls.
I want to use RadAjaxLoadingPanel on my page but when I drop below code, page thorws error as "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). ".
Suprizingly I used the same code in other page within the same application and it works fine.

One observation: I am not getting <telerik..> in the intellisense despite of registering '<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>'  whereas I get it on the page on which it successfully works.

 

 

 

Can you please suggest me any solution?

 

 

 

<telerik:RadAjaxLoadingPanel  ID="LoadingPanel_Main" runat="server" Transparency="30" BackColor="ControlLightLight" MinDisplayTime="3000" HorizontalAlign="Center">  
<table class="basic_text">  
<tr> 
<td style="height: 10%; width: 80%; vertical-align: middle;">  
<img alt="<%= (string)this.GetGlobalResourceObject("Resources", "LoadingMessage") %>" src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border: 2;" /> 
 </td> 
</tr> 
</table> 
</telerik:RadAjaxLoadingPanel> 

Thanks and Regards,

 

 

 

 

Mangesh

Mangesh
Top achievements
Rank 1
 answered on 01 Sep 2009
2 answers
136 views
Hi,

I am dynamically adding a UserControl to RadPanelItem.

And in UserControl I am registering some JavaScript block.(I am giving code is below)

Problem: I can't get the javascript function to fire.
Also, if I viewsource aspx page I can't see html code for usercontrol and javascript block.

UserControl:

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="UserControl1.ascx.vb" Inherits="UserControl1" %>  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="Telerik" %>  
<Telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" EnableEmbeddedScripts="true" ></Telerik:RadAjaxPanel>  
<table width="100%">  
    <tr>  
        <td>  
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>     
            <asp:Button ID="buttonClear" runat="server" Text="Clear" Width="46" UseSubmitBehavior="false"  
                CausesValidation="false" OnClientClick="ClearMe();return false" />  
        </td>  
    </tr>  
</table> 

User Control Page_load Event:
        Dim script1 As New StringBuilder 
        script1.AppendLine("<script language='javascript' type='text/javascript'>") 
        script1.AppendLine("    function ClearMe(){ ") 
        script1.AppendLine("        alert();") 
        script1.AppendLine("        document.getElementById(" & TextBox1.ClientID & ").value = ''; ") 
        script1.AppendLine("</script>") 
 
        'I tried 
    'Me.Controls.Add(New LiteralControl(clearScript.ToString())) 
 
        'I tried 
        'ScriptManager.RegisterStartupScript(Parent.Page, Me.GetType(), "ClearBox", script1.ToString, True) 
 
        'I tried 
        If Not Parent.Page.ClientScript.IsStartupScriptRegistered("ClearBox") Then 
            Parent.Page.ClientScript.RegisterStartupScript(Me.GetType(), "ClearBox", script1.ToString, True) 
        End If  
Paul
Telerik team
 answered on 01 Sep 2009
0 answers
491 views
Hi guys,

While fixing one bug, we introduced another which causes the load on demand mechanism to stop working after you press more than one character in the input area of the combobox. The problem is already fixed and you can download the latest internal build from Your Account (Version Number 2009.2.831 or later).

Alternatively, you can add the following javascript code just after the ScriptManager / RadScriptManager declaration:

<script type="text/javascript"> 
    Telerik.Web.UI.RadComboBox.prototype.get_endOfItems = function() { return false; }; 
</script> 


Please accept our sincere apologies.
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 01 Sep 2009
5 answers
132 views
Hello,

I am having an issue with a RadDock not collapsing in IE.  We have the following code:

<asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
        <ContentTemplate> 
            <telerik:RadDockLayout ID="RadDockLayout1" runat="server" Skin="WebBlue" OnSaveDockLayout="RadDockLayout1_SaveDockLayout" 
                OnLoadDockLayout="RadDockLayout1_LoadDockLayout"> 
                <div class="span-15 append-1"> 
                    <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="200"> 
                        <telerik:RadDock ID="RadDock1" AutoPostBack="true" CommandsAutoPostBack="true" DockMode="Docked" runat="server" 
                            Title="Welcome" DefaultCommands="ExpandCollapse" > 
                            <ContentTemplate> 
                                <div class="dockWrap"> 
                                    <asp:Literal ID="Literal1" runat="server" meta:resourcekey="homeWelcome"></asp:Literal> 
                                </div> 
                            </ContentTemplate> 
                        </telerik:RadDock> 
                    </telerik:RadDockZone> 
                </div> 
                <div class="span-8"> 
                    <telerik:RadDockZone ID="RadDockZone2" runat="server" MinHeight="200"> 
                        <telerik:RadDock ID="RadDock2" AutoPostBack="true" CommandsAutoPostBack="true" DockMode="Docked" runat="server" 
                            meta:resourcekey="RadDockSpendYourPoints" DefaultCommands="ExpandCollapse"> 
                            <ContentTemplate> 
                                <uc2:SpendYourPoints ID="SpendYourPointsCtl" runat="server" /> 
                            </ContentTemplate> 
                        </telerik:RadDock> 
                    </telerik:RadDockZone> 
                </div> 
            </telerik:RadDockLayout> 
        </ContentTemplate> 
    </asp:UpdatePanel> 


It's a very simple dock layout right now, and we have seen this issue since we have first placed docks in our pages.  We have another page on our site that has an even simpler dock on it, and it does not work either.  The behavior is, in IE clicking on the collapse button does nothing, but if you drag the dock around, then click on the collapse button it works.  In Firefox the collapse button works perfectly the first time you click it.

We are using the 2009.2.701.35 version of the controls.

Thanks,
Gene
Gene
Top achievements
Rank 1
 answered on 01 Sep 2009
1 answer
115 views
I want to remove the row from the grid how to remove?

 In my grid content the 4 column last column contains the Remove button column on each row. when i click that button i want to remove that row ...

                                        <telerik:GridBoundColumn Aggregate="Sum" DataField="EstTrials" DataType="System.Int32"
                                            FooterText="Total : "  HeaderText="Trials" SortExpression="EstTrials" UniqueName="Trials :">
                                        </telerik:GridBoundColumn>

                                        <telerik:GridBoundColumn Aggregate="Sum" DataField="EstCost" DataFormatString="{0:c}" FooterText = "Total Sum"
                                            DataType="System.Decimal"  HeaderText="Cost" SortExpression="EstCost" UniqueName="Cost :">
                                        </telerik:GridBoundColumn>
                                      
                                        <telerik:GridButtonColumn ButtonType="ImageButton" HeaderText="Remove" ImageUrl="images/Delete.gif">
                                        </telerik:GridButtonColumn>




How to remove on clicking image button  ? using above code /
Vlad
Telerik team
 answered on 01 Sep 2009
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?