Telerik Forums
UI for WPF Forum
2 answers
928 views
Hello,

I associated a contextmenu with a text box.. When "RightClick" on it, the contextmenu opens correctly as expected. I would like to open it in code-behind, let's say when user type CTRL+SPACE for instance or when the user clicks a button beside the textbox.

How to achieve this with radContextMenu?

Thanks in advance for your answer.
regards
--
Eric
Eric
Top achievements
Rank 1
 answered on 20 May 2011
1 answer
67 views
According to the documentation here, to get the RadTreeViewItem so that you can dynamically set the context menu, you need to add a handler for the Opened event and retrieve it like so:

RadTreeViewItem item = ((RadContextMenu)sender).GetClickedElement<RadTreeViewItem>();

We have an application using RadDocking with the RadTreeView in a RadPane.  It works with the pane pinned but if I unpin the pane and right click, GetClickedElement returns null.  Here's some simple XAML to recreate it:

<Window x:Class="DockingTreeViewContextMenu.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <telerik:RadDocking>
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadDocumentPane Header="Content"></telerik:RadDocumentPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
            <telerik:RadSplitContainer>
                <telerik:RadPaneGroup>
                    <telerik:RadPane Header="Pane 1">
                        <telerik:RadTreeView>
                            <telerik:RadContextMenu.ContextMenu>
                                <telerik:RadContextMenu Opened="RadContextMenu_Opened">
                                </telerik:RadContextMenu>
                            </telerik:RadContextMenu.ContextMenu>
                            <telerik:RadTreeViewItem Header="Item #1">
                                <telerik:RadTreeViewItem Header="Item #1.1"></telerik:RadTreeViewItem>
                                <telerik:RadTreeViewItem Header="Item #1.1"></telerik:RadTreeViewItem>
                                <telerik:RadTreeViewItem Header="Item #1.1"></telerik:RadTreeViewItem>
                            </telerik:RadTreeViewItem>
                            <telerik:RadTreeViewItem Header="Item #2" />
                            <telerik:RadTreeViewItem Header="Item #3" />
                        </telerik:RadTreeView>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
    </Grid>
</Window>


So if I slide out the pane and right click the tree node, I get a null result whereas I get the RadTreeViewItem when the pane is pinned.  I'm I using the control incorrectly?
Petar Mladenov
Telerik team
 answered on 20 May 2011
3 answers
267 views

 

Hello,
is it possible, in SchedulerView Control , too bind a context menu to an appointment?
Josef
Hristo
Telerik team
 answered on 20 May 2011
4 answers
106 views
Hi guys n gals,

I have a RadDocking control...
<telerik:RadDocking Grid.Row="1">
   <telerik:RadDocking.DocumentHost>
       <telerik:RadSplitContainer>
           <telerik:RadPaneGroup>
               <telerik:RadDocumentPane Header="{Binding Path=CurrentInstance.Name}" CanUserClose="False">
                   <View:InstanceEditorView />
               </telerik:RadDocumentPane>
           </telerik:RadPaneGroup>
       </telerik:RadSplitContainer>
   </telerik:RadDocking.DocumentHost>
...
</telerik:RadDocking>
 
...

The InstanceEditorView is basically a StackPanel with 3 GroupBoxes stacked vertically.
Each GroupBox has a few RadMaskedTextBoxes (to provide just Watermark functionality).
When I mouseover the RadMaskedTextBoxes the RadDocumentPane flickers between the RadMaskedTextBox's hover and normal states (ie same colours - hint?).

I am using the Q1 2011 SP1 build and the ExpressionDark theme.

Any ideas how I can get rid of it?  Not really very keen on restyling the RadDocumentPane Header...
Tina Stancheva
Telerik team
 answered on 20 May 2011
0 answers
61 views


Hello,


Can you please tell me, how to bind the two types of object details in the Grid View using Data Table as ItemsSource?


For example:


I have a Class A which has property A1, A2 and Class B which has property B1 and B2.


        public class A

        {

            public string A1 { get; set; }

            public string A2 { get; set; }

        }

        public class B

        {

            public string B1 { get; set; }

            public string B2 { get; set; }

        }

I would like to display all the properties from Class A and one property (i.e. B1) from Class B as shown in below.

       //======================

       //  A1  |  A2   | B1

       //======================

       //   a1  | a2    | b1


How could we achieve this without creating View Model?


Thanks, 
Thanga

Thangalskhmi
Top achievements
Rank 1
 asked on 20 May 2011
0 answers
93 views
Hello,

I am using NumericUpDown control in myproject.I am having issue when I was trying to delete the value in control using delete button in keyboard,it is not deleting.....can you please help on this.

Cheers,
Rajesh.
Gudla
Top achievements
Rank 1
 asked on 20 May 2011
1 answer
162 views
i have radgridview inside grid column. The problem is that if i have to much text in some cell my grid will go outside screen.
The problem is that i dont want to have horizontal scrolls just i want  to fill grid by this radgridview and set column width in percentage.
So if user has other resolution or change app size radgridview will automaticaly change his column width. Please help me
Dimitrina
Telerik team
 answered on 20 May 2011
3 answers
87 views
I have an applicaion with 1 to many tabs that are in viewModel to view fashion with the ViewModels contained in a CollectionViewSource.  This works great for other controls that I can start an edit, switch tabs an retrun with edits in place.  The gridView is not maintaining selection, sorting or filtering (I believe because  it is reinitializing) when the tab it is contained on looses and regains focus.
The grid looses filters, sorting and selection.
Milan
Telerik team
 answered on 20 May 2011
2 answers
84 views
Hi
I am having some problems with the TreeListView when using the FrozenColumnCount property.
The column header does not align with the cells, ie. the cells take up more space than the header.
Looks like this ascii :)

| Header |
| Cell           |

Any idea what is causing this. I'm using the Official Q1 2011 Release.

Best regards
Kristján.
Kristjan Einarsson
Top achievements
Rank 1
 answered on 20 May 2011
3 answers
233 views
Hi there,

I have the following problem with ScheduleView and Drag and Drop. As recommended, I implemented a custom DragDropBehavior class that inherits from DefaultDragDropBehavior. In here everything works fine. After the "public override void Drop(DragDropState state)" method was called, the new created appointment is passed to the AppointmentCreating event of the ScheduleView. My Problem is that I want to show the scheduler dialog as it would happen if AppointmentCreating event was produced by a doubleclick. Instead of showing the dialog the AppointmentSaving event handler is called immediatly. How can I achieve it that the dialog will be shown? Since I have different IResourceType objects in my scheduler I need the dialog to give the user the possibility to set them correctly.

thanks in advance,

michael
Rosi
Telerik team
 answered on 20 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?