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

AjaxManager Div Wrapper Styles

1 Answer 157 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
David Wilson
Top achievements
Rank 2
David Wilson asked on 10 Mar 2008, 06:50 PM
When using the Prometheus RadAjaxManager and RadAjaxManagerProxy, I am having trouble with the Div wrapper placed around elements that are listed as an UpdateControl in the RadAjaxManager control.

Here is the basic code from a plain page:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
  <AjaxSettings> 
    <telerik:AjaxSetting AjaxControlID="Button1"
      <UpdatedControls> 
        <telerik:AjaxUpdatedControl ControlID="Button1" /> 
        <telerik:AjaxUpdatedControl ControlID="Button2" /> 
      </UpdatedControls> 
    </telerik:AjaxSetting> 
    <telerik:AjaxSetting AjaxControlID="Button2"
      <UpdatedControls> 
        <telerik:AjaxUpdatedControl ControlID="Button1" /> 
        <telerik:AjaxUpdatedControl ControlID="Button2" /> 
      </UpdatedControls> 
    </telerik:AjaxSetting> 
  </AjaxSettings> 
</telerik:RadAjaxManager> 
<table style="width: 100%;"
  <tr> 
    <td style="width: 100%"
      <asp:Button ID="Button1" runat="server" Text="Button" /> 
      <asp:Button ID="Button2" runat="server" Text="Button" /> 
    </td> 
  </tr> 
</table> 

This causes the buttons to wrap onto separate lines.  The output HTML looks like this:

<table style="width: 100%;"
  <tr> 
    <td style="width: 100%"
      <div id="Button1Panel"
    <input type="button" name="Button1" value="Button" onclick="javascript:__doPostBack('Button1','')" id="Button1" /> 
</div> 
      <div id="Button2Panel"
    <input type="button" name="Button2" value="Button" onclick="javascript:__doPostBack('Button2','')" id="Button2" /> 
</div> 
    </td> 
  </tr> 
</table> 

Is there a way to force the Div wrappers to have a style of "display:inline;" to prevent the line break from occurring?

--David

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 11 Mar 2008, 09:12 AM
Hello David,

You can intercept the AjaxSettingCreating event of RadAjaxManager and change the RenderMode property value for the corresponding e.UpdatePanel argument. For a real-life example review the projects from the following code library thread:

http://www.telerik.com/community/code-library/submission/b311D-ttcbe.aspx

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
David Wilson
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
Share this question
or