Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
114 views
I may be missing something very obvious, but is there any reason why the RadMenuItem objects don't render an ID attribute? To circumvent this problem, I've created a custom RadMenuItem object that renders an ID, but shouldn't this be the standard or atleast an option to turn on/off on the RadMenu control?
T. Tsonev
Telerik team
 answered on 13 Nov 2009
4 answers
170 views
I'm using the RadAjaxManager from Q1 2009. In IE, everything works as expected, but in Firefox 3.0, the OnRequestStart only fires the first time and cannot seem to be trapped by Firebug for debugging. Any glaring problems identified in this code:

<%@ Page Title="" Language="VB" MasterPageFile="~/SiteLayout.master" AutoEventWireup="false" 
    CodeFile="Default.aspx.vb" Inherits="CostCenterList" MaintainScrollPositionOnPostback="true" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<asp:Content ID="HeaderContent" ContentPlaceHolderID="head" runat="server">  
    <style type="text/css">  
        .ControlPanel  
        {  
            clear: both;  
            margin-bottom: 6px;  
            margin-top: 6px;  
        }  
        .InnerPanel  
        {  
            width: auto;  
            float: left;  
            margin-left: 8px;  
            margin-right: 8px;  
        }  
        .InnerPanel fieldset  
        {  
            width: auto;  
        }  
        #mask  
        {  
            position: absolute;  
            z-index: 9000;  
            background-color: #000;  
            display: none;  
            top: 0px;  
            left: 0px;  
        }  
        #boxes .window  
        {  
            position: absolute;  
            width: 440px;  
            height: 200px;  
            display: none;  
            z-index: 9999;  
            padding: 20px;  
            top: 10px;  
            left: 10px;  
        }  
        #boxes #dialog  
        {  
            width: 375px;  
            height: 203px;  
        }  
    </style> 
 
    <script type="text/javascript">  
        var hideLoadPanel = true;  
 
        function displayLoading() {  
            var maskHeight = $(document).height();  
            var maskWidth = $(document).width();  
 
            $("#mask").css({ 'width': maskWidth, 'height': maskHeight });  
 
            $("#mask").css('display', 'inline');  
            $("#mask").fadeTo("fast", 0.8);  
 
            var winH = $(window).height();  
            var winW = $(window).width();  
 
            $("#dialog").fadeIn("fast");  
        }  
 
        function hideLoading() {  
            if (hideLoadPanel) {  
                $("#mask, .window").fadeOut(100);  
            }  
            else {  
                window.setTimeout('hideLoading();', 500);  
            }  
        }  
    </script> 
    <telerik:RadScriptBlock runat="server" ID="ScriptBlock">  
 
        <script type="text/javascript">  
            var currentCostCenters = new Array();  
 
            function openSelectedCostCenters(isApproval) {  
                var itemsList = "";  
                for (idx = 0; idx < currentCostCenters.length; idx++) // loop through the items in the array and build a string  
                {  
                    if (itemsList.length > 0) {  
                        itemsListitemsList = itemsList + "|"  
                    }  
                    itemsListitemsList = itemsList + currentCostCenters[idx];  
                }  
                if (isApproval == true) {  
                    window.location = "BulkApprove.aspx?keys=" + itemsList;  
                }  
                else {  
                    window.location = "BuleEdit.aspx?keys=" + itemsList;  
                }  
            }  
 
            function ToolbarButtonClicked(sender, args) {  
                // Used to handle the bulk approve button.  
                var clickedButton = args.get_item();  
                if (clickedButton.get_text() == "Bulk Approve") // Make sure the button is the approval button  
                {  
                    openSelectedCostCenters(true);  
                    return false;  
                }  
                if (clickedButton.get_text() == "Bulk Edit") // Make sure the button is the edit button  
                {  
                    openSelectedCostCenters(false);  
                    return false;  
                }  
                if (clickedButton.get_text() == "Previous Budget") {  
                    //ShowHideColumn('PreviousBudget');  
                    //$find("<%=PageAjaxManager.ClientID %>").ajaxRequest("ShowHidePreviousBudget");  
                }  
                if (clickedButton.get_text() == "Previous Actual") {  
                    //ShowHideColumn('PreviousActual');  
                    //$find("<%=PageAjaxManager.ClientID %>").ajaxRequest("ShowHidePreviousActual");  
                }  
                if (clickedButton.get_text() == "Year To Date") {  
                    //ShowHideColumn('CurrentYTD');  
                    //$find("<%=PageAjaxManager.ClientID %>").ajaxRequest("ShowHideYTD");  
                }  
                if (clickedButton.get_text() == "Categories") {  
                    //$find("<%=PageAjaxManager.ClientID %>").ajaxRequest("ShowHideCategories");  
                }  
                if (clickedButton.get_text() == "Status Legend") {  
                    //ShowStatusLegendForm();  
                }  
            }  
 
            function EnableBulkOperations() {  
                // Evaluates selected items and enables or disables the bulk approve  
                // button on the client side.  
                checkExistingItemsSelected(); // Find out what is selected if anything  
                isEnabled = currentCostCenters.length > 0; // will we need to enable or disable the button  
                var Toolbar = $find('<%= MainToolBar.ClientID %>'); // need to know the toolbar reference  
                var BulkApproveButton = Toolbar.findItemByText("Bulk Approve"); // get the button to deal with  
                var BulkEditButton = Toolbar.findItemByText("Bulk Edit"); // get the other button to deal with  
                if (isEnabled == true) {  
                    if (BulkApproveButton != null) // in case the button has been disabled server side, check for null  
                    {  
                        BulkApproveButton.enable();  
                    }  
                    if (BulkEditButton != null) // in case the button has been disabled server side, check for null  
                    {  
                        BulkEditButton.enable();  
                    }  
                }  
                else {  
                    if (BulkApproveButton != null) // in case the button has been disabled server side, check for null  
                    {  
                        BulkApproveButton.disable();  
                    }  
                    if (BulkEditButton != null) // in case the button has been disabled server side, check for null  
                    {  
                        BulkEditButton.disable();  
                    }  
                }  
            }  
 
            function checkValidRowTarget(sender, args) {  
                // Checks to make sure the user is selecting an item using  
                // the checkbox. RadGrid supports selecting rows by clicking on them  
                // and this is not the desired functionality of this particular grid.  
                if (args.get_tableView().get_name() == "RequestHistory") // Row clicked on in a details table  
                {  
                    args.set_cancel(true);  
                    return false;  
                }  
 
                // Checks to see if the checkbox for this item is disabled.  
                var masterTable = $find('<%= CurrentCostCentersGrid.ClientID %>').get_masterTableView();  
                var dataItem = masterTable.get_dataItems()[args.get_itemIndexHierarchical()];  
                var checkbox;  
                if (!dataItem.get_cell("ClientSideSelect")) {  
                    checkbox = dataItem.get_cell("ClientSideSelect").getElementsByTagName("INPUT")[0];  
                    if (checkbox.disabled) {  
                        args.set_cancel(true);  
                    }  
                }  
 
                if (args.get_domEvent().target) {  
                    if (args.get_domEvent().target.type != "checkbox") {  
                        args.set_cancel(true);  
                    }  
                    else {  
                        var checkboxItem = args.get_domEvent().target;  
                        if (checkboxItem.disabled == 'disabled') {  
                            args.set_cancel(true);  
                        }  
                    }  
                }  
                else if (!args.get_domEvent().srcElement) {  
                    args.set_cancel(true);  
                }  
            }  
 
            function checkExistingItemsSelected() {  
                // This function will evaluate the selected items in the rad grid and  
                // build an array that is used for both enabling/disabling bulk approval button  
                // and opening the new window with associated id's for bulk approvals.  
                currentCostCenters = new Array();  
                var masterGrid = $find('<%= CurrentCostCentersGrid.ClientID %>');  
                if (masterGrid != null) {  
                    var Items = masterGrid.get_masterTableView().get_selectedItems();  
                    for (idx = 0; idx < Items.length; idx++) {  
                        var currentItem = Items[idx];  
                        currentCostCenters[idx] = currentItem.getDataKeyValue("CostCenterItemID");  
                    }  
                }  
            }  
 
            function CostCenterSelectionChanged(sender, args) {  
                EnableBulkOperations();  
            }  
 
            function AjaxResponseEnd(sender, eventArgs) {  
                EnableBulkOperations();  
                hideLoadPanel = true;  
            }  
 
            function AjaxRequestStart(sender, eventArgs) {  
                displayLoading();  
                hideLoadPanel = false;  
                window.setTimeout('hideLoading();', 500);  
            }  
        </script> 
 
    </telerik:RadScriptBlock> 
</asp:Content> 
<asp:Content ID="MainContent" ContentPlaceHolderID="MainSystemContent" runat="Server">  
    <telerik:RadAjaxManager ID="PageAjaxManager" runat="server">  
        <ClientEvents OnResponseEnd="AjaxResponseEnd" OnRequestStart="AjaxRequestStart" /> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="MainToolBar">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="MainToolBar" /> 
                    <telerik:AjaxUpdatedControl ControlID="CurrentCostCentersGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="HideLockedItems">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="CurrentCostCentersGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="drpUnits">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="CurrentCostCentersGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="drpObjects">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="CurrentCostCentersGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="drpStatus">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="CurrentCostCentersGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="drpYear">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="drpUnits" /> 
                    <telerik:AjaxUpdatedControl ControlID="drpObjects" /> 
                    <telerik:AjaxUpdatedControl ControlID="CurrentCostCentersGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="ckAllYears">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="drpUnits" /> 
                    <telerik:AjaxUpdatedControl ControlID="drpObjects" /> 
                    <telerik:AjaxUpdatedControl ControlID="drpYear" /> 
                    <telerik:AjaxUpdatedControl ControlID="CurrentCostCentersGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="CurrentCostCentersGrid">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="CurrentCostCentersGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <div class="ControlPanel">  
        <telerik:RadToolBar ID="MainToolBar" runat="server" AutoPostBack="True" OnClientLoad="EnableBulkOperations" 
            Width="100%">  
            <ExpandAnimation Type="OutQuad" Duration="300" /> 
            <CollapseAnimation Type="OutQuad" Duration="300" /> 
            <Items> 
                <telerik:RadToolBarButton runat="server" Text="Bulk Edit" PostBack="false" ToolTip="Allows you to make sweeping changes to multiple cost centers" 
                    OnLoad="CheckForEditorRights" ImageUrl="~/Images/request.gif" Enabled="false" 
                    CommandName="BulkOperation" CommandArgument="Edit" /> 
                <telerik:RadToolBarButton runat="server" Text="Bulk Approve" PostBack="false" ToolTip="Allows you to approve multiple cost centers at a time." 
                    OnLoad="CheckForManageRights" ImageUrl="~/Images/ok.gif" Enabled="false" CommandName="BulkOperation" 
                    CommandArgument="Approve" /> 
                <telerik:RadToolBarButton IsSeparator="true" OnLoad="CheckForManageRights" /> 
                <telerik:RadToolBarButton Checked="false" Text="Previous Budget" CheckOnClick="true" 
                    AllowSelfUnCheck="true" PostBack="true" CheckedImageUrl="Images/buttonicons/lightbulb_on.png" 
                    Group="PBDG" ImageUrl="~/Images/buttonicons/lightbulb_off.png" ToolTip="Show/Hide the Previous Budget Column" 
                    CommandName="ShowHideColumn" CommandArgument="PreviousBudget" OnLoad="SetCheckStatus" 
                    Value="PrevBudget" /> 
                <telerik:RadToolBarButton Checked="false" Text="Previous Actual" CheckOnClick="true" 
                    AllowSelfUnCheck="true" PostBack="true" CheckedImageUrl="Images/buttonicons/lightbulb_on.png" 
                    Group="PACT" ImageUrl="Images/buttonicons/lightbulb_off.png" ToolTip="Show/Hide the Previous Actuals Column" 
                    CommandName="ShowHideColumn" CommandArgument="PreviousActual" OnLoad="SetCheckStatus" 
                    Value="PrevAct" /> 
                <telerik:RadToolBarButton Checked="true" Text="Categories" CheckOnClick="true" AllowSelfUnCheck="true" 
                    PostBack="true" CheckedImageUrl="Images/buttonicons/lightbulb_on.png" Group="CATS" 
                    ImageUrl="Images/buttonicons/lightbulb_off.png" ToolTip="Show/Hide the Categorization Columns" 
                    CommandName="ShowHideColumn" CommandArgument="Categories" OnLoad="SetCheckStatus" 
                    Value="Categories" /> 
                <telerik:RadToolBarButton Checked="true" Text="Year To Date" CheckOnClick="true" 
                    AllowSelfUnCheck="true" PostBack="true" CheckedImageUrl="Images/buttonicons/lightbulb_on.png" 
                    Group="YTD" ImageUrl="Images/buttonicons/lightbulb_off.png" ToolTip="Show/Hide the Current YTD Column" 
                    CommandName="ShowHideColumn" CommandArgument="YTD" OnLoad="SetCheckStatus" Value="YTD" /> 
                <telerik:RadToolBarButton IsSeparator="true" Visible="true" /> 
                <telerik:RadToolBarButton Text="Save View" ToolTip="Allows you to store the current view for reference at a later time." 
                    PostBack="true" CommandName="SaveView" Visible="true" ImageUrl="~/Images/buttonicons/saveview.png">  
                </telerik:RadToolBarButton> 
                <telerik:RadToolBarButton Text="Clear View" ToolTip="Allows you to clear the current view and return to the default view." 
                    PostBack="true" CommandName="ClearView" Visible="true" ImageUrl="~/images/buttonicons/clearview.png">  
                </telerik:RadToolBarButton> 
                <telerik:RadToolBarButton IsSeparator="true" /> 
                <telerik:RadToolBarSplitButton runat="server">  
                    <Buttons> 
                        <telerik:RadToolBarButton ToolTip="Export The Budget To Excel" runat="server" Text="Export To Excel" 
                            ImageUrl="~/Images/export.gif" CommandName="Export" CommandArgument="Excel">  
                        </telerik:RadToolBarButton> 
                        <telerik:RadToolBarButton ToolTip="Export The Budget To CSV" runat="server" Text="Export To CSV" 
                            ImageUrl="~/Images/export.gif" CommandName="Export" CommandArgument="CSV">  
                        </telerik:RadToolBarButton> 
                        <telerik:RadToolBarButton ToolTip="Export The Budget To PDF" runat="server" Text="Export To PDF" 
                            ImageUrl="~/Images/export.gif" CommandName="Export" CommandArgument="PDF">  
                        </telerik:RadToolBarButton> 
                    </Buttons> 
                </telerik:RadToolBarSplitButton> 
                <telerik:RadToolBarButton IsSeparator="true" /> 
                <telerik:RadToolBarButton runat="server" ToolTip="Show the legend for the status images" 
                    PostBack="false" Text="Status Legend" CommandName="ShowLegend" /> 
            </Items> 
        </telerik:RadToolBar> 
    </div> 
    <div class="ControlPanel">  
        <asp:Panel ID="HideLockedItemsPanel" runat="server" CssClass="InnerPanel">  
            <fieldset> 
                <legend>Hide Items</legend> 
                <div style="margin: 2px;">  
                    <asp:CheckBox ID="HideLockedItems" runat="server" Text="Approved Items" AutoPostBack="true" /></div>  
            </fieldset> 
        </asp:Panel> 
        <asp:Panel ID="UnitListPanel" runat="server" CssClass="InnerPanel">  
            <fieldset> 
                <legend>Unit:</legend> 
                <div style="margin: 2px;">  
                    <telerik:RadComboBox ID="drpUnits" runat="server" DataValueField="UnitID" AutoPostBack="true" 
                        AllowCustomText="false" DropDownWidth="350px" Height="250px" DataTextField="UnitNameFormatted">  
                        <CollapseAnimation Type="InQuint" Duration="200"></CollapseAnimation> 
                        <ExpandAnimation Duration="200" Type="OutQuint" /> 
                    </telerik:RadComboBox> 
                </div> 
            </fieldset> 
        </asp:Panel> 
        <asp:Panel ID="ObjectListPanel" runat="server" CssClass="InnerPanel">  
            <fieldset> 
                <legend>Object:</legend> 
                <div style="margin: 2px;">  
                    <telerik:RadComboBox ID="drpObjects" runat="server" AutoPostBack="true" AllowCustomText="false" 
                        DropDownWidth="350px" Height="250px" DataTextField="ObjectNameFormatted" DataValueField="LineItemID">  
                        <CollapseAnimation Type="InQuint" Duration="200" /> 
                        <ExpandAnimation Type="OutQuint" Duration="200" /> 
                    </telerik:RadComboBox> 
                </div> 
            </fieldset> 
        </asp:Panel> 
        <asp:Panel ID="GroupListPanel" runat="server" Visible="false" CssClass="InnerPanel">  
            <label>Group:</label> 
            &nbsp;<div  
                style="margin: 2px;">  
                <telerik:RadComboBox ID="drpGroups" runat="server" DataTextField="Group" DataValueField="Group" 
                    AutoPostBack="true" AllowCustomText="false" DropDownWidth="100px" Width="100px">  
                    <CollapseAnimation Type="InQuint" Duration="200" /> 
                    <ExpandAnimation Type="OutQuint" Duration="200" /> 
                </telerik:RadComboBox> 
            </div> 
        </asp:Panel> 
        <div class="InnerPanel">  
            <fieldset> 
                <legend>Status:</legend> 
                <div style="margin: 2px;">  
                    <telerik:RadComboBox ID="drpStatus" runat="server" DataValueField="StatusID" AutoPostBack="true" 
                        DropDownWidth="200px" Width="175px" DataTextField="StatusName">  
                        <CollapseAnimation Type="InQuint" Duration="200"></CollapseAnimation> 
                        <ExpandAnimation Duration="200" Type="OutQuint" /> 
                    </telerik:RadComboBox> 
                </div> 
            </fieldset> 
        </div> 
        <asp:Panel ID="YearListPanel" runat="server" CssClass="InnerPanel">  
            <fieldset> 
                <legend>Year:</legend> 
                <div style="margin: 2px;">  
                    <telerik:RadComboBox ID="drpYear" runat="server" AutoPostBack="true" Width="55px" 
                        DropDownWidth="55px">  
                        <CollapseAnimation Type="InQuint" Duration="200" /> 
                        <ExpandAnimation Type="OutQuint" Duration="200" /> 
                    </telerik:RadComboBox> 
                </div> 
            </fieldset> 
        </asp:Panel> 
        <div class="InnerPanel">  
            <fieldset> 
                <legend>All Years</legend> 
                <div style="margin: 2px;">  
                    <asp:CheckBox runat="server" ID="ckAllYears" AutoPostBack="true" Text="Yes" Checked="false" /> 
                </div> 
            </fieldset> 
        </div> 
    </div> 
    <div class="ControlPanel">  
        <telerik:RadGrid ID="CurrentCostCentersGrid" runat="server" AllowMultiRowSelection="True" 
            AllowMultiRowEdit="False" AllowFilteringByColumn="False" ShowGroupPanel="True" 
            AllowPaging="True" GridLines="Horizontal" AutoGenerateColumns="False" PageSize="60" 
            ShowFooter="true" Width="100%" VirtualItemCount="2000">  
            <ClientSettings AllowDragToGroup="true" AllowGroupExpandCollapse="true" AllowColumnsReorder="false" 
                AllowExpandCollapse="true" AllowColumnHide="true">  
                <Selecting AllowRowSelect="true" /> 
                <ClientEvents OnRowSelected="CostCenterSelectionChanged" OnRowDeselected="CostCenterSelectionChanged" 
                    OnRowSelecting="checkValidRowTarget" OnRowDeselecting="checkValidRowTarget" /> 
            </ClientSettings> 
            <GroupPanel Enabled="true" Text="Groups">  
            </GroupPanel> 
            <PagerStyle Mode="NumericPages" AlwaysVisible="true" Position="TopAndBottom" PageButtonCount="40" /> 
            <MasterTableView ShowGroupFooter="false" ShowFooter="true" DataKeyNames="CostCenterItemID" 
                CommandItemDisplay="None" ClientDataKeyNames="CostCenterItemID" Name="UnitList" 
                AutoGenerateColumns="false">  
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                    <ItemStyle VerticalAlign="Top" /> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn Visible="False" UniqueName="ExpandColumn">  
                    <HeaderStyle Width="20px"></HeaderStyle> 
                    <ItemStyle VerticalAlign="Top" /> 
                </ExpandCollapseColumn> 
                <Columns> 
                    <telerik:GridTemplateColumn UniqueName="OpenDetails" AllowFiltering="false" Groupable="false">  
                        <ItemTemplate> 
                            <a href='<%#Eval("CostCenterItemID", "ItemDetails.aspx?CCID={0}")%>'>  
                                <img style="border: none;" src="Images/ButtonIcons/magnify_plus.png" alt="View Details" /></a>  
                        </ItemTemplate> 
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Width="18px" /> 
                        <HeaderStyle Width="18px" /> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn UniqueName="OpenReports" AllowFiltering="false" Groupable="false">  
                        <ItemTemplate> 
                            <a href='<%#Eval("CostCenterItemID","CostCenterReports.aspx?CCID={0}") %>'>  
                                <img style="border: none;" src="Images/ButtonIcons/pie_chart.png" alt="View Reports" /> 
                            </a> 
                        </ItemTemplate> 
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Width="18px" /> 
                        <HeaderStyle Width="18px" /> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridClientSelectColumn UniqueName="ClientSideSelect">  
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Width="18px" /> 
                        <HeaderStyle Width="18px" /> 
                    </telerik:GridClientSelectColumn> 
                    <telerik:GridTemplateColumn UniqueName="StatusImage">  
                        <ItemTemplate> 
                            <img src='images/statusicons/<%#DataBinder.Eval(Container.DataItem,"ImageName") %>_16.png' 
                                alt='<%#DataBinder.Eval(Container.DataItem,"StatusName") %>' /> 
                        </ItemTemplate> 
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Width="18px" /> 
                        <HeaderStyle Width="18px" /> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridBoundColumn UniqueName="FundID" DataField="FundID" HeaderText="Fund">  
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Width="24px"/>  
                        <HeaderStyle Width="24px" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn UniqueName="UnitID" DataField="UnitID" HeaderText="Unit">  
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Width="38px" /> 
                        <HeaderStyle Width="38px" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn UniqueName="LineItemID" DataField="LineItemID" HeaderText="Object">  
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Width="60px" /> 
                        <HeaderStyle Width="60px" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridTemplateColumn UniqueName="CCName" HeaderText="Description">  
                        <ItemTemplate> 
                            <div> 
                                <strong> 
                                    <%#DataBinder.Eval(Container.DataItem, "LineItemName")%></strong></div> 
                            <div> 
                                Fund:  
                                <%#DataBinder.Eval(Container.DataItem,"FundName") %></div>  
                            <div> 
                                Unit:  
                                <%#DataBinder.Eval(Container.DataItem, "UnitName")%></div>  
                            <div> 
                                Last Sync:  
                                <%#DataBinder.Eval(Container.DataItem, "LastImportDate", "{0:d} at {0:t}")%></div>  
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridNumericColumn UniqueName="PreviousBudget" DataField="PreviousBudget" 
                        NumericType="Currency" HeaderText="Prev. Budget">  
                        <ItemStyle HorizontalAlign="Right" VerticalAlign="Top" /> 
                    </telerik:GridNumericColumn> 
                    <telerik:GridNumericColumn UniqueName="PreviousActual" DataField="PreviousActual" 
                        NumericType="Currency" HeaderText="Prev. Actual">  
                        <ItemStyle HorizontalAlign="Right" VerticalAlign="Top" /> 
                    </telerik:GridNumericColumn> 
                    <telerik:GridNumericColumn UniqueName="CurrentBudget" DataField="CurrentBudget" NumericType="Currency" 
                        HeaderText="Budget">  
                        <ItemStyle HorizontalAlign="Right" VerticalAlign="Top" /> 
                    </telerik:GridNumericColumn> 
                    <telerik:GridNumericColumn UniqueName="CurrentYTD" DataField="CurrentYTD" NumericType="Currency" 
                        HeaderText="YTD">  
                        <ItemStyle HorizontalAlign="Right" VerticalAlign="Top" /> 
                    </telerik:GridNumericColumn> 
                    <telerik:GridNumericColumn UniqueName="ProposedBudget" DataField="ProposedBudget" 
                        NumericType="Currency" HeaderText="Proposed">  
                        <ItemStyle HorizontalAlign="Right" VerticalAlign="Top" /> 
                    </telerik:GridNumericColumn> 
                    <telerik:GridBoundColumn UniqueName="Category" DataField="Category" HeaderText="Category">  
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn UniqueName="Group" DataField="Group" HeaderText="Group">  
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" /> 
                    </telerik:GridBoundColumn> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid> 
 
        <script type="text/javascript">  
        </script> 
 
    </div> 
    <div id="boxes">  
        <div id="dialog" class="window">  
            <img src="Images/loading.gif" alt="Loading..." /> 
        </div> 
    </div> 
    <div id="mask">  
    </div> 
</asp:Content> 
 

Thanks!
Sebastian
Telerik team
 answered on 13 Nov 2009
9 answers
232 views
Whenever it is just added to a form, Custom validation (ASP.NET validations) stop working.

Please see the following two samples, the first one does not work while the other works, the only difference is adding the scriptmanager.

this does not work
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestBasel2.aspx.vb" Inherits="TestBasel2" %> 
<%@ 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" > 
<body> 
    <form id="form1" runat="server"> 
    <div> 
                            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
        </telerik:RadScriptManager>  
         
         
         
<script language="javascript" type="text/javascript"> 
function ClientValidateUpload2(source, arguments) 
{ 
alert(1); 
}                                
</script>    
 
 
    <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="CustomValidator" ClientValidationFunction=ClientValidateUpload2 ></asp:CustomValidator> 
     
    <asp:Button ID="Button1" runat="server" Text="Upload"   CausesValidation=true /> 
    </div> 
    </form> 
</body> 
</html> 
 

this works
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestBasel2.aspx.vb" Inherits="TestBasel2" %> 
<%@ 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" > 
<body> 
    <form id="form1" runat="server"> 
    <div> 
     
         
         
<script language="javascript" type="text/javascript"> 
function ClientValidateUpload2(source, arguments) 
{ 
alert(1); 
}                                
</script>    
 
 
    <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="CustomValidator" ClientValidationFunction=ClientValidateUpload2 ></asp:CustomValidator> 
     
    <asp:Button ID="Button1" runat="server" Text="Upload"   CausesValidation=true /> 
    </div> 
    </form> 
</body> 
</html> 
 


I also added a comment to one of your posts earlier which states that CustomValidation is not working with RadUpload, i eliminated why here.

Please help.
we are using Q2 2009

Alaa Majzoub
Top achievements
Rank 2
 answered on 13 Nov 2009
3 answers
172 views
I have a page that has a dropdown list and a 2 pane splitter.

When I change the dropdown list, the 2 pane splitter updates and the loading panel functions properly.

In the left pane of the splitter, I have a tree view. When I drag and drop treeview elements, the loading panel only overlays the left pane of the splitter - this is proper and correct.

I also have a context menu on the treeview. When I select various options (except for one - continue reading, please) the loading panel overlays the left pane of the splitter only - this is proper and correct.

However, one of the context menu's options causes a user control to be updated that is in the right pane.

How can I cause the right pane to be updated and the ajax loading panel to cover the ENTIRE splitter (or the 2 panes independently - doesn't matter)? I have tried several options and can't seem to come up with something that work.

I don't think I can do this via that AjaxManagerProxy, since the individual context menu items don't have an associated ID with them. Do I need to (can I even) do this on the client side?

Any help would be appreciated.

Greg
Sebastian
Telerik team
 answered on 13 Nov 2009
1 answer
302 views
Hi,

I'm using radGrid and radcombo boxes and .net buttons.
After the page is loaded first time, if i click the button first time it is working properly. If i click the same button or any other button then the error "Multiple controls with the same ID 'ctl00' were found. FindControl requires that controls have unique IDs." is coming.
In the header i'm using script manager. So please help me to solve this.

Thanks.
Pavlina
Telerik team
 answered on 13 Nov 2009
1 answer
122 views
Hi ,

is it possible to show certain levels of the tree view?
I have a hierarchy with 7 levels and like to begin the display of this hierarchy dynamically on other levels than the first one.
Or do I have to build the hierarchy different in the datasource?


Thanks for your help.

Kind regards

Stefan
Schlurk
Top achievements
Rank 2
 answered on 13 Nov 2009
2 answers
254 views
I've successfully created a radgrid which uses client-side data-binding. In this radgrid I have one databoundcolumn:
<telerik:GridBoundColumn DataField="FullName" HeaderText="FullName"  
    SortExpression="FullName" UniqueName="FullName"> 
</telerik:GridBoundColumn> 
 

I would like to add more types of column in this radgrid, for instance a gridbuttoncolumn. However, when I try this code:
<telerik:GridButtonColumn HeaderText="FullName" DataTextField="FullName"  
            Text="FullName" DataType="System.String" UniqueName="FullName"></telerik:GridButtonColumn> 
 

the column is always empty.
Can someone tell me how to add other column types using client-side data-binding?

M van der Kolk
Top achievements
Rank 1
 answered on 13 Nov 2009
2 answers
166 views

Hello Telerik Team!!

I have a little problem with the Loading Panel, onRequestStart and Export
I hace a RadGrid with a new choice of Export. (That´s really good!!) Excelent Work.

 

<

 

CommandItemSettings AddNewRecordText="" ShowExportToExcelButton="true" ShowExportToCsvButton="true" ShowExportToWordButton="true" />

I used the example that you showed in RadControls for ASP.NET AJAX Q3 2009 Live Examples.

 

function

 

onRequestStart(sender, args) {

 

    //window.document.getElementById(

'ctl00_Contenedor_RadAjaxLoadingPanel1').style.display = 'none';

 

 

    if (args.get_eventTarget().indexOf("ExportTo") != -1)

 

        args.set_enableAjax(

false);

 

 

}



The Problems is: for Example when I click over the image of Excel  the RadAjaxLoadingPanel never dissapear.
I tried with this line window.document.getElementById('ctl00_Contenedor_RadAjaxLoadingPanel1').style.display = 'none';
but i couldn´t.

Please if you can help me.
I will really appreciate it.

Pavlina
Telerik team
 answered on 13 Nov 2009
2 answers
154 views
Scenerio: I have a web page with an ajax panel surrounding two radlistbox controls that are setup to transfer to each other. There are some other asp controls and a custom validator also within the ajax panel. the custom validator is setup to fire a server side event. The radlistbox controls have CauseValidation = false.

Problem: Even though RadListbox CausesValidation is set to false, the server side event for the custom validator is called when the Move All (double arrows) button of the radlistbox is pressed.

anyone come across this before. If i create a sample application and try to reproduce the issue with just two radlistbox controls setup the same way, i cannot reproduce so it seems like it something with my original page. any have some ideas on things to look for?

Kirk
Kirk Quinbar
Top achievements
Rank 1
 answered on 13 Nov 2009
1 answer
171 views

I am loading a slider from values in a database:

    private void LoadStageSlider(int StageID)  
    {  
        bool Found = false;  
        int Min = -1;  
        int Max = -1;  
        slideStage.Items.Clear();  
        Stage s = new Stage();  
        DataView DV = s.List(Master.SiteID, true);  
        foreach (DataRow DR in DV.Table.Rows)  
        {  
            int Value = int.Parse(DR["StageID"].ToString());  
            RadSliderItem item = new RadSliderItem(DR["StageName"].ToString(), DR["StageID"].ToString());  
            slideStage.Items.Add(item);  
            if (Value == StageID) Found = true;  
            if (Value > Max) Max = Value;  
            if (Min == -1) Min = Value;  
            else if (Value < Min) Min = Value;  
        }  
        if (Found)  
        {  
            slideStage.Value = StageID;  
        }  
    } 

Here is the slider declaration:
<telerik:RadSlider runat="server" ID="slideStage" IsSelectionRangeEnabled="false"   
Width="450px" Height="40px" Enabled="true" ItemType="Item" TrackPosition="TopLeft" 
ToolTip="Move the slider to indicate the pipeline stage of this opportunity" 
Skin="Vista" ShowDecreaseHandle="true" ShowIncreaseHandle="true" /> 

The StageID values are database Identity values, so they can be just about any number.

When I load the slider, the slideStage.Value is correct; however when the page displays, the slider is not set to the correct value.
When I examine slideStage.Value on PostBack, the Value property appears to reflect the Item index, but the SelectedValue property is correct. I saw a reference that said Value on read will contain the Item index, and now I am thoroughly confused.

Please clarify for me how the Value/SelectedValue properties work and how I can set the slider properties so that it displays the correct value.

Thanks for any clarity you can shed on this puzzle.
Tsvetie
Telerik team
 answered on 13 Nov 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?