RadDropDownButton closes with right click

4 posts, 0 answers
  1. Lance
    Lance avatar
    34 posts
    Member since:
    Sep 2007

    Posted 06 May 2010 Link to this post

    Hi,

    I have a textbox that is enclosed in a RadDropDownButton.  I have implemented right-click cut, copy, and paste functionality in the textbox via the RadContextMenu, but when I right-click on the textbox in the RadDropDownButton, the RadDropDownButton closes.  How can I prevent the RadDropDownButton closing when I right-click on the textbox.  Please help.
  2. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 07 May 2010 Link to this post

    Hi Tim,

    Thank you for contacting us.

    Could you share some more information about the use-case?
     
    Where is the text box placed - on the button surface or inside the drop-down area? Are there any event-handlers?

    Looking further for your reply.


    All the best,
    Ivan
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Lance
    Lance avatar
    34 posts
    Member since:
    Sep 2007

    Posted 09 May 2010 Link to this post

    Hi,

    Below is the code for my dropdownbutton and textbox.  What I am trying to achieve is to provide the users with a large textbox on a form with very little room.  When the user clicks on the button they get a large textbox (that pops up and covers other fields on the form) to view and edit, but otherwise they can view a smaller field that fits on the form and shows all the data that fits on the smaller field.

     

     

     

    <telerik:RadDropDownButton Grid.Row="14" Grid.Column="1" Grid.ColumnSpan="5" Grid.RowSpan="2" x:Name="ddbMechanic" Height="44" Width="680" DropDownOpened="ddbMechanic_DropDownOpened" DropDownClosed="ddbMechanic_DropDownClosed" DropDownPlacement="Top" DropDownHeight="400" DropDownWidth="680" HorizontalAlignment="Left" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" Margin="0,2,0,2">

     

     

     

     

    <telerik:RadDropDownButton.Content>

     

     

     

     

    <TextBlock VerticalAlignment="Stretch" HorizontalAlignment="Stretch" TextAlignment="Left" TextWrapping="Wrap"></TextBlock>

     

     

     

     

    </telerik:RadDropDownButton.Content>

     

     

     

     

    <telerik:RadDropDownButton.DropDownContent>

     

     

     

     

    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">

     

     

     

     

    <TextBox x:Name="txtMechanic" MaxLength="600" AcceptsReturn="True" TextWrapping="Wrap" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

     

     

     

     

    <telerikNavigation:RadContextMenu.ContextMenu>

     

     

     

     

    <telerikNavigation:RadContextMenu Opened="ContextMenuOpened" Closed="ContextMenuClosed" >

     

     

     

     

    <telerikNavigation:RadMenuItem Header="Cut" Click="RadMenuItem_Click" />

     

     

     

     

    <telerikNavigation:RadMenuItem Header="Copy" Click="RadMenuItem_Click" />

     

     

     

     

    <telerikNavigation:RadMenuItem Header="Paste" Click="RadMenuItem_Click" />

     

     

     

     

    </telerikNavigation:RadContextMenu>

     

     

     

     

    </telerikNavigation:RadContextMenu.ContextMenu>

     

     

     

     

    </TextBox>

     

     

     

     

    </ScrollViewer>

     

     

     

     

    </telerik:RadDropDownButton.DropDownContent>

     

     

     

     

    </telerik:RadDropDownButton>

     

     

     

    private void ddbMechanic_DropDownClosed(object sender, RoutedEventArgs e)

     

    {

    ((

     

    TextBlock)ddbMechanic.Content).Text = txtMechanic.Text;

     

    }

     

     

    private void ddbMechanic_DropDownOpened(object sender, RoutedEventArgs e)

     

    {

    txtMechanic.Focus();

    txtMechanic.SelectionStart =

     

    0;

     

    }

  5. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 13 May 2010 Link to this post

    Hi Tim English,

    We still can not reproduce this issue. Can you please give us some more details like :
    The version of Silverlight that you use, The version of Telerik controls, etc..
    It will be helpful if you could send us some sample project, I suppose that you may have some additional code in the handlers that cause this behavior.


    Kind regards,
    Bobi
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top