Telerik Forums
UI for WPF Forum
3 answers
149 views
I there any code snippet (or already existing control) on how to make an option dialog like the one of Microsoft Word 2007.

I would like to use Telerik controls so that I can take advantage of the themes.

I'm using PRISM and my goal is to make a "options service" component in which different modules can push options view.

Regards,

Nicolas
Nicolas
Top achievements
Rank 1
 answered on 05 Jun 2012
7 answers
394 views
Hi,

I've implemented this helpful example code (http://demos.telerik.com/silverlight/#GridView/PrintAndExportWithRadDocument) and it is all working as expected, however the table that is created does not take up the whole width of the page. I notice it uses the column widths of the RadGridView, however they are not ideal in the A4 pdf. I would like the table that is created for the pdf to size itself based on content. Is this possible, and if so, how would I do it? I figure it's got something to do with this line:
cell.PreferredWidth = new TableWidthUnit((float)columns[i].ActualWidth);


Thanks
Iva Toteva
Telerik team
 answered on 05 Jun 2012
1 answer
157 views
I'm working on a project where I have a large amount of data stored in a database organized into a tree. I'm using the EntityFramework, so I'm using the QueryableEntityCollectionView to filter my data and a RadTreeView to display it.

However, I also need support for drag & drop to add/move/delete items. By default, the RadTreeView won't let me drop into this tree as it is. If it was an IList or an ObservableCollection, it will let me, but I need to be able to refresh/filter the visible nodes in the tree.

Is there a way to override the d&d support in RadTreeView to allow drops, and run custom code on drop complete?

I did see this post (http://www.telerik.com/community/forums/silverlight/treeview/use-drag-and-drop-to-rearrange-items-and-then-persist-order-back-to-database.aspx) but it's for silverlight and I don't think the WCF side is needed for a WPF + EF application.

Any advice?
Thanks!
Hristo
Telerik team
 answered on 05 Jun 2012
0 answers
140 views
When the list box lives inside a RadTileView, the OnDrop event will get fired twice with the same parameters.
<telerik:RadTileView>
    <telerik:RadTileViewItem>
 
        <Grid x:Name="LayoutRoot" Background="White">
            <Grid.Resources>
                <Style TargetType="ListViewItem">
                    <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True"></Setter>
                </Style>
                <DataTemplate x:Key="ApplicationTemplate">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Margin="5" Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
                    </StackPanel>
                </DataTemplate>
            </Grid.Resources>
            <Grid.ColumnDefinitions>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <ListView x:Name="ApplicationList" ItemTemplate="{StaticResource ApplicationTemplate}" AllowDrop="True"/>
            <ListView x:Name="MyAppList" Background="Gray" Grid.Column="1" 
            ItemTemplate="{StaticResource ApplicationTemplate}" AllowDrop="True"/>
        </Grid>
    </telerik:RadTileViewItem>
</telerik:RadTileView>


public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
        ObservableCollection<Item> items = new ObservableCollection<Item>();
        for (int i = 1; i <= 10; i++)
            items.Add(new Item() { Name = string.Format("item {0}", i) });
        ApplicationList.ItemsSource = items;
        MyAppList.ItemsSource = new ObservableCollection<Item>();
 
        DragDropManager.AddDragInitializeHandler(ApplicationList, OnDragInitialize);
        DragDropManager.AddDragInitializeHandler(MyAppList, OnDragInitialize);
        DragDropManager.AddGiveFeedbackHandler(ApplicationList, OnGiveFeedback);
        DragDropManager.AddGiveFeedbackHandler(MyAppList, OnGiveFeedback);
        DragDropManager.AddDragDropCompletedHandler(ApplicationList, OnDragCompleted);
        DragDropManager.AddDragDropCompletedHandler(MyAppList, OnDragCompleted);
        DragDropManager.AddDropHandler(ApplicationList, OnDrop);
        DragDropManager.AddDropHandler(MyAppList, OnDrop);
    }
 
    private void OnDragInitialize(object sender, DragInitializeEventArgs args)
    {
        args.AllowedEffects = DragDropEffects.Move;
        //args.AllowedEffects = DragDropEffects.All;
        args.Data = ((FrameworkElement)args.OriginalSource).DataContext;
        args.DragVisual = new ContentControl { Content = args.Data, ContentTemplate = LayoutRoot.Resources["ApplicationTemplate"] as DataTemplate };
    }
 
    private void OnGiveFeedback(object sender, Telerik.Windows.DragDrop.GiveFeedbackEventArgs args)
    {
        System.Diagnostics.Trace.WriteLine(string.Format("{0} - OnGiveFeedback sender={1}", DateTime.Now, sender));
        args.SetCursor(Cursors.Arrow);
        args.Handled = true;
    }
 
    private void OnDrop(object sender, Telerik.Windows.DragDrop.DragEventArgs args)
    {
        System.Diagnostics.Trace.WriteLine(string.Format("{0} - OnDrop sender={1}", DateTime.Now, sender));
        ((IList)(sender as ListBox).ItemsSource).Add(((DataObject)args.Data).GetData(typeof(Item)));
    }
 
    public void OnDragCompleted(object sender, Telerik.Windows.DragDrop.DragDropCompletedEventArgs args)
    {
        System.Diagnostics.Trace.WriteLine(string.Format("{0} - OnDragCompleted sender={1}", DateTime.Now, sender));
        ((IList)(sender as ListBox).ItemsSource).Remove(args.Data);
    }
}
 
public class Item
{
    public string Name { get; set; }
}

Wenrong
Top achievements
Rank 1
 asked on 05 Jun 2012
0 answers
87 views
I have implemented a basic drag-n-drop using Telerik's new DragDropManager, pretty much the same as instructed here http://www.telerik.com/help/wpf/dragdropmanager-getting-started.html except that I am using ListView instead of ListBox.

Although it works, but I need help on the following two things:
  1. How to I limit the drag-n-drop so that it can only happen between the two listviews? i.e. disallow dropping to the same listview as the drag source.
  2. How to change cursor based on the above criteria? I try to monitor OnGiveFeedback(), but the sender is always the drag source...
Wenrong
Top achievements
Rank 1
 asked on 05 Jun 2012
0 answers
103 views
Hi guys,
basically I have a class derived from GridViewGroupFooterCell, and I need to replace GridViewGroupFooterCell with the derived one in the GridView. Do you guys have any idea how I can archive this?

Thanks in advance.

-Henry
heng
Top achievements
Rank 1
 asked on 05 Jun 2012
3 answers
95 views
Is it possible to 'freeze' the groupheader row?
This way the current group would always be visible while (vertically) scrolling the data in the gridview.
Vlad
Telerik team
 answered on 05 Jun 2012
1 answer
184 views

Hi,

 

I have a requirement

 

Requirement 1# : Inside a Hirerchy Template placed 2 Grids where in

1st grid 3 columns where 1 column has Combo Box loaded with Values.

 

For ex: Football, Disco

 

If i select Football, 2 grid placed inside Hirechy Template should be visible or else visbility of that grid should be collapsed.

How can i solve this.

 

Requirement 2#: Can i pass Observable collection as converter parameter

 

<Radcombobox selecteditem={Binding collection, converter={}} -> to show as like A,B,C (Selected Items as comma separated)

 

<controls:RadGridView Name="clubsGrid" 
                      ItemsSource="{Binding Clubs}" Grid.Row="0" 
                  AutoGenerateColumns="False" IsReadOnly="True" SelectionMode="Single" DataContext="{StaticResource MyViewModel}">
            <controls:RadGridView.ChildTableDefinitions>
                <controls:GridViewTableDefinition/>
            </controls:RadGridView.ChildTableDefinitions>
            <controls:RadGridView.Columns>
                <controls:GridViewDataColumn DataMemberBinding="{Binding Name}"
                                            Header="Est."></controls:GridViewDataColumn>
                <controls:GridViewDataColumn DataMemberBinding="{Binding Established}"></controls:GridViewDataColumn>
            </controls:RadGridView.Columns>
            <controls:RadGridView.HierarchyChildTemplate>
                <DataTemplate                      
                                            <controls:RadGridView Name="playersGrid" 
                                     ItemsSource="{Binding Players}" 
                                     AutoGenerateColumns="False" EnableRowVirtualization="False" EnableColumnVirtualization="False"
                                        <controls:RadGridView.ChildTableDefinitions>
                <controls:GridViewTableDefinition/>
            </controls:RadGridView.ChildTableDefinitions>

                            <controls:RadGridView.Columns>
                                <controls:GridViewDataColumn DataMemberBinding="{Binding Name}">                                    
                                </controls:GridViewDataColumn>
                                <controls:GridViewDataColumn DataMemberBinding="{Binding SelectedItem.Name}">
                                    <controls:GridViewDataColumn.CellEditTemplate>
                                        <DataTemplate>
                                            <RadControls:RadComboBox ItemsSource="{Binding Hobbies, Mode=OneTime}" SelectedItem="{Binding SelectedItem,Mode=TwoWay}" SelectedValue="Name" DisplayMemberPath="Name" >                                                
                                            </RadControls:RadComboBox>                                            
                                        </DataTemplate>
                                    </controls:GridViewDataColumn.CellEditTemplate>
                                </controls:GridViewDataColumn>                         
                            </controls:RadGridView.Columns
                                    

<

 

 

telerik:RadGridView.HierarchyChildTemplate>

 

 

 

 

<HierarchicalDataTemplate>

 


                                    <controls:RadGridView Name="Hobbies" 
                                     ItemsSource="{Binding Hobbies}" 
                                     AutoGenerateColumns="True" EnableRowVirtualization="False" EnableColumnVirtualization="False"/>

            
                        </controls:RadGridView>

</

 

 

HierarchicalDataTemplate>

 

 

 

 

</telerik:RadGridView.HierarchyChildTemplate>

 


                                                                </DataTemplate>
            </controls:RadGridView.HierarchyChildTemplate>
        </controls:RadGridView>
Prakash
Top achievements
Rank 1
 answered on 05 Jun 2012
1 answer
106 views
I,

in my project I use Telerik V2010.3.1314.35 and with my RadGridView, when I click on the filter icon in a column header, sometime the filter dialog appear behind the grid ?!?

Thank's
Vlad
Telerik team
 answered on 05 Jun 2012
2 answers
183 views
I have created a custom popup user control. This control covers the entire application with a gray semi-transparent overlay with a message in the middle. 

I add the control like this which makes it the last control in the grid and putting it on top of all other objects.
Grid mainGrid = (Grid)App.Current.MainWindow.Content;
mainGrid.Children.Insert(mainGrid.Children.Count, this);

I have a docking control in this grid and as long as everything is docked the overlay works great. However, as soon as I pull one of the RadPanes into a separate ToolWindow that tool window is always on top of my overlay user control. Is there anyway to do an overlay that would be on top of the ToolWindow as well?

Dev
Top achievements
Rank 1
 answered on 04 Jun 2012
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?