This is a migrated thread and some comments may be shown as answers.

RadWindow and RadAjax

2 Answers 130 Views
AJAX and Web 2.0
This is a migrated thread and some comments may be shown as answers.
Ambu
Top achievements
Rank 1
Ambu asked on 08 Feb 2008, 04:05 PM

I have a form inside a RadAjaxPanel and a RadWindow on the same .aspx page. After an initial page load, if I click inside a textbox, which is inside an ajax panel and hit "Enter", the RadWindow opens. I do not want this to happen. I want the form to save. No problem, all I had to do was add a DefaultButton to the Panel around the form inside the RadAjaxPanel. This worked fine, but produced another problem. The form inside the ajax panel is complex. There are LinkButtons after each text box that need to be able to be fired by the "Enter" key when they are highlighted by hitting the "Tab" key. The default button setting overrides those link buttons and the form saves, rather then firing the LinkButton that is highlighted. So, to fix this, you might think I could just put a panel around every link button and set the default button to the link button inside the panel. Well, I cannot do this, because the panels affect the layout of the form by causing carriage returns. Some of the code is pasted below.

Thank you in advance for any help.

-Allan

<

asp:ImageButton ID="HelpImageButton" ImageUrl="/Image/QuestionMark.jpg" runat="server" />

<

radwin:RadWindowManager Visible="true"

id="RadWindowManager1" Skin="Office2007"

VisibleOnPageLoad="false"

runat="server">

<

windows>

<radwin:RadWindow ID="RadWindow1"

OpenerElementId="<%# HelpImageButton.ClientID %>"

Runat="server"

Width="475px"

Height="350px"

NavigateUrl="Help.htm"></radwin:RadWindow>

</

windows>

</

radwin:RadWindowManager>


<

radajax:RadAjaxPanel id="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1" Width="880px">

<!--complex form here with several textboxes and linkbuttons and one save button.-->

</

radajax:RadAjaxPanel>

<

radajax:AjaxLoadingPanel ID="LoadingPanel1" runat="server" Transparency="25" BackColor="#E0E0E0">

<asp:Image ID="Image1" ImageUrl="../RadControls/AJAX/Skins/Default/Loading7.gif" BorderWidth="0px" AlternateText="Loading" Runat="server"

style="margin-top: 50px;"></asp:Image>

</

radajax:AjaxLoadingPanel>

2 Answers, 1 is accepted

Sort by
0
Ambu
Top achievements
Rank 1
answered on 08 Feb 2008, 04:17 PM
I want to also note that after the form is saved by clicking the Save button, the RadWindow does not open unexpectedly when I am inside a textbox and hit "Enter". It's like the inital save fixes the problem.
0
Ambu
Top achievements
Rank 1
answered on 08 Feb 2008, 05:29 PM
I was able to solve my problem by changing the OpenerElementID to a point to a hyperlink, rather than a link button.
Tags
AJAX and Web 2.0
Asked by
Ambu
Top achievements
Rank 1
Answers by
Ambu
Top achievements
Rank 1
Share this question
or