How to align the width and height of an RadMenuItem and an ItemTemplate to match the size of the containing controls?

2 posts, 0 answers
  1. Steffen
    Steffen avatar
    4 posts
    Member since:
    Apr 2017

    Posted 27 Jul 2017 Link to this post

    Hello,

     

    i use a Split Button, which has a ContextMenu attached to it. Inside the ContextMenu, there is one MenuItem, which contains an ItemTemplate with two CheckBoxes. How is it possible that the ItemTemplate matches the size of the containing CheckBoxes? So there should be no padding/margin between the CheckBoxes and the border of the ContextMenu.

    I attached a screenshot of how it looks right now.

     

    Code:

     

    <telerik:RadButton EnableSplitButton="true" ID="btn4" AutoPostBack="true" runat="server" Text="Example Button Text" OnClientClicked="OnClickedRadButton" CommandName="cmdBt4"  OnClick="btn4_Click" CausesValidation="true">
    </telerik:RadButton>
    <telerik:RadContextMenu id="rcmBtn4" runat="server">
       <Items>
          <telerik:RadMenuItem>
             <ItemTemplate>
                <p>
                   <telerik:RadCheckBox runat="server" ID="rcb1" CausesValidation="false" Checked="true" Text="als Excel-Datei (.xlsx) exportieren" AutoPostBack="false" />
                </p>
                <p>
                   <telerik:RadCheckBox runat="server" ID="rcb2" CausesValidation="false" Checked="true" Text="Checkbox Text 2" AutoPostBack="false" />
                </p>
             </ItemTemplate>
          </telerik:RadMenuItem>
       </Items>
    </telerik:RadContextMenu>
  2. Steffen
    Steffen avatar
    4 posts
    Member since:
    Apr 2017

    Posted 04 Aug 2017 Link to this post

    Any suggestions please?
Back to Top