Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
266 views
A couple of things I've been trying to figure out without luck are setting focus within a RadAjaxPanel and handling an 'enter' key.

Within a search control, we have a RadAjaxPanel (mark-up below).

First, I can't figure out how to set focus on the rcbPayPeriod control.  I tried simply using rcbPayPeriod.Focus() in the PreRender event handler without luck.  The focus seems like it always resets to the upper-left of the entire page (our master page has a nav bar above this control).  This seems to be true regardless of whether it's an initial hit to the page or a postback.

Second, we'd like to let the enter key invoke the btnSearch click event when it's done doing the ajax postback.  (i.e., make that the default button).  Unfortunately, we do ajax postbacks both for enter keys in the RadDatePicker (which is what raises the SelectedDateChanged
event) and the RadComboBox (when they change the selected index).

(In case anyone's interested, as those dates change, we go look up valid information for the RadComboBoxes further down the page and populate them on these postbacks).

So, it's important to know the difference between enter hit and selected index changed, even if there is a way to hook into that ajax postback.  Does anyone know if we can and recognize that the enter key was hit, then set off the search button's click event?

--------------

<%

@ Register TagPrefix="radC" Namespace="Telerik.WebControls" Assembly="RadCalendar.Net2" %>

<%

@ Register TagPrefix="radCB" Namespace="Telerik.WebControls" Assembly="RadComboBox.Net2" %>

<%

@ Register TagPrefix="radA" Namespace="Telerik.WebControls" Assembly="RadAjax.Net2" %>

<

div>

    <radA:RadAjaxPanel ID="radAjaxPanel" runat="server"
 
        LoadingPanelID="ajaxLoadingPanel">

    <div id="divSearchPeriod" runat="server" style="float: left;">

        <asp:Label ID="lblByPayPeriod" runat="server" Font-Bold="true"
             Font-Size="Medium" Text="Search by Pay Period:"></asp:Label>

        <br />

        <asp:Label ID="lblPayPeriod" runat="server" Text="Pay Period:" 
            Width="75 px"></asp:Label>

        <radCB:RadComboBox ID="rcbPayPeriod" runat="server" AutoPostBack="true" 
                MarkFirstMatch="true"
                
OnSelectedIndexChanged="rcbPayPeriod_SelectedIndexChanged">
        
</radCB:RadComboBox>

        <br />

        <asp:Label ID="lblYear" runat="server" Text="Year:" Width="75 px"></asp:Label>

        <radCB:RadComboBox ID="rcbYear" runat="server" AutoPostBack="true" 
                MarkFirstMatch
="true"
                
OnSelectedIndexChanged="rcbYear_SelectedIndexChanged">
        
</radCB:RadComboBox>

    </div>

    <div style="float: left; width: 343px;">

        <asp:Label ID="lblByDates" runat="server" Font-Bold="true" Font-Size="Medium" 
                Text
="Search by Dates:"></asp:Label>

        <br />

        <asp:Label ID="lblStart" runat="server" Text="Start Date:" Width="70 px">
        </
asp:Label>

        <radC:RadDatePicker ID="rcStart" runat="server" AutoPostBack="true" 
                EnableMultiSelect
="false"
                
OnSelectedDateChanged="rcStart_SelectionChanged">
        
</radC:RadDatePicker>

        <br />

        <div style="float: right;"></div>

        <asp:Label ID="lblEnd" runat="server" Width="70 px" 
            
Text="End Date:"></asp:Label>

        <radC:RadDatePicker ID="rcEnd" runat="server" AutoPostBack="true" 
                EnableMultiSelect
="false"
                
OnSelectedDateChanged="rcEnd_SelectionChanged">
        
</radC:RadDatePicker>

    </div>

    <div>

        <br />
        
<br />
        
<br />
        
<br />
        
<br />

        <asp:Panel ID="pnlUser" runat="server">

            <asp:Label ID="lblUserName" runat="server" Text="User Name:" 
                Width
="110px"></asp:Label>

            <radCB:RadComboBox ID="rcUser" runat="server" MarkFirstMatch="true">
            
</radCB:RadComboBox>

            <asp:Label ID="lblNoUsers" runat="server" 
                    Text="No User Records in Selected Criteria" Visible="false" />
        
</asp:Panel>

        <asp:Panel ID="pnlClient" runat="server">
                
<asp:Label ID="lblClientName" runat="server" Text="Client Name:" 
                        Width
="110px"></asp:Label>

                <radCB:RadComboBox ID="rcClient" runat="server" MarkFirstMatch="true">
                
</radCB:RadComboBox>

                <asp:Label ID="lblNoClients" runat="server" 
                        
Text="No Client Records in Selected Criteria" Visible="false" />

        </asp:Panel>

        <asp:Panel ID="pnlProject" runat="server">

            <asp:Label ID="lblProjectName" runat="server" Text="Project Name:" 
                Width
="110px"></asp:Label>

            <radCB:RadComboBox ID="rcProject" runat="server" MarkFirstMatch="true">
            
</radCB:RadComboBox>

            <asp:Label ID="lblNoProjects" runat="server" 
                    Text="No Project Records in Selected Criteria"
                    
Visible="false" />

        </asp:Panel>

        <asp:Panel ID="pnlUserRole" runat="server">

            <asp:Label ID="lblUserRole" runat="server" Text="User Role:" Width="110px" />

            <radCB:RadComboBox ID="rcUserRole" runat="server" MarkFirstMatch="true" />

        </asp:Panel>

    </div>

    </radA:RadAjaxPanel>

    <radA:AjaxLoadingPanel ID="ajaxLoadingPanel" runat="server" Transparency="25" 
            BackColor="window">

        <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Loading.gif" 
            AlternateText="Loading..." />

    </radA:AjaxLoadingPanel>

</

div>

<

div>

    <br />

    <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" 
        Text="Search" />

</

div>

<

hr />

<

div>

    <asp:Label ID="lblSearchValue" runat="server"></asp:Label>

</

div>

golddog
Top achievements
Rank 1
 answered on 06 Oct 2008
1 answer
106 views
I am tearing my hair out!  I am not a programmer and have managed to get so far in customising the skin (using a css style sheet) for a web site I am working on (my husband does all the backend programming and I'm doing the front end!).  I have assigned attributes to the .rpexpandable and .rpexpanded classes which has put the arrows I want on the root items which is perfect. But I am now trying to get the arrows on the "buttons" at the Level 1 level - so that any buttons which are expandable at this level also display an arrow (I have 3 levels in this site). The address of the web page I am using as my base is http://www.plantagenet.wa.gov.au/ShireServices/index.aspx What I am trying to do is to get the link "Community Services" and "Corporate" to display an arrow to the right indicating that they have drop down links or children. What do I need to define in my style sheet to get them to appear?  Many thanks. Rachael
Todd Anglin
Top achievements
Rank 2
 answered on 06 Oct 2008
1 answer
133 views
Hi All

I am  loading usercontrol on rad tab strip multipage(on demand).i have a problem in that.
let us consider 1 usercontrol that contains 1 text box.
i have a save button in the page that contain tabstrip.i need to validate(Client side;the textbox from user control) by this save button
note : textbox and save button in different user controls
reply Expection soon
thanks in advance

regards
Mathews Baby

Todd Anglin
Top achievements
Rank 2
 answered on 06 Oct 2008
1 answer
141 views
I defined my own editbutton in the grid but when clicked it is causing an unwanted refresh before any action can be taken. Does anyone know why?
<Columns>
    <telerik:GridButtonColumn
        ButtonType="LinkButton"
        CommandArgument="{1},{2}" 
        CommandName="MyEdit"
        HeaderText=""
        Text="Edit"
        UniqueName="colEdit">
    </telerik:GridButtonColumn>

Is it because the CommandArguments?
Todd Anglin
Top achievements
Rank 2
 answered on 06 Oct 2008
1 answer
195 views
hi. wondering if there are any ctrls here that might allow me to emulate an asp:listbox... ie, very basic text rows that can be moved through using native up/down buttons. I also need the ability to autopostback on selectedindexchanged. my flow is essentially.
  • dropdownlist of general items (postback)  >
  • Populate listbox with subcategories,
  •  focus listbox,
  • using asynchpostback trigger, lookup items in related datagrid.

i tried getting the combobox to open on load, but it really doesn't look very nice in an always open state. ie, covers other items and distracts. Wondering if perhaps using a menulist would be better. I need to reitterate that I must be able to move through the list with only using up/dn keys, and it must maintain the selectedindex.


cheers.
mac

Todd Anglin
Top achievements
Rank 2
 answered on 06 Oct 2008
1 answer
165 views
Hi All,

I  have an .aspx webpage  in my .Net 1.1 application.
It contains a .ascx web user control with a radUpload control and radpProgressManager and radProgressArea.
when I clicked Save button in .aspx page I have got an error
"r.a.d.upload Ajax Callback Error. Source url returned error: 12031. undefined"
The file upload works fine.

or is this error related with internet connection problem?

Please help.

Thanks
Todd Anglin
Top achievements
Rank 2
 answered on 06 Oct 2008
1 answer
81 views
Hello,

I'm working on a webpage and I'd like to know if the current visitor is anonymous or has  logged in. In need this to enable/disable some controls.

What I'd like to reach is:

if user=anonymous
(not logged in)
{disable member controls}

if user=authenticated

{enable member controls}


Thanks in advance

~Guen~
Todd Anglin
Top achievements
Rank 2
 answered on 06 Oct 2008
1 answer
119 views
This is not a question but I am sharing a possible solution on the "PageRequestManagerServerErrorException" when performing url rewriting with AJAX.

I use RadControls exstensivelly in designing sites and have been running into this error with some of the new controls. Although the controls always work fine in the main form, I use a lot of dynamically loaded usercontrols containing RadControls and it is these that sometimes generate the error. I also do url rewriting on the main page and use a custom url rewrite form such as the one found here http://blog.angrypets.com/2007/01/aspnet_ajax_and.html.

I have spent a day trying to fix this error with the new version of RadScheduler in a usercontrol. While it worked fine on my dev machine it generated the error when published to the live server. It seems the problem is caused by a change to the action attribute in the form after the postback. using the javascript found here http://forums.asp.net/t/1268230.aspx to the user control fixed the error.

<script   language="javascript"   type="text/javascript">     
          Sys.Application.add_load(function()     
          {     
            var   form   =   Sys.WebForms.PageRequestManager.getInstance()._form;     
            formform._initialAction   =   form.action   =   window.location.href;     
          });     
  </script>   
 

I think this may also work in other senarios with the "PageRequestManagerServerErrorException" error.

I hope someone may find it useful.

Regards,
Dave
Todd Anglin
Top achievements
Rank 2
 answered on 06 Oct 2008
9 answers
240 views
Was the Mac skin removed from being embedded to Telerik controls?  

This:
<telerik:RadMenu ID="TopMenu" Runat="server" Skin="Mac" />
gives me the following error:
Telerik.Web.UI.RadMenu with ID='TopMenu' was unable to find embedded skin with name 'Mac'. Please, make sure that you spelled the skin name correctly, or if you want to use a custom skin, set EnableEmbeddedSkins=false.
Scott
Top achievements
Rank 1
 answered on 06 Oct 2008
1 answer
153 views

Every time i want to see live examples i get this
Server error '/RadControls_Prometheus'.

configurations error

C:\Program Files\Telerik\RadControls for ASPNET AJAX Q1 2008\Live Demos\web.config    Linje: 78
Linje 78: 			<add verb="*" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"></add>

My system is Vista Home
what is wrong

Can i use it with DNN or must i upgrade

Todd Anglin
Top achievements
Rank 2
 answered on 06 Oct 2008
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?