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

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

1 Answer 94 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Steffen
Top achievements
Rank 1
Steffen asked on 27 Jul 2017, 01:11 PM

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>

1 Answer, 1 is accepted

Sort by
0
Steffen
Top achievements
Rank 1
answered on 04 Aug 2017, 07:45 AM
Any suggestions please?
Tags
Menu
Asked by
Steffen
Top achievements
Rank 1
Answers by
Steffen
Top achievements
Rank 1
Share this question
or