How to get the ContextMenu Items inside an ItemTemplate to fill the full available horizontal space

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 RadContextMenu attached to it. Inside the RadContextMenu, there is one RadMenuItem which contains an ItemTemplate with multiple RadCheckBoxes.

    How is it possible that the RadCheckBoxes inside the ContentTemplate uses the full available width? So there should be no padding/margin in the ContextMenu and the Checkbox stretches horizontally to use all of the existing space. I uploaded an example of how it looks like right now in the attachments of this post.

     

     

    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 27 Jul 2017 in reply to Steffen Link to this post

    This thread is a duplicate of 

    http://www.telerik.com/forums/how-to-align-the-width-and-height-of-an-radmenuitem-and-an-itemtemplate-to-match-the-size-of-the-containing-controls

     

    An admin can delete it.

Back to Top