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

RadDropDownButton closes with right click

3 Answers 110 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Lance
Top achievements
Rank 1
Lance asked on 07 May 2010, 02:38 AM
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.

3 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 07 May 2010, 03:44 PM
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.
0
Lance
Top achievements
Rank 1
answered on 10 May 2010, 12:47 AM
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;

 

}

0
Bobi
Telerik team
answered on 13 May 2010, 07:59 AM
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.
Tags
Buttons
Asked by
Lance
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Lance
Top achievements
Rank 1
Bobi
Telerik team
Share this question
or