Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
966 views
Ok, so I have a RadButton on a page and in the code-behind all that happens is a simple change of the selected view of a RadMultiPage. The problem is that the code never executes. I have no idea what is going on and can't figure out why the button won't work. I have another page that does the same thing and the button works fine, but on this page nothing happens. I click the button and it just goes back to the top of the page like you would see for an <a href="#"></a> tag. Any ideas?

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="UserInfo.aspx.cs" Inherits="DADCA.Web.Member.UserInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Dayton Defense - View My Info
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="editButton">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="UserInfoMultiPage" LoadingPanelID="win7LoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="saveButton">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="UserInfoMultiPage" LoadingPanelID="win7LoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cancelButton">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="UserInfoMultiPage" LoadingPanelID="win7LoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="win7LoadingPanel" runat="server" Skin="Windows7" />
    <telerik:RadMultiPage ID="UserInfoMultiPage" runat="server" Width="100%"
        <telerik:RadPageView ID="viewInfo" runat="server" Selected="true">
            <table width="100%">
                <tr>
                    <td width="28%" align="left">
                        <h1>View My Information</h1>
                    </td>
                    <td colspan="2" align="right" valign="middle">
                        <telerik:RadButton ID="editButton" runat="server" Text="Edit My Information" Skin="Windows7" OnClick="editButton_OnClick" AutoPostBack="true" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td colspan="3" align="center">
                        <h3><asp:Label ID="messageLabel" runat="server" /></h3>
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>Pre Name:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td valign="top">
                        <asp:Label ID="pre_name_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>First Name:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <asp:Label ID="first_name_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>Last Name:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <asp:Label ID="last_name_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>Address:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <asp:Label ID="address_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>Address Line 2 (Optional):</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <asp:Label ID="address_linetwo_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>City:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <asp:Label ID="city_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>State:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <asp:Label ID="state_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>Zip:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td valign="top">
                        <asp:Label ID="zip_label" runat="server" />  -  <asp:Label ID="zip4_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>Phone:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <asp:Label ID="phone_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>Extension:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <asp:Label ID="extension_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>Fax:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <asp:Label ID="fax_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>E-mail Address:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <asp:Label ID="email_label" runat="server" />
                    </td>
                </tr>
                <tr><td> </td></tr>
            </table>
        </telerik:RadPageView>
        <telerik:RadPageView ID="editView" runat="server">
            <table width="100%">
                <tr>
                    <td width="28%" align="left">
                        <h1>Edit My Information</h1>
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td colspan="3" align="center">
                        <h3><asp:Label ID="errorLabel" runat="server" /></h3>
                    </td>
                </tr>
                <tr>
                    <td width="28%"> </td>
                    <td colspan="2">
                        <asp:ValidationSummary ID="my_info_vSummary" runat="server" ForeColor="Red" HeaderText="User Information could not be updated. Please correct the following errors and try again:" ShowSummary="true" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3><asp:RequiredFieldValidator ID="pre_name_validator" runat="server" ControlToValidate="pre_name_textbox" ErrorMessage="Pre Name Is Required"><span style="color: Red;">*</span></asp:RequiredFieldValidator>
                          Pre Name:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td valign="top">
                        <telerik:RadTextBox ID="pre_name_textbox" runat="server"  Width="300px" Skin="Windows7" />
                        <telerik:RadToolTip ID="pre_name_tooltip" runat="server" EnableShadow="true" RelativeTo="Element" TargetControlID="pre_name_textbox" Text="(Mr., Ms., Mrs., etc...)" VisibleOnPageLoad="false" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3><asp:RequiredFieldValidator ID="first_name_validator" runat="server" ControlToValidate="first_name_textbox" ErrorMessage="First Name Is Required"><span style="color: Red;">*</span></asp:RequiredFieldValidator>
                          First Name:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <telerik:RadTextBox ID="first_name_textbox" runat="server"  Width="300px" Skin="Windows7" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3><asp:RequiredFieldValidator ID="last_name_validator" runat="server" ControlToValidate="last_name_textbox" ErrorMessage="Last Name Is Required"><span style="color: Red;">*</span></asp:RequiredFieldValidator>
                          Last Name:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <telerik:RadTextBox ID="last_name_textbox" runat="server"  Width="300px" Skin="Windows7" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3><asp:RequiredFieldValidator ID="address_validator" runat="server" ControlToValidate="address_textbox" ErrorMessage="Address Is Required"><span style="color: Red;">*</span></asp:RequiredFieldValidator>
                          Address:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <telerik:RadTextBox ID="address_textbox" runat="server"  Width="300px" Skin="Windows7" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>Address Line 2 (Optional):</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <telerik:RadTextBox ID="address_linetwo_textbox" runat="server"  Width="300px" Skin="Windows7" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3><asp:RequiredFieldValidator ID="city_validator" runat="server" ControlToValidate="city_textbox" ErrorMessage="City Is Required"><span style="color: Red;">*</span></asp:RequiredFieldValidator>
                          City:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <telerik:RadTextBox ID="city_textbox" runat="server"  Width="300px" Skin="Windows7" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3><asp:CustomValidator ID="state_custom_validator" runat="server" ClientValidationFunction="validateCombo" ControlToValidate="state_combobox" ErrorMessage="State Is Required" ><span style="color: Red;">*</span></asp:CustomValidator>
                          State:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <asp:HiddenField ID="state_hidden" runat="server" />
                        <telerik:RadComboBox ID="state_combobox" runat="server" Skin="Windows7" MaxHeight="200px">
                            <Items>
                                <telerik:RadComboBoxItem runat="server" Text="Choose" />
                                <telerik:RadComboBoxItem runat="server" Value="AL" Text="Alabama" />
                                <telerik:RadComboBoxItem runat="server" Value="AK" Text="Alaska" />
                                <telerik:RadComboBoxItem runat="server" Value="AZ" Text="Arizona" />
                                <telerik:RadComboBoxItem runat="server" Value="AR" Text="Arkansas" />
                                <telerik:RadComboBoxItem runat="server" Value="CA" Text="California" />
                                <telerik:RadComboBoxItem runat="server" Value="CO" Text="Colorado" />
                                <telerik:RadComboBoxItem runat="server" Value="CT" Text="Connecticut" />
                                <telerik:RadComboBoxItem runat="server" Value="DC" Text="District of Columbia" />
                                <telerik:RadComboBoxItem runat="server" Value="DE" Text="Delaware" />
                                <telerik:RadComboBoxItem runat="server" Value="FL" Text="Florida" />
                                <telerik:RadComboBoxItem runat="server" Value="GA" Text="Georgia" />
                                <telerik:RadComboBoxItem runat="server" Value="HI" Text="Hawaii" />
                                <telerik:RadComboBoxItem runat="server" Value="ID" Text="Idaho" />
                                <telerik:RadComboBoxItem runat="server" Value="IL" Text="Illinois" />
                                <telerik:RadComboBoxItem runat="server" Value="IN" Text="Indiana" />
                                <telerik:RadComboBoxItem runat="server" Value="IA" Text="Iowa" />
                                <telerik:RadComboBoxItem runat="server" Value="KS" Text="Kansas" />
                                <telerik:RadComboBoxItem runat="server" Value="KY" Text="Kentucky" />
                                <telerik:RadComboBoxItem runat="server" Value="LA" Text="Louisiana" />
                                <telerik:RadComboBoxItem runat="server" Value="ME" Text="Maine" />
                                <telerik:RadComboBoxItem runat="server" Value="MD" Text="Maryland" />
                                <telerik:RadComboBoxItem runat="server" Value="MA" Text="Massachusetts" />
                                <telerik:RadComboBoxItem runat="server" Value="MI" Text="Michigan" />
                                <telerik:RadComboBoxItem runat="server" Value="MN" Text="Minnesota" />
                                <telerik:RadComboBoxItem runat="server" Value="MS" Text="Mississippi" />
                                <telerik:RadComboBoxItem runat="server" Value="MO" Text="Missouri" />
                                <telerik:RadComboBoxItem runat="server" Value="MT" Text="Montana" />
                                <telerik:RadComboBoxItem runat="server" Value="NE" Text="Nebraska" />
                                <telerik:RadComboBoxItem runat="server" Value="NV" Text="Nevada" />
                                <telerik:RadComboBoxItem runat="server" Value="NH" Text="New Hampshire" />
                                <telerik:RadComboBoxItem runat="server" Value="NJ" Text="New Jersey" />
                                <telerik:RadComboBoxItem runat="server" Value="NM" Text="New Mexico" />
                                <telerik:RadComboBoxItem runat="server" Value="NY" Text="New York" />
                                <telerik:RadComboBoxItem runat="server" Value="NC" Text="North Carolina" />
                                <telerik:RadComboBoxItem runat="server" Value="ND" Text="North Dakota" />
                                <telerik:RadComboBoxItem runat="server" Value="OH" Text="Ohio" />
                                <telerik:RadComboBoxItem runat="server" Value="OK" Text="Oklahoma" />
                                <telerik:RadComboBoxItem runat="server" Value="OR" Text="Oregon" />
                                <telerik:RadComboBoxItem runat="server" Value="PA" Text="Pennsylvania" />
                                <telerik:RadComboBoxItem runat="server" Value="RI" Text="Rhode Island" />
                                <telerik:RadComboBoxItem runat="server" Value="SC" Text="South Carolina" />
                                <telerik:RadComboBoxItem runat="server" Value="SD" Text="South Dakota" />
                                <telerik:RadComboBoxItem runat="server" Value="TN" Text="Tennessee" />
                                <telerik:RadComboBoxItem runat="server" Value="TX" Text="Texas" />
                                <telerik:RadComboBoxItem runat="server" Value="UT" Text="Utah" />
                                <telerik:RadComboBoxItem runat="server" Value="VT" Text="Vermont" />
                                <telerik:RadComboBoxItem runat="server" Value="VA" Text="Virginia" />
                                <telerik:RadComboBoxItem runat="server" Value="WA" Text="Washington" />
                                <telerik:RadComboBoxItem runat="server" Value="WV" Text="West Virginia" />
                                <telerik:RadComboBoxItem runat="server" Value="WI" Text="Wisconsin" />
                                <telerik:RadComboBoxItem runat="server" Value="WY" Text="Wyoming" />
                            </Items>
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3><asp:RequiredFieldValidator ID="zip_validator" runat="server" ControlToValidate="zip_textbox" ErrorMessage="Zip Code Is Required"><span style="color: Red;">*</span></asp:RequiredFieldValidator>
                          Zip:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td valign="top">
                        <telerik:RadTextBox ID="zip_textbox" runat="server"  Width="100px" Skin="Windows7" /> - <telerik:RadTextBox ID="zip4_textbox" runat="server" Width="50px" Skin="Windows7" />
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3><asp:RequiredFieldValidator ID="phone_validator" runat="server" ControlToValidate="phone_textbox" ErrorMessage="Phone Is Required"><span style="color: Red;">*</span></asp:RequiredFieldValidator>
                          Phone:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <telerik:RadTextBox ID="phone_textbox" runat="server"  Width="150px" Skin="Windows7" Format="{0:(999) 999-9999}"/>
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>Extension:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <telerik:RadTextBox ID="extension_textbox" runat="server"  Width="75px" Skin="Windows7"/>
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3>Fax:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <telerik:RadTextBox ID="fax_textbox" runat="server"  Width="150px" Skin="Windows7"/>
                    </td>
                </tr>
                <tr><td> </td></tr>
                <tr>
                    <td width="28%" align="right">
                        <h3><asp:RequiredFieldValidator ID="email_validator" runat="server" ControlToValidate="email_textbox" ErrorMessage="E-mail Address Is Required"><span style="color: Red;">*</span></asp:RequiredFieldValidator>
                          E-mail Address:</h3>
                    </td>
                    <td width="2%"> </td>
                    <td>
                        <telerik:RadTextBox ID="email_textbox" runat="server"  Width="300px" Skin="Windows7" />
                    </td>
                </tr>
                <tr><td> </td></tr>
            </table>
            <table width="100%">
                <tr>
                    <td width="48%" align="right">
                        <telerik:RadButton ID="saveButton" runat="server"  Text="Update" OnClick="saveButton_OnClick" Skin="Windows7" />
                    </td>
                    <td width="5%"> </td>
                    <td width="47%" align="left">
                        <telerik:RadButton ID="cancelButton" runat="server"  Text="Cancel" OnClick="cancelButton_OnClick" Skin="Windows7" />
                    </td>
                </tr>
            </table>
            <telerik:RadCodeBlock ID="RadCodeBlock" runat="server">
                <script type="text/javascript">
                    function pageLoad() {
                        var combo = $find("<%= state_combobox.ClientID %>");
                        var item = combo.findItemByValue(document.getElementById("<%= state_hidden.ClientID %>").value);
                        item.select();
                    }
  
                    function validateCombo(source, args) {
                        args.IsValid = false;
                        var combo = $find("<%= state_combobox.ClientID %>");
                        var text = combo.get_text();
                        if (text.length < 1) {
                            args.IsValid = false;
                        }
                        else {
                            var node = combo.findItemByText(text);
                            if (node) {
                                var value = node.get_value();
                                if (value.length > 0) {
                                    args.IsValid = true;
                                }
                            }
                            else {
                                args.IsValid = false;
                            }
                        }
                    }
                </script>
            </telerik:RadCodeBlock>
        </telerik:RadPageView>
    </telerik:RadMultiPage>
          
</asp:Content>

My code behind is pretty simple, not really anything going on, if you think you need to see it to solve the issue just let me know.
Ianko
Telerik team
 answered on 04 Oct 2013
6 answers
217 views
Totally fed-up Team Telerik.
Just check the attachment please.

Please remind if you giving any solution please confirm it will not affect other telerik controls.

Presently we are using these Global CSS properties


html{overflow:hidden;}
html, body, form {width:auto; height:auto;}
html, body {margin:0; padding:0;}
html, body{width:100%!important; height:100%!important;}
form {width:100%!important; height:96%!important;}
html, body, form, span, label, td, th{font-family:Tahoma, Arial!important; font-size:11px!important;}
body {overflow:auto;}

h2, h3 {margin:3px 0 7px 0}
h2.feldsetLegend {font-size:12px; border-bottom:solid 1px #ccc; margin:0px 0 10px 0; padding-bottom:2px}
table{border-collapse:collapse;}

span, label {font-family:Tahoma, Arial, Verdana!important;}
h2, h3 {margin:3px 0 7px 0}
hr {border:none;border-bottom:solid 1px #999}
h2.feldsetLegend {font-size:12px; border-bottom:solid 1px #ccc; margin:0px 0 10px 0; padding-bottom:2px}


fieldset {padding:0px 5px 7px 5px;}
legend {font-weight:bold!important; font-size:11px!important}
table{width:100%;}

a.rwIcon{background-image: none !important;}
.rwTitlebarControls td {width:auto!important}

----------------------------------------------------------------------------------------------------
Thanks in Advance
Angel Petrov
Telerik team
 answered on 04 Oct 2013
1 answer
71 views
Is there a way to use the html5 textmode values for the radmaskedtextbox? I am using this control on a smartphone optimized page and i would like to force the smartphone to show a numeric keyboard insted of a alpha keyboard. This capability works with a standard asp:textbox control.
Vasil
Telerik team
 answered on 04 Oct 2013
1 answer
246 views
I have a DataTable:

PO      Customer    Order   Product     Qty
Alpha    Apple      30456   Napkins     400
Alpha    Apple      30457   Pizza       200
Alpha    Apple      30458   Schlitz     400
Beta     Google     20001   Pizza       400
Beta     Google     20002   Schlitz     200


And a RadListView

<telerik:RadListView>
       <ItemTemplate>
                    <asp:Label ID="lbl_PO" />
                    <asp:Label ID="lbl_Customer" />
                     <telerik:RadGrid>
                             <telerik:GridBoundColumn DataField="Product" />
                             <teleirk:GridBoundColumn DataField="Qty" />
                      </telerik:RadGrid>
         </ItemTemplate>
</telerik:RadListView>

The desired output is this

PO: Alpha
Customer: Apple
______________________
| Order  | Product    |  Qty   |
______________________

| 30456  | Napkins    |  400   |
______________________
| 30457  | Pizza      |  200   |
______________________
| 30458 | Schlitz    |  400   |
______________________
 
 
 
PO: Beta
Customer: Google
______________________
| Order  | Product    |  Qty   |
______________________
| 20001  | Pizza      |  400   |
______________________
| 20002  | Schlitz    |  200   |
______________________

My PO and customer will *always* be consistent across a range of orders.

I want the common PO and customer to behave like 'rows' in the listview, while the grid still shows all the data relevant to the particular PO.   What's the general way to achieve this? 




Antonio Stoilkov
Telerik team
 answered on 04 Oct 2013
1 answer
54 views
Please see the attached file.
In all other versions of IE and all other browsers it is working perfectly.
Eyup
Telerik team
 answered on 04 Oct 2013
2 answers
58 views
Hi,

I have tried the Load On Demand for RadRotator and seem like everything works fine 
    + Client has sent the request back to server
    + Server responses and send back the list "RadRotatorItemData" to Client 
However, the RadRotator can not show the items.

I have checked the jSon data and the server returns this type: "RadRotatorItemData:#Telerik.Web.UI" instead of "Telerik.Web.UI.RadRotatorItemData"

So, I don't know why the webservice returns that type, anything wrong? 

 Any help will be appriciated, thanks

P/S: please see attached file for the data response from Web Service
Dan Cao
Top achievements
Rank 1
 answered on 04 Oct 2013
6 answers
150 views
Dear all,

We are using the RadScheduler in TimelineView, grouped by employee..
Can we set the background-color by row programmatically? Would like to have a slight different color on the odd lines, like commonly seen in the RadGrid.

Cheers, Zeo Smeijsters
Mats
Top achievements
Rank 1
 answered on 04 Oct 2013
1 answer
78 views
Hi;

I'm getting the exact same behaviour as detailed in this thread: http://www.telerik.com/community/forums/aspnet-ajax/grid/error-while-exporting-radgrid-data-to-pdf.aspx but only with IE. As in the thread, I'm getting errors exporting to Excel and PDF if I choose Open from the browser's download message.

 I'm running IE9, and tried it with and without compatibility view.  Choosing Save works correctly, and I can open the resulting files with no problem.

I'm using Telerik AJAX Components 2013 Q2 NET 40.

In FireFox, I am able to Open the files without an error.  Here's the relevant code:

The alert in the onRequestStart function returns the client ID, which does contain the button ID's being tested for.
<script type="text/javascript">
    function onRequestStart(sender, args)
    {
        if
        (
            (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0)
            || (args.get_eventTarget().indexOf("ExportToPdfButton") >= 0)
        )
        {
            alert(args.get_eventTarget());
            args.set_enableAjax(false);
        }
    }
 
</script>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">
    <ClientEvents OnRequestStart="onRequestStart" />
    <AjaxSettings>
.
.
.
        <telerik:AjaxSetting AjaxControlID="ReportResultsGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ReportResultsGrid" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>

<telerik:RadGrid ID="ReportResultsGrid" runat="server" AllowPaging="True" AllowSorting="True"
    Height="100%" Width="98%" CellSpacing="0" GridLines="None" ShowGroupPanel="True"
    OnColumnCreated="ReportResultsGrid_ColumnCreated" AutoGenerateColumns="False"
    OnNeedDataSource="ReportResultsGrid_NeedDataSource" PageSize="20" OnItemCreated="ReportResultsGrid_ItemCreated">
    <ExportSettings OpenInNewWindow="True" ExportOnlyData="True" HideStructureColumns="True"
        IgnorePaging="True">
        <Pdf BorderType="NoBorder" ForceTextWrap="true" PageTopMargin="1.5in" PageBottomMargin="0.5in"
            PageLeftMargin="0.1in" PageRightMargin="0.1in">
        </Pdf>
    </ExportSettings>
    <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">
        <Scrolling UseStaticHeaders="True" />
    </ClientSettings>
    <MasterTableView PageSize="25" CommandItemDisplay="TopAndBottom">
        <CommandItemSettings ShowAddNewRecordButton="False" ShowExportToExcelButton="True"
            ShowExportToPdfButton="True" ShowRefreshButton="False" />
        <Columns>
.
.
.
[grid bound columns]
.
.
.
        </Columns>
        <PagerStyle Position="TopAndBottom" AlwaysVisible="true" />
        <CommandItemStyle HorizontalAlign="Left" />
    </MasterTableView>
    <PagerStyle PageSizes="10;25;50;100;200" Position="TopAndBottom" />
</telerik:RadGrid>

Code-behind.  I'm doing custom page sizes and hiding one of the gridBound columns.

protected void ReportResultsGrid_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        var dropDown = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
        var totalCount = ((GridPagerItem)e.Item).Paging.DataSourceCount;
        var sizes = new Dictionary<string, string>() {
            {"10", "10"},
            {"25", "25"},
            {"50", "50"}
        };
        if (totalCount > 100)
        {
            sizes.Add("100", "100");
        }
        if (totalCount > 200)
        {
            sizes.Add("200", "200");
        }
        sizes.Add("All", totalCount.ToString());
 
        dropDown.Items.Clear();
        foreach (var size in sizes)
        {
            var cboItem = new RadComboBoxItem() { Text = size.Key, Value = size.Value };
            cboItem.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID);
            dropDown.Items.Add(cboItem);
        }
        dropDown.FindItemByValue(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
    }
}
 
protected void ReportResultsGrid_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
{
    if (e.Column is GridBoundColumn)
    {
        GridBoundColumn col = (GridBoundColumn)e.Column;
        if (col.UniqueName == "ID")
        {
            col.Visible = false;
        }
    }
}
 
protected void ReportResultsGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    DataTable results = (DataTable)Session[ListReportResultsName];
 
    ReportResultsGrid.DataSource = results;
}

Any ideas on what I need to change?
Kostadin
Telerik team
 answered on 04 Oct 2013
3 answers
181 views
Hi,

Text entered in RadEditor is not retaining the last space. I want the last space to be retained and not automatically trimmed.
For Eg. If input text is "Sample Text &nbsp;", RadEditor trims the last space alone and the output is "Sample Text"

But in case we apply any styles(bold/italic etc) to the text, then it is retaining the space, as expected by my requirement.

Is there a way to retain the space at the end of the text? 

Ianko
Telerik team
 answered on 04 Oct 2013
9 answers
620 views
Hi,


we're experiencing many times the error "Invalid length for a Base-64 char array". This error is written by our web site (not web application) by the AsyncPostBackError event handler of the RadScriptManager. We've got log information for this error 50/100 times a day.
We asked to the users if they see the error during navigation through pages, but only sometimes happens. In case that they see this mistake, there is a situation wherein the user clicks on a button (that is inside a form with many refresh panel, like a web email-send form, but whose fields require single validation on entry,e.g. for the Italian tax code which is calculated on the basis of the personal data) but the refresh panel starts the postback without the refresh image (also the IE loading with the refresh image inside the tab title isn't visible). So the user click multiple times on the  button and only after three or four times sees the correct refresh visualization or the render result on the browser page.

We have an error page, that is redirected by the AsyncPostbackError handler of the master page in case of error and there is a case, always on this page, wherein the user writes some data in the entries and uses option field to change the visualization, e.g. to pass to the societies data entry form, and we have log entry for errors during this navigation that comes from event handler that I mentioned and from Error page, but the user neither see the error in the web browser and the navigation never gone to the error page, but remains on the same page. This is a very strange situation, and we ask you how is possible...

Which is the cause of this error? 

We don't use any compression or other functionality on the viewstate or on ajax requests. We can observe this error only on few pages like this one I was talking about above.

The website run over a framework 4.0 pool. We use the 2012.3.1308.40 telerik reference of 2013 q1.

thanks in advance, I hope the post is complete and understandable.
we look forward for your feedback
best regards

Emanuele
M&GF Project 
Antonio Stoilkov
Telerik team
 answered on 04 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?