_treeView.AddHandler(RadDragAndDropManager.DropQueryEvent,
new
EventHandler<DragDropQueryEventArgs>(MainTree_DropQuery),
true
);
private
void
MainTree_DropQuery(
object
sender, DragDropQueryEventArgs e)
{
if
(Keyboard.Modifiers == ModifierKeys.Control)
{
TreeViewDragCue cue = e.Options.DragCue
as
TreeViewDragCue;
cue.DragActionContent =
"Copy To"
;
}
e.QueryResult = true;
}
Hi,
Assume I have fixed number of rows & node structure, and number of columns and columns data would change. When I come back to the screen, it should retain the previous node expand/collapse state.
Is there any way to achieve this functionality?
Thanks,
Suman
<
telerik:GridViewDataColumn
Header
=
"Account"
DataMemberBinding
=
"{Binding AccountName}"
FooterCellStyle
=
"{StaticResource GridNoLinesFooterStyle}"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<!--<
Button
Content
=
"{Binding AccountName}"
Command
=
"{Binding DataContext.OpenAccountCommand, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadGridView}}}"
CommandParameter
=
"{Binding}"
/>-->
<!--<
telerik:RadButton
Content
=
"{Binding AccountName}"
Command
=
"{Binding DataContext.OpenAccountCommand, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadGridView}}}"
CommandParameter
=
"{Binding}"
Style
=
"{StaticResource hyperlinkButtonStyle}"
/>-->
<
TextBlock
>
<
Hyperlink
Command
=
"{Binding DataContext.OpenAccountCommand, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadGridView}}}"
CommandParameter
=
"{Binding}"
>
<
TextBlock
Text
=
"{Binding AccountName}"
></
TextBlock
>
</
Hyperlink
>
</
TextBlock
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
<
telerik:GridViewBoundColumnBase.AggregateFunctions
>
<
telerik:CountFunction
Caption
=
"Count:"
/>
</
telerik:GridViewBoundColumnBase.AggregateFunctions
>
</
telerik:GridViewDataColumn
>
<
telerik:RadTreeListView x:Name="rtlvPeopleInfo" >
<!--Context Menu-->
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu x:Name="radPeopleContextMenu" Opened="radPeopleContextMenu_Opened" >
<telerik:RadMenuItem x:Name="rmiAssign_Engineer" Header="Assign Engineer"/>
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
<telerik:RadTreeListView.Columns>
<telerik:GridViewDataColumn Header="Future Hrs" TextAlignment="Right"/>
<telerik:GridViewDataColumn Header="Previous Hrs" TextAlignment="Right"/>
</telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>
Whenever I normally right click on any cell then it opens correctly and that is fine. But my requirement was if there is any unsaved data on page by cell edit, then when user right click on other cell it should show a message that "User changes will be lost, do u want to continue?". If yes then open the context menu as it is. So when there is any change on page then I show a messagebox with above confirmation message. Now if user selects "Yes" then the context menu opens on the top most left corner of the TreeListView, not on the cell right clicked. Please help me how I will open on same position the user mouse clicked, not the topmost left corner.
So the problem arises only when i open the messagebox confirmation.