Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
293 views
Hi,

I have a question about the exportToPdf functionnality of the RadGrid. I hope you'll help me :).

I use this code to generate a radgrid to pdf format :

RadGridComparisonLines.ExportSettings.IgnorePaging =

true;

 

RadGridComparisonLines.ExportSettings.Pdf.AllowPrinting =

true;

 

RadGridComparisonLines.ExportSettings.Pdf.PageLeftMargin =

Unit.Pixel(10);

 

RadGridComparisonLines.ExportSettings.Pdf.PageRightMargin =

Unit.Pixel(10);

 

RadGridComparisonLines.ExportSettings.ExportOnlyData =

false;

 

RadGridComparisonLines.MasterTableView.ExportToPdf();


These lines of codes generate a grid in pdf format where all columns have the same width (issue).
But there are some columns which need less width than others.

how can I do to autosize the columns please ?

Thank you.

Assembly Version : 2008.2.723.20
Telerik.Web.UI.dll

Abdelhak LAKNIN
Top achievements
Rank 1
 answered on 30 Jan 2010
5 answers
117 views
Hi Team,

Please confirm if these controls are useable in ASP.NET 2.0 and also we cal export to Excel 2007 Format.
Daniel
Telerik team
 answered on 29 Jan 2010
3 answers
231 views
Hi

When my data set returns no rows the grid view control does not display at all

How can i get the grid to display but with a message saying there are no rows
Daniel
Telerik team
 answered on 29 Jan 2010
2 answers
344 views

I need a function like the ShowAlert button in this demo
http://demos1x.telerik.com/aspnet/Window/Examples/BrowserDialogBoxes/DefaultCS.aspx

However instead of invoking a popup window by a button click, as in the demo, I want to invoke the popup window inside an IF statement in the code behind of a user control.
After the user clicks "Yes" or "Cancel" the value of this user selection needs to be returned to the IF statement in the code behind.

In other words, I need almost the same thing as the demo except the modal popup window needs to be triggered in the code behind instead of by the user clicking on a button.

More specifically, I am using a RadUpload. After the user selects (browses for) a file, I check the filename.  If the name is non-standard I want a modal popup to warn the user and ask if the user wants to proceed.

 protected void buttonUpload_Click(object sender, EventArgs e)
        {
           
           FileNameType fileType = (FileNameType)Enum.Parse(typeof(FileNameType), RadComboBoxUploadType.SelectedValue);

            foreach (UploadedFile file in RadUploadSCS.UploadedFiles)
            {
           
                string mg = msgFileOK(file.FileName, RadComboBoxUploadType.SelectedItem.Text);

                if (mg.Length > 0)
...Here I want to popup the window and get a yes/cancel response back from the user

SKS
Top achievements
Rank 1
 answered on 29 Jan 2010
4 answers
233 views
I'm using a RadAjaxManager control on a page and have wired it up to several Buttons. An example button is:

<asp:Button ID="btnSubmitChanges" runat="server" Text="Submit Changes, New Term and/or Comments" OnClick="SubmitChanges" OnClientClick="return blockConfirm('<p><strong><u>WARNING!</u></strong></p><p>More text</p>', event, 650, 200,'','Submit Changes');" Width="300px" /> 

I'm using the blockConfirm function with the button. I noticed (too late) that there's a line of code in there that seems to get rid of my OnClick argument (callerObj["onclick"] = "").

The question is how to make the RadConfirm work in this instance. Do I have to break the SubmitChanges code out into a Button click handler?


Also, is it possible to remove the question mark icon?
SKS
Top achievements
Rank 1
 answered on 29 Jan 2010
2 answers
153 views
Hi I am using RadGrid on a web page and I am firing a java script function on mouse over event on a row in the RadGrid.As of now the java script function is fired as soon as the mouse is pointed over a row.I would like the java script function to be fired after a delay of 3-4 secs after the mouse is pointed over the row in the radgrid.Please suggest some code for doing this

Regards,
Naresh
Ismail Ahmed Syed
Top achievements
Rank 2
 answered on 29 Jan 2010
3 answers
494 views
Hello,

I would like to handle the OnKeyPress event to put focus on the next input control on the form when the enter key is pressed.  I have this working for textboxes and comboboxes, and can focus the dateinput in the datepicker, but the enter key is not firing the OnKeyPress client event for the datepicker's dateinput control.  The first debugger statement is hit when I enter a normal text key (e.g. '1', 'a'), but when hitting the enter key, nothing happens (the keyPressed_textbox function is never executed).  Any ideas why the enter key is not firing the event?


 
                                <telerik:RadDatePicker   
                                    DateInput-ClientEvents-OnKeyPress="keyPressed_textbox"   
                                    TabIndex="5"   
                                    runat="server"   
                                    ID="datepickerDob"   
                                    Width="180px"   
                                    MinDate="1/1/1900"   
                                    CssClass="body_copy" /> 

 
 
            function keyPressed_textbox(sender, args) {  
                debugger;  
                if ( 13 == args.get_keyCode() ) {  
 
                    /* never gets here for RadDatePicker's DateInput OnKeyPress event */ 
                }  
            } 

edit: I have a similar problem with RadComboBoxes that have MarkFirstMatch set to true - the enter key does not fire the OnClientKeyPressing event, but the event is fired when MarkFirstMatch is set to false.  Is there anything I can do about this?
Daniel
Telerik team
 answered on 29 Jan 2010
5 answers
309 views
Hi:
I have a RadPanelBar with a several RadPanelItem inside of it.

To disable or enable a panelItem on the server side I use the following code

 (this.RadPanelBar1.Items[i] as RadPanelItem).Enabled= enable
where "i" is the panel that I want to disable. With this the panel and all its controls are disabled.

But I haven't found a javascript that make the same. I've tried with this code:
 var panel=$find('RadPanelBar1');

panel.get_items().getItem(i).set_enabled(false); where "i" is the panel that I want to disable, but this time only the header is disabled. its controls are enabled.

I would like to make this:  (this.RadPanelBar1.Items[i] as RadPanelItem).Enabled= false in the client-side. Is it possible?

Thanks.






Rob
Top achievements
Rank 1
 answered on 29 Jan 2010
9 answers
140 views
Hello Team

Our web application is using Wizard skin for tabstrip from Q3 2008. But it seems not exist in newer version of Telerik (Q3 2009). I tried to customize for this wizard  but new css define may not easy with me. Can you help me to upload Wizard skin for tabstrip? I love this tabstrip style.

Thank for your help
Hung
Top achievements
Rank 1
 answered on 29 Jan 2010
2 answers
441 views
I have a simple login page that uses the RadAjaxManager and a ASP login control.  The login control uses a template with two text boxes and a RadAjaxLoadingPanel and a ASP button.  When I set the RadAjaxManager  "EnableAJAX" property to true, the enter key does not work when the user tries to login.  They have to manually click the login button.  But when I set that property to false, everything works as it should.  The user can hit the enter key after inputting the password.  They don't have to manually hit click on the button.  Here is my login.aspx.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="login" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title>Login</title> 
    <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script> 
</head> 
<body> 
    <form id="form1" runat="server"
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" ControlsToSkip="Fieldset" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" EnableAJAX="true"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Login1"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="Login1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager>     
        <fieldset id="fieldsetlogin"
            <legend></legend
 
            <asp:Login ID="Login1" runat="server" DestinationPageUrl="~/test.aspx" FailureText="<div class='error'>Invalid Login!</div>" OnAuthenticate="Login1_Authenticate"
                <LayoutTemplate> 
                    <br />                                 
                    <table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse"
                        <tr> 
                            <td> 
                                <table border="0" cellpadding="3"
                                    <tr> 
                                        <td align="center" colspan="3"
                                            <span class="bold gray">Please enter your login information.</span> 
                                        </td> 
                                    </tr>                                                 
                                    <tr> 
                                        <td align="center" colspan="3"
                                            <asp:Literal ID="FailureText" runat="server" EnableViewState="False" Text="&nbsp;"></asp:Literal> 
                                        </td> 
                                    </tr>                                             
                                    <tr> 
                                        <td> 
                                            <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="loginLabel" Width="100px">User Name:</asp:Label></td
                                        <td> 
                                            <asp:TextBox ID="UserName" runat="server" Width="225px"></asp:TextBox></td
                                        <td> 
                                            <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator></td
                                    </tr> 
                                    <tr> 
                                        <td> 
                                            <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="loginLabel" Width="100px">Password:</asp:Label></td
                                        <td> 
                                            <asp:TextBox ID="Password" runat="server" TextMode="Password" Width="225px"></asp:TextBox></td
                                        <td> 
                                            <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator></td
                                    </tr> 
                                    <tr> 
                                        <td align="right" colspan="2"
                                            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" IsSticky="true" runat="server" Skin="WebBlue" Visible="true" Transparency="30" Height="35px" BackgroundPosition="Center" EnableAjaxSkinRendering="true"
                                            </telerik:RadAjaxLoadingPanel> 
                                            <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Sign In" ValidationGroup="Login1" /> 
                                        </td> 
                                        <td>&nbsp;</td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                    </table>                                 
                </LayoutTemplate> 
            </asp:Login> 
        </fieldset> 
    </form> 
</body> 
</html> 
 

Chon
Top achievements
Rank 1
 answered on 29 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?