Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
64 views
Is there an example of related combo boxes using a WCF service. I'm fimilar with the related combobox example that uses server side code.

Thanks.
Dimitar Terziev
Telerik team
 answered on 07 Dec 2011
1 answer
143 views
Using your simple example "Monitoring Custom Progress" does not update anything but elapsed time. 
http://demos.telerik.com/aspnet-ajax/upload/examples/customprogress/defaultcs.aspx

However, the codebehind runs and when completed the progress UI disappear as expected.
Changing the Culture sometimes makes the progress UI show the complete progress.
Stopping the debug and rerun the same code will not show progress.

My current Culture is da-DK, changing the page culture to en-US does not do the trick though.
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Upload2.aspx.cs" Inherits="PackageManagement.Pages.Common.Upload2" UICulture="en" Culture="en-US" %>

Please advise. My code:
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Upload2.aspx.cs" Inherits="PackageManagement.Pages.Common.Upload2" UICulture="en" Culture="en-US" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
 
    <asp:button ID="buttonSubmit" runat="server" Text="Submit" OnClick="buttonSubmit_Click" CssClass="RadUploadButton" />           
    <telerik:RadProgressManager id="Radprogressmanager1" runat="server" />           
    <telerik:RadProgressArea id="RadProgressArea1" runat="server"
        Culture="en-US" DisplayCancelButton="True" HeaderText="Uploading files" />
    <br /><br /><br /><br /><br /><br />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
Codebehind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using Telerik.Web.UI.Upload;
 
namespace PackageManagement.Pages.Common
{
    public partial class Upload2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                //Do not display SelectedFilesCount progress indicator.
                RadProgressArea1.ProgressIndicators &= ~ProgressIndicators.SelectedFilesCount;
                //RadProgressArea1.Culture = System.Globalization.CultureInfo.CurrentCulture;
                //RadProgressArea1.Culture = new System.Globalization.CultureInfo("da");
            }
            RadProgressArea1.Localization.Uploaded = "Total Progress";
            RadProgressArea1.Localization.UploadedFiles = "Progress";
            RadProgressArea1.Localization.CurrentFileName = "Custom progress in action: ";
        }
 
        protected void buttonSubmit_Click(object sender, System.EventArgs e)
        {
            UpdateProgressContext();
        }
 
        private void UpdateProgressContext()
        {
            const int total = 100;
 
            RadProgressContext progress = RadProgressContext.Current;
            progress.Speed = "N/A";
 
            for (int i = 0; i < total; i++)
            {
                progress.PrimaryTotal = 1;
                progress.PrimaryValue = 1;
                progress.PrimaryPercent = 100;
 
                progress.SecondaryTotal = total;
                progress.SecondaryValue = i;
                progress.SecondaryPercent = i;
 
                progress.CurrentOperationText = "Step " + i.ToString();
 
                if (!Response.IsClientConnected)
                {
                    //Cancel button was clicked or the browser was closed, so stop processing
                    break;
                }
 
                progress.TimeEstimated = (total - i) * 100;
                //Stall the current thread for 0.1 seconds
                System.Threading.Thread.Sleep(100);
            }
        }
 
    }
}

Current version is 2011.3.1115.40
Dimitar Terziev
Telerik team
 answered on 07 Dec 2011
4 answers
881 views
Hi

I just started a new project were ASP.NET Ajax Teleriks components are used.
We use a RadGrid to present the result of a db search and a simple ASP.NET Button ctrl to submit the search. This button is, as I understand it, ajaxified:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
        DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="buttonSearch">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgCustomers" />
                </UpdatedControls>
            </telerik:AjaxSetting>  
            ....

rgCustomers is the ID of the RadGrid ctrl.

When this button is pressed on error occurs:
Uncaught TypeError: Cannot read property 'id' of undefined
The callstack is:

            Telerik.Web.UI.RadAjaxControl._initializeRequestScriptResource.axd:107
   Type$callBaseMethodScriptResource.axd:1261
   Telerik.Web.UI.RadAjaxManager._initializeRequestScriptResource.axd:662
   $type.createDelegateScriptResource.axd:628
   $type.getHandlerScriptResource.axd:4338
   Observer$raiseEventScriptResource.axd:2685
   PageRequestManager$_onFormSubmitScriptResource.axd:1355
   PageRequestManager$_doPostBackScriptResource.axd:911
   $type.createDelegateScriptResource.axd:628
   WebForm_DoPostBackWithOptionsWebResource.axd:42
   PageRequestManager$_doPostBackWithOptionsScriptResource.axd:916
   $type.createDelegateScriptResource.axd:628
   (anonymous function)Customers.aspx:1217
          onclick

and the RadGrid is not updated dispite that AjaxRequest event fired, an updated datasource was set and DataBind() method of the RadGrid ctrl was called.

I should say that everything works if you tab to the button and then press enter. And after this even mouse clicks works.
Problem seem to occur using all browsers (IE,FF,chrome)

Any ideas?

Thanks
Mira
Telerik team
 answered on 07 Dec 2011
8 answers
212 views
For some reason, I am not getting OnFileUploaded to fire when I inherit from RadAsyncUpload in my custom web server component. Could someone tell me whether this is possible or not?

Regards,
Alex
Peter Filipov
Telerik team
 answered on 07 Dec 2011
3 answers
48 views
Hello,

I am using radcontrols for asp.net ajax Q2 2011.  I place two RadListBoxes within a RadPanelBar.  The transfer buttons get enabled once in a while and only when the user refreshes the cache  -- it works consistently in Firefox but not in IE.

Please help.  Here's the code.
                                    <radTS:RadPanelItem runat="server" Text="Groups">
                                                <Items>
                                                    <radTS:RadPanelItem runat="server" Value="GroupsTemplatedItem">
                                                        <ItemTemplate>
                                                            <!-- Groups -->
                                                            <div class="prop_item_wrap">
                                                                <table ID="tblgroups" class="tbl_groups">
                                                                    <tr>
                                                                        <td class="directive" colspan="4">
                                                                            Select fields from the Available list in the order you want them to be grouped.
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td>
                                                                            Available Fields:</td>
                                                                        <td>
                                                                             </td>
                                                                        <td>
                                                                            Selected Fields:</td>
                                                                        <td>
                                                                             </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td colspan="4">
                                                                            <asp:Panel ID="panelGroups" runat="server">
                                                                            <radTS:RadListBox ID="RadListBoxGroupAvailable" runat="server" Width="200px" Height="200px"      SelectionMode="Multiple"  AllowTransfer="true"   TransferToID="RadListBoxGroupSelected" TransferMode="Move" AllowTransferOnDoubleClick="true">
     
</radTS:RadListBox>
  
                                                                            <radTS:RadListBox ID="RadListBoxGroupSelected" runat="server" Width="200px" Height="200px"     SelectionMode="Multiple" AllowReorder="true"  >
      
</radTS:RadListBox>
                                                                            </asp:Panel>
                                                                        </td>
  
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                        </ItemTemplate>
                                                    </radTS:RadPanelItem>
                                                </Items>
                                            </radTS:RadPanelItem>
Bozhidar
Telerik team
 answered on 07 Dec 2011
1 answer
81 views
Hello Telerik team.

I have a problem with Tab scrolling.
I dynamically created Radtab on the RadTabStrip by Button Click event.
The Last Created Radtab does not appear RadTabStrip Area. It's in Second Row.
I have tested latest version. Q3 version. It still has problem.

I captured Screenshot and attaching source code.

<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="OnlyTab._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    <asp:Button ID="Button1" runat="server" Text="Button" /><br />
        <telerik:RadTabStrip ID="RadTabStripContent" runat="server" ScrollChildren="true" dir="LTL" Visible="true" Height="27" Width="100%" >
        <TabTemplate>
            <asp:Label ID="LabelTabName" runat="server" Text='<%# DataBinder.Eval(Container, "Text") %>' />
            <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/DeleteTab.gif" onclick="javascript:alert('hi hello greeting');" />
        </TabTemplate>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="RadMultiPageContent" runat="server" />
    </form>
</body>
</html>

Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
 
        Label1.Text = (RadTabStripContent.Tabs.Count + 1)
 
        Dim tab As RadTab = New RadTab
        tab.Text = "RadTabTest" + (RadTabStripContent.Tabs.Count + 1).ToString()
        tab.Selected = True
        RadTabStripContent.Tabs.Add(tab)
        RadTabStripContent.DataBind()
 
 
    End Sub
Bozhidar
Telerik team
 answered on 07 Dec 2011
6 answers
307 views
Dear telerik  team,

                  In Radlistbox contains number of items, Am finding using textbox. using tem.scrollIntoView am achieving scroll the position to change. I need to show as first in the item. Is any script to show item as top. Below coding is am using.
ASPX
--------
<table border="0" cellpadding="0" cellspacing="0">
             <tr>
        <td>
                   <telerik:RadTextBox ID="txtSelectPgm" TabIndex="1" runat="server" Width="295px" onpaste="filterListBoxPaste()" ClientEvents-OnFocus="focusto" ClientEvents-OnKeyPress="filterListBox" SelectionOnFocus="SelectAll">
                   </telerik:RadTextBox >
                          </td>
               </tr>
         <tr>
             <td>
            <telerik:RadListBox ID="lstSelectPgm" TabIndex="4" OnClientSelectedIndexChanged="GetProgramName"
             runat="server"
                   Width="300px"
                Height="390px" AutoPostBack="false">
                   </telerik:RadListBox>
          </td>
          </tr>
      </table>
 
JS:
----
 
function filterListBox(sender, e) {
    var SelectPrgm;
    var list = $find("ctl00_Content_lstSelectPgm");
    SelectPrgm = $find("ctl00_Content_txtSelectPgm");
    if (searchText == "")
        searchText = e.get_keyCharacter();
    else
        searchText = SelectPrgm.get_value() + e.get_keyCharacter();
    var items = list.get_items();   
    for (var i = 0; i < items.get_count(); i++) {
        var item = items.getItem(i);       
        if (item.get_text().toLowerCase().startsWith(searchText.toLowerCase())) {
            item.select();
            item.ensureVisible();
            item.scrollIntoView;           
            break;
        }
    }
    SelectPrgm.set_textBoxValue(searchText);
    setTimeout(filterText, 10);
}

   
Peter Filipov
Telerik team
 answered on 07 Dec 2011
5 answers
106 views
I'm new to Telerik controls and I would like to know who to achieve the same (as the attached picture) with radMenu?

Also where are the skins and how do I add them to a project?
Kate
Telerik team
 answered on 07 Dec 2011
2 answers
59 views
Hi Telerik Friends,

I am working on an application which uses RadGrids pretty heavily.  In order to make sure that the grids are up to date, I've put them on a timer to rebind at a regular interval.  This causes some problems though, and just seems heavy handed.

Is there a way to have my grids rebind only when there are explicit changes to the data-source?

I have some ideas of how to do this, but it could take a lot of time that I don't have!

Thanks for any help,

Dan
Antonio Stoilkov
Telerik team
 answered on 07 Dec 2011
4 answers
531 views
Hi,
I have a radgrid with a table in which has border=0 for layout then a nested table with borders, however when it exports to pdf the border appears on all the tables? 

Any ideas how I can remove the border on first layout table please?

Karl

<telerik:RadGrid ID="rgPowerTrain" Skin="Sitefinity" EnableEmbeddedSkins="false" AutoGenerateColumns="false"
    GridLines="None" BorderStyle="None" runat="server" OnNeedDataSource="rgPowerTrain_NeedDateSource"
    CssClass="DealSheetRadGrid" Visible="true" OnItemDataBound="rgPowerTrain_ItemDataBound" 
    ItemStyle-BorderStyle="None">
    
    <ExportSettings IgnorePaging="true" OpenInNewWindow="true">
        <Pdf PageHeight="297mm" PageWidth="210mm" PageTopMargin="0mm" PageLeftMargin="10mm"
            PageRightMargin="10mm" AllowModify="false" AllowCopy="false" Author="Finning (UK)"
            PageBottomMargin="25mm" Creator="Finning (UK)" />
    </ExportSettings>
    <MasterTableView TableLayout="Fixed" BorderStyle="None" EditMode="InPlace" Width="550"
        Font-Names="Arial Unicode MS" Visible="true" Font-Size="10px" BorderWidth="0">
        <Columns>
            <telerik:GridTemplateColumn ItemStyle-Width="600">
                <ItemTemplate>
                      <h3 style="text-align:center;"><u>EPP Warranty Certificate</u></h3>  
                      <h4 style="text-align:center;">Powertrain Cover - Heavy Construction (HC)</h4>
                       <uc1:EPPCertHeader runat="server" ID="EppCertHeader1" /> 
                       <p><strong>Power train coverage covers components on the machine that are used to produce, transmit, engine horsepower for the purpose of moving the machine against defect in material and workmanship.</strong></p>
                      <table width="550" border="0" rules="none" frame="void" style="border:none">
                      <col />
                      <tr>
                        <td>
                                            
                       <table width="550" border="1"  >
                       <colgroup span="2"></colgroup>
                       <tr>
                            <td>
                               <h4 style="text-align:center;"> Components covered:</h4>
                               <ul style="margin-left:15px;">
                                <li><b style="font-weight:bold">Basic Engine </b>– including engine components essential to engine operation e.g. Fuel Pump, Water pump, Turbo, Governor and Engine Control Module.</li>
                                <li><strong style="font-weight:bold">Transmission </strong>– including pump and hydraulic controls.</li>
                                <li><strong>Torque Converter / Divider</strong></li>
                                <li><strong>Drive Line </strong>– including shafts and Universal Joints.</li>
                                <li><strong>Differential</strong></li>
                                <li><strong>Transfer Gear Group</strong></li>
                                <li><strong>Drive Axles</strong></li>
                                <li><strong>Final Drives</strong></li>
                                <li><strong>Hydraulic Drive Pumps and Motors</strong></li>
                                <li><strong>Brake Components</strong> – if used to provide steering</li>
                                <li><strong>Steering Clutch Components</strong></li>
                                <li><strong>Differential Steering Components</strong></li>
                                <li><strong>Vibratory Components</strong></li>
                                <li><strong>Rotor Drive Mechanism</strong></li>
                                <li><strong>Electronic Controls</strong></li>
                               </ul>
                            <p><i>A complete list of covered components is available upon request at your local Finning branch.</i></p>
                            </td>
                            <td>
                                <h4 style="text-align:center;">Excluded Components</h4>
                                <ul style="margin-left:15px;">
                                    <li><strong>Radiator</strong></li>
                                     <li><strong>Engine Attachments</strong> – Alternator, Starter, Air Compressor and the Air Conditioning Compressor.</li>
                                      <li><strong>External Hoses and Lines</strong> – except Hydrostatic Drive lines.</li>
                                </ul>
                               <p>Service Items such as:</p>
                               <ul style="margin-left:15px;">
                                    <li>Coolant</li>
                                    <li>Oil</li>
                                    <li>Additives</li>
                               </ul>


                               <div style="font-weight:bold;margin-bottom:0;padding-bottom:0;">Maintenance Items such as:</div>
                               <ul style="margin-left:15px;margin-top:0;padding-top:0;">
                                <li>V-Belts</li>
                                <li>Filters and Elements</li>
                                 <li>Fuses and Wiper Blades</li>
                                  <li>Lamps, Lights and Bulbs</li>
                                   <li>Paint and Decals</li>
                                    <li>Weld maintenance structural repair such as defined in the Operation and Maintenance Manual.</li>
                                     <li>Driveline Wear Items </li>
                               </ul>


                               <div>General Exclusions and Limitations:</div>
                               <ul style="margin-left:15px;">
                                <li>Operator Abuse or Neglect</li>
                                <li>Wear out or normal deterioration</li>
                                <li>Chemical corrosion and physical or mechanical erosion.</li>
                                <li>Accelerated wear out of components due to operating technique or application.</li>
                                <li>Accident damage </li>
                               </ul>
                           </td>
                       </tr>
                      
                       </table> 
                        <?hard-pagebreak?>
                    </td>
                </tr>
                 <tr>
                      <td><center>Terms and Conditions</center>
                            <uc1:EPPSmallPrintOil runat="server" ID="EPPSmallPrintOil1" /> 
                      </td>
                </tr>
                <tr>
                    <td>
                        <uc1:EPPWarning runat="server" ID="EPPWarning1" />
                     </td>
                 </tr>
                </table>                        
                 </ItemTemplate>
            </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
Karl
Top achievements
Rank 1
 answered on 07 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Iron
Krasimir
Top achievements
Rank 3
Iron
Iron
Iron
Shawn
Top achievements
Rank 1
Iron
Javier
Top achievements
Rank 1
Iron
Jean-François
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Iron
Krasimir
Top achievements
Rank 3
Iron
Iron
Iron
Shawn
Top achievements
Rank 1
Iron
Javier
Top achievements
Rank 1
Iron
Jean-François
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?