Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
121 views
Hi all,

I have a radgrid being loaded with a dataset at page load.  We have ~60 columns in the radgrid with a bunch of radcomboboxes in each row.  I need to have a OnClientFocus event on the radcomboboxes for something I am doing in jquery.  I noticed my page load was a bit slower after I added this, so I added a console.log to the onfocus function, and noticed that it is being called 50+ times (I believe it is the total amount of radcomboboxes I have on the page, or at least pretty close) as soon as the page loads.

Is each one of these radcomboboxes grabbing focus on page load for some reason?  Is this intended behavior?  Is there anything to get around this happening?
Dimitar Terziev
Telerik team
 answered on 14 May 2012
1 answer
132 views
I've got my RadAjaxManager and  RadAjaxLoadingPanel on my master page. My RadMenu is being registered. I have two panels on the page, one is initially hidden. when the RadMenu item is selected, the two panels swap visibility. Ajax is not firing and I get a full post back each time a menu item is clicked.

It looks like it should be working, at least to me. Here's my code...

Thanks!
John

<asp:Panel ID="WelcomePanel" runat="server">
     
<div id="WelcomeMsg" style="margin-left:20px; margin-right:20px; text-align:center;">
<span style="font-weight: bold; font-size: medium; text-align: center;">SCMS Management System Owner / Point-Of-Contact<br />
Requirements Management Interface</span>
<br /> <p style="text-align:justify;">
 
The Office of SCience Management System (SCMS) is primarily a tool for setting institutional standards and conveying related information to staff. It is also the tool by which SC develops, integrates, and demonstrates SC's conformance to requirements.
 
</p><br />
<p style="text-align:left;">
 
Click on one of the High-Level SCMS Requirements to display its detail.
 
</p>
 
</div>
</asp:Panel>
 
 
 
    <asp:Panel ID="Panel1" runat="server">
     
    <div id="inactive" style="text-align:center;">
        <asp:Label ID="lblInactive" runat="server" Text="-- INACTIVE REQUIREMENT --" ForeColor="Red" Font-Bold="True"></asp:Label>
    </div>
    <h1 style="top: 20px; right: 20px; bottom: 20px; left: 20px; text-align: center; margin-bottom: 20px; margin-top: 10px;">
        <asp:PlaceHolder ID="Header_PlaceHolder" runat="server"></asp:PlaceHolder>
    </h1>
    <h2 style="top: 20px; right: 20px; bottom: 20px; left: 20px; text-align: center; margin-bottom: 20px; margin-top: 10px; font-size: medium;">
        <asp:PlaceHolder ID="Header2_PlaceHolder" runat="server"></asp:PlaceHolder>
    </h2>
    <div class="titleLarge">Management Systems</div><br />
    <ul class="RDRImp">
        <asp:PlaceHolder ID="MS_PlaceHolder" runat="server"></asp:PlaceHolder>
    </ul>
    <div class="titleLarge">Policies</div><br />
    <div style="text-align: center;"><asp:Label ID="lblNoPolicies" runat="server" Text="None" Font-Bold="True" Font-Size="Medium"></asp:Label>
    </div>
    <ul class="RDRImp">
        <asp:PlaceHolder ID="Policy_PlaceHolder" runat="server"></asp:PlaceHolder>
    </ul>
    <div class="titleLarge">Subject Areas / Procedures</div><br />
    <div style="text-align: center;"><asp:Label ID="lblNoSAs" runat="server" Text="None" Font-Bold="True" Font-Size="Medium"></asp:Label>
    </div>
    <ul class="RDRImp">
        <asp:PlaceHolder ID="SA_PlaceHolder" runat="server"></asp:PlaceHolder>
    </ul>
 
    <div class="titleLarge">RDR Actions</div><br />
 
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
        CssClass="RadGrid_Default" CellSpacing="0" style="margin-left: 20px !important; margin-right: 20px !important;" ItemStyle-VerticalAlign="Top">
        <MasterTableView>
        <Columns>
 
        <telerik:GridBoundColumn DataField="Comments"
            FilterControlAltText="Filter line column" HeaderText="Action" UniqueName="Action" FilterControlWidth="150px">
            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Bottom"></HeaderStyle>
        </telerik:GridBoundColumn>
 
        <telerik:GridBoundColumn DataField="DueDate"
            FilterControlAltText="Filter line column" HeaderText="Planned" UniqueName="Planned" FilterControlWidth="150px"
            DataFormatString = "{0:MM/dd/yyyy}">
        </telerik:GridBoundColumn>
 
        <telerik:GridBoundColumn DataField="CompDate"
            FilterControlAltText="Filter line column" HeaderText="Complete" UniqueName="Complete" FilterControlWidth="150px"
            DataFormatString = "{0:MM/dd/yy}">
        </telerik:GridBoundColumn>
 
        <telerik:GridBoundColumn DataField="ActionOwner"
            FilterControlAltText="Filter line column" HeaderText="Action Owner" UniqueName="ActionOwner" FilterControlWidth="150px">
        </telerik:GridBoundColumn>
 
        </Columns>
        </MasterTableView>
    </telerik:RadGrid>
 
<br /> 
    <div class="titleLarge">Training</div>
    <div style="text-align: center; margin-top: 20px;"><asp:Label ID="lblNoTraining" runat="server" Text="None" Font-Bold="True" Font-Size="Medium"></asp:Label>
    </div>
    <ul class="RDRImp">
        <asp:PlaceHolder ID="Training_PlaceHolder" runat="server"></asp:PlaceHolder>
    </ul>
 
    <div style="text-align:center;">
    <br />
        <asp:Label ID="Label1" runat="server" Text="RDR Initiate Date:"></asp:Label>  
        <asp:Label ID="lblInitiateDate" runat="server" Text=""></asp:Label>
    <br />
        <asp:Label ID="Label2" runat="server" Text="RDR Approval Date:"></asp:Label>  
        <asp:Label ID="lblApprovalDate" runat="server" Text=""></asp:Label>
    <br />
        <asp:Label ID="Label3" runat="server" Text="RDR Approved By:"></asp:Label>  
        <asp:Label ID="lblApprovedBy" runat="server" Text=""></asp:Label>
 
    </div>
 
 
    </asp:Panel>
 
 
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadMenu1" >
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="WelcomePanel" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

Maria Ilieva
Telerik team
 answered on 14 May 2012
1 answer
183 views
Hi,

the data bound to the grid is stored in the session and bound to the grid in the DataBound event. 
Now I want to reload the data from the database only when the user clicks the "Refresh" button. In all other cases, the data is taken from the session.
I thought I could use the 
e.RebindReason == GridRebindReason.ExplicitRebind
but this is also the case when e.g. the columns are reordered.

Whats the check for the Refresh button?

Thanks!
Princy
Top achievements
Rank 2
 answered on 14 May 2012
1 answer
1.2K+ views
Hi,

I have the following script file.  In the text I am entering the \\n to display a new line but when the alert opens the text is not on a new line.  I have tried \n, \\n and \\n\r but none of these creates a new line.  How do I get a new line to display in the rad alert.

/*This function displays a confirm dialog box when the user clicks the delete button */
function DeleteOnClientClickingExternal(sender, args, radGrid) {   
    var MasterTable = radGrid.get_masterTableView();
    var selectedRows = MasterTable.get_selectedItems();
    if (selectedRows.length > 0) {
        var callBackFunction = Function.createDelegate(sender, function(argument) {
            if (argument) {
                this.click();
            }
        });
        var text = "This process CANNOT be un-done.\\nAre you sure you want to delete this record?.";
        radconfirm(text, callBackFunction, 500, 100, null, "Delete Record");
        args.set_cancel(true);

    }
    else {
        alert('You must select a row to be deleted.');
        args.set_cancel(true);
    }
}

Thank you for you help.

Tracy
Shinu
Top achievements
Rank 2
 answered on 14 May 2012
1 answer
70 views
Hello!

I would like to know if there is a way to find all the ComboBoxes contained in a div and set their value attribute to "-1".

Actually I have several Rad Controls (ComboBox, NumericalTextBox, TextBox) contained in a div and I would like to find them all and set them to initial values as the div is hidden, using Javascript.
I can do this server-side but client-side is the new requirement.

Any Ideas?
Dimitar Terziev
Telerik team
 answered on 14 May 2012
1 answer
77 views
Is it possible to have a node styled like panel bar item in the treeview, in such a way that the expand collapse icons comes on the right hand side of the text instead of left side. I wanted some nodes to behave like panel bar and child nodes under it like normal treeview.
Plamen
Telerik team
 answered on 14 May 2012
3 answers
100 views
Hi,
I have a RadTree in User Control A & RadioButtonList in another User Control B under my main aspx page. When I check a node in RadTree in User Control A., I want to get selected index of RadioButtonList 
in User Control B. How i'm i supposed to get the output.??

Regards,
Aditya
Kate
Telerik team
 answered on 14 May 2012
1 answer
232 views
I have some radtextboxes on my website with maximum character limits such as 50 chars, because this is the size of the database field that the control is saved to. Now it has happened that users have tried to enter more text but the ui won't let them. So they phone up and complain that the website is broken. Is there a way to fire an event if they try to type more chars than the field allows? Then i could pop up an explanatory warning message to tell them that 50 chars is the limit. I don't want to clutter the ui with on-screen labels saying "this box accepts 50 chars max" when 99% of people will never exceed this limit. Any suggestions? Thanks
Princy
Top achievements
Rank 2
 answered on 14 May 2012
11 answers
437 views
1.I have used required field validators for some input in my edit form of Radgrid. When I click cancel button it fires the validation event first and the Popup form gets closed.

2.When I click 'Update' with some fields left empty it causes validation.If I click cancel when the validation message exists, nothing is happening. On second click only the Pop up form gets closed. I have used the AutoGenerated EditFormType. Because of this I cant get the button id for 'cancel' and make the CausesValidation false.

I am not sure why the validation happening for cancel button ? I think because of this Problem 2 might have happened.

Thanks in Advance.

Regards,
VIjay
Vasil
Telerik team
 answered on 14 May 2012
1 answer
128 views
Hello,
I have a problem with RadFormDecorator, using CreateUserWizard does not apply to the element of style elements TexBox and Button.

<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RpScriptManager" 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="RpAjaxManager" runat="server">
    </telerik:RadAjaxManager>
    <telerik:RadSkinManager ID="RpSkinManager" runat="server" Skin="Black">
    </telerik:RadSkinManager>
    <div>
        <!-- Logo & Navigation -->
        <div class="logo">
            <div style="float: right; width: 150px; margin: 40px 10px 10px 10px">
                <asp:ImageButton runat="server" ID="loginBtn" ImageUrl="../styles/images/login.png"
                    Width="30px" Height="30px" ToolTip="Login" OnClick="loginBtn_Click" />
                <asp:ImageButton runat="server" ID="registerBtn" ImageUrl="../styles/images/signIn.png"
                    Width="30px" Height="30px" ToolTip="Create new account" Style="margin-left: 10px"
                    OnClick="registerBtn_Click" />
                <asp:ImageButton runat="server" ImageUrl="~/styles/images/logout.png" ID="logoutBtn"
                    Width="30px" Height="30px" ToolTip="Log Out" Visible="false" OnClick="logoutBtn_Click" />
                <asp:Label runat="server" ID="userNameLbl" Font-Size="18px" ForeColor="White" Visible="false" />
            </div>
            <div id="navigation">
                <telerik:RadMenu ID="MainMenu" runat="server" Skin="Bond" EnableEmbeddedBaseStylesheet="False"
                    EnableEmbeddedSkins="False" EnableTextHTMLEncoding="true">
                    <Items>
                        <telerik:RadMenuItem runat="server" Text="Main" NavigateUrl="~/Default.aspx">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" Text="Investment Scheme" NavigateUrl="~/Pages/InvestScheme.aspx">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/Pages/Products.aspx" Text="Products">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/Pages/Help.aspx" Text="Need help">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/Pages/Support.aspx" Text="Support">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenu>
            </div>
        </div>
        <!-- Content -->
        <telerik:RadFormDecorator ID="RpFormDecorator" runat="server" Skin="Black" DecorationZoneID="displayWizard" DecoratedControls="LoginControls" />
        <div id="regZone" style="width: 900px; margin: 0 auto" align="center">
            <asp:Image runat="server" ID="newUserImg" ImageUrl="~/styles/images/Actions-list-add-user-icon.png"
                Width="256px" Height="256px" Style="float: left; margin: 5px 20px 5px 60px" />
            <div id="displayWizard" style="padding-top: 50px">
                <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" FinishDestinationPageUrl="~/Pages/User/Profile.aspx"
                    ContinueDestinationPageUrl="~/Pages/User/Profile.aspx">
                    <WizardSteps>
                        <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                        </asp:CreateUserWizardStep>
                        <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
                        </asp:CompleteWizardStep>
                    </WizardSteps>
                </asp:CreateUserWizard>
            </div>
        </div>
        <!-- Footer -->
        <br class="cleared" />
        <div class="footer">
        </div>
    </div>
    </form>


Thanks for any advice...
Bozhidar
Telerik team
 answered on 14 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?