AjaxManager Div Wrapper Styles

2 posts, 0 answers
  1. David Wilson
    David Wilson avatar
    4 posts
    Member since:
    Feb 2006

    Posted 10 Mar 2008 Link to this post

    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

  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 11 Mar 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top