Telerik Forums
UI for WPF Forum
2 answers
88 views
Hi -- I'm wondering about the best idea for a UI metaphor I'm trying to replicate.  I'm trying to create something like a query builder along the lines of the Work Item Query Editor window within VS 2010.  This is shown in two places using two slightly different approaches in the following web page:TFS 2010 Work Item Tracking Blog Entry.

The key screenshots are the first and the fifth.  I'm specifically looking for thoughts on how to achieve the effect they use for grouping and ungrouping conditions in the query.  If you highlight two (or more) adjacent rows that are not already grouped, it allows you to group them.  If you do that, there is a visual indicator that now spans the grouped rows.  If you leave them highlighted, you can ungroup them.  Further, you can continue the grouping beyond the grouping you've already created.

I've got something similar I need to create and am looking for some thoughts on how to do this with the Telerik controls (I figured the GridView would be the area where this would apply). 

It doesn't need to look exactly like the VS 2010 editor, just something that will visually make sense to users.

Thanks in advance for any thoughts on this....
-Erik
Erik
Top achievements
Rank 2
 answered on 07 Oct 2011
1 answer
200 views
Hi,

I am trying to have a an autocomplete combobox with an Editorstyle at the sametime.

The autocomplete works without the Editorstyle, but putting the editorstyle in like this, will stop the autocomplete from working.

Any idears ?.

Best

Ole



<
telerik:GridViewComboBoxColumn UniqueName="cmbActionBy"  IsComboBoxEditable="True" Header="Action by" DataMemberBinding="{Binding Path=tblContact}"  telerik:TextSearch.TextPath="ShortName" DisplayMemberPath="ShortName" Width="80" SortMemberPath="tblContact.ShortName" EditorStyle="{Binding Source={StaticResource MyStyle}}">

 

 

<Style x:Key="MyStyle" TargetType="telerik:RadComboBox">
 
           <Setter Property="ItemTemplate">
 
               <Setter.Value>
 
                   <DataTemplate>
 
                       <StackPanel Orientation="Vertical"   VerticalAlignment="Center">
                           <TextBlock Text="{Binding Path=Name}" TextAlignment="Left" HorizontalAlignment="Left" />
                           <TextBlock Text="{Binding Path=ShortName}" TextAlignment="Right" HorizontalAlignment="Right" Margin="5,0,0,0"/>
                       </StackPanel>
 
                   </DataTemplate>
 
               </Setter.Value>
 
           </Setter>
 
       </Style>

Maya
Telerik team
 answered on 07 Oct 2011
1 answer
176 views
I have a dialog with a grid view. When the dialog is closed, the view is kept in memory. I used ANTS memory profile to find the cause. See the attached retention graph.

It shows that my view (ImportRecipesView) is references by a grid row which is kept in memory by some event handlers. Do you have any idea why the event handlers aren't released when the dialog is closed?

Am I missing something?

BTW: Here's a link how to read the graph: Retention Graph
Vlad
Telerik team
 answered on 07 Oct 2011
2 answers
183 views

I thought I had everything going well with my rad datepicker column from an autogenerated columns radgridview (chosen using a template selector), and it works well, except that when I add the row, it is cleared, and the user must then edit the column in the grid to reselect the date.

I think that to solve this both datatemplates for my date column (cell edit template, and cell template) must have the same binding (one is text the other rad datepicker control).

Unfortunately I cant seem to bind the RadDatePicker control's selected value to anything in my view model, without getting the error

 

property not found on 'object' ''DataRowView'


Note that if i just bind SelectedValue="1/1/1991" this always works, but when i do SelectedValue="{Binding RadDateSourceProp}" i get the error.

Any suggestions?

forgot to add, the grid itself is bound to a datatable as itemsource.
Chris
Top achievements
Rank 1
 answered on 07 Oct 2011
1 answer
110 views
Hi!,

How do I show the value of a bar when I'm hovering over the bar's legend? Just as the value is displayed when you hover over the bar itself.

I'm am using this to highlight the bar I'm hovering on:

productionSeriesMapping.SeriesDefinition.InteractivitySettings.HoverScope = InteractivityScope.Series


Thanks, Jose
Evgenia
Telerik team
 answered on 07 Oct 2011
1 answer
121 views
Hi, I've tried to reproduce the "Getting Started" example of DragAndDrop but I can't make it work (drag event not fired).

Here my XAML code:

<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="WpfApplication5.GettingStarted"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
         
        <DataTemplate x:Key="ApplicationDragTemplate">
 
            <Image Source="{Binding IconPath}"
               Stretch="None"
               VerticalAlignment="Top" />
        </DataTemplate>
        <Style TargetType="ListBoxItem"
           x:Key="draggableItemStyle">
            <Setter Property="HorizontalContentAlignment"
               Value="Stretch" />
            <Setter Property="telerik:RadDragAndDropManager.AllowDrag"
               Value="True" />
 
        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot"
       Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200" />
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="200" />
        </Grid.ColumnDefinitions>
        <ListBox x:Name="allApplicationsBox"
               telerik:RadDragAndDropManager.AllowDrop="True"
               ItemContainerStyle="{StaticResource draggableItemStyle}">
             
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Width="150">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Image Grid.Row="0"
                           HorizontalAlignment="Center"
                           Source="{Binding IconPath}"
                           Width="32"
                           Height="32"
                           Margin="0 0 5 0" />
                        <TextBlock Grid.Row="1"
                               Text="{Binding Name}"
                               FontWeight="Bold"
                               HorizontalAlignment="Center" />
                        <TextBlock Text="{Binding Author}"
                               Grid.Row="2"
                               HorizontalAlignment="Center" />
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <!--My Applications-->
        <ListBox x:Name="myApplicationsBox"
               telerik:RadDragAndDropManager.AllowDrop="True"
               ItemContainerStyle="{StaticResource draggableItemStyle}"
               Grid.Column="2">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel VerticalAlignment="Stretch"
                           HorizontalAlignment="Stretch">
                        <Image Source="{Binding IconPath}"
                           Margin="0 0 3 0"
                           HorizontalAlignment="Center" />
                        <TextBlock Text="{Binding Name}"
                               HorizontalAlignment="Center" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <telerik:RadUniformGrid Columns="3"
                                       HorizontalAlignment="Left"
                                       VerticalAlignment="Top" />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
        </ListBox>
    </Grid>
</UserControl>

And here my C# code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using Telerik.Windows.Controls.DragDrop;
using Telerik.Windows.Controls;
 
namespace WpfApplication5
{
 
    public class ApplicationInfo
    {
        public ApplicationInfo(string iconPath, string name, string author)
        {
            this.IconPath = iconPath;
            this.Name = name;
            this.Author = author;
        }
        public String IconPath
        {
            get;
            set;
        }
        public String Name
        {
            get;
            set;
        }
        public String Author
        {
            get;
            set;
        }
    }
 
    public partial class GettingStarted : UserControl
    {
        public static ObservableCollection<ApplicationInfo> GenerateApplicationInfos()
        {
            ObservableCollection<ApplicationInfo> data = new ObservableCollection<ApplicationInfo>();
            for (int i = 1; i <= 5; i++)
            {
                data.Add(new ApplicationInfo("Images/nature" + i + ".jpg", "Nome" + i, "Autore" + 1));
            }
            return data;
        }
        private ObservableCollection<ApplicationInfo> allApplications = GenerateApplicationInfos();
        private ObservableCollection<ApplicationInfo> myApplications = new ObservableCollection<ApplicationInfo>();
        public GettingStarted()
        {
            InitializeComponent();
            allApplicationsBox.ItemsSource = allApplications;
            myApplicationsBox.ItemsSource = myApplications;
 
 
            RadDragAndDropManager.AddDragQueryHandler(this, OnDragQuery);
            RadDragAndDropManager.AddDragInfoHandler(this, OnDragInfo);
            RadDragAndDropManager.AddDropQueryHandler(this, OnDropQuery);
            RadDragAndDropManager.AddDropInfoHandler(this, OnDropInfo);
        }
        // OnDragQuery event handler
        private void OnDragQuery(object sender, DragDropQueryEventArgs e)
        {
            ListBoxItem listBoxItem = e.Options.Source as ListBoxItem;
            ListBox box = ItemsControl.ItemsControlFromItemContainer(listBoxItem) as ListBox;
            if (e.Options.Status == DragStatus.DragQuery && box != null)
            {
                e.Options.Payload = box.SelectedItem;
                ContentControl cue = new ContentControl();
                cue.ContentTemplate = this.Resources["ApplicationDragTemplate"] as DataTemplate;
                cue.Content = box.SelectedItem;
                e.Options.DragCue = cue;
                e.Options.ArrowCue = RadDragAndDropManager.GenerateArrowCue();
            }
            e.QueryResult = true;
        }
        // OnDropQuery event handler
        private void OnDropQuery(object sender, DragDropQueryEventArgs e)
        {
            ItemsControl box = e.Options.Destination as ItemsControl;
            IList<ApplicationInfo> itemsSource = box.ItemsSource as IList<ApplicationInfo>;
            ApplicationInfo payload = e.Options.Payload as ApplicationInfo;
            e.QueryResult = payload != null && !itemsSource.Contains(payload);
        }
        // OnDropInfo event handler
        private void OnDropInfo(object sender, DragDropEventArgs e)
        {
            ItemsControl box = e.Options.Destination as ItemsControl;
            IList<ApplicationInfo> itemsSource = box.ItemsSource as IList<ApplicationInfo>;
            ApplicationInfo payload = e.Options.Payload as ApplicationInfo;
            if (e.Options.Status == DragStatus.DropComplete)
                if (!itemsSource.Contains(payload))
                    itemsSource.Add(payload);
        }
        // OnDragInfo event handler
        private void OnDragInfo(object sender, DragDropEventArgs e)
        {
            ListBoxItem listBoxItem = e.Options.Source as ListBoxItem;
            ListBox box = ItemsControl.ItemsControlFromItemContainer(listBoxItem) as ListBox;
            IList<ApplicationInfo> itemsSource = box.ItemsSource as IList<ApplicationInfo>;
            ApplicationInfo payload = e.Options.Payload as ApplicationInfo;
            if (e.Options.Status == DragStatus.DragComplete)
            {
                if (payload != null && itemsSource.Contains(payload))
                {
                    itemsSource.Remove(payload);
                }
            }
        }
    }
}


 Can anyone help me?

Thank You
Sergio
Maya
Telerik team
 answered on 07 Oct 2011
0 answers
182 views
Hi,

I am using this solution : http://www.telerik.com/community/forums/wpf/gridview/binding-to-the-isexpandable-proeprty.aspx 
An i want to show a unique HierarchyItem expanded.

And when I use this code, the IsExpanded property is reseted :

private void MyGrid_RowIsExpandedChanged(object sender, RowEventArgs e)
        {
            if (changing)
                return;
 
            this.changing = true;
 
            if ((e.Row as GridViewRow).IsExpanded)
            {
                this.MyGrid.CollapseAllHierarchyItems();
                this.MyGrid.ExpandHierarchyItem(e.Row.DataContext);
 
            }
 
            this.changing = false;
        }
 
        private void AttributesGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            ExpandHierarchyItem((RadGridView)sender);
        }
 
        private void ExpandHierarchyItem(RadGridView sender)
        {
            sender.CollapseAllHierarchyItems();
            sender.ExpandHierarchyItem(sender.SelectedItem);
        }
 
        private void MyGrid_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
        {
            ExpandHierarchyItem((RadGridView)sender);
        }

Do you have a way for to resolve this problem

Thanks
Regards

rad
Top achievements
Rank 1
 asked on 07 Oct 2011
1 answer
154 views
Currently using RadControls for WPF Q2 2011.  It seems that the sparkline normal r4ange is not rendered when the NormalRangeTop and NormalRangeBottom are BOTH set to values that lie outside the range of data points. 

So, for example, if my data points range from 20 to 40, then

When Top and Bottom are:
39 and 0, normal range appears
41 and 0, does not appear
70 and 20, normal range appears
70 and 10, doea not appear

Is this by design?  Or is this a bug?  Or am I missing a property setting?  If by design, plase explain.
Thanks
Dan
Yavor
Telerik team
 answered on 07 Oct 2011
2 answers
266 views
Hi,

I have a gridview and the gridview has as SelectionMode="Multiple" and SelectionUnit="Cell".
My problem is now that the selection of the cells disappears after sorting or filtering the grid.  But I want that the selected cells stay selected also after sorting the grid.
If I use SelectionUnit="FullRow", then the selection of the rows don't disappear.

Why does the gridview act like this? Do I have to set some properties or do You know an easy way to implement this functionality on my own?

Thanks
Walter
Walter
Top achievements
Rank 1
 answered on 07 Oct 2011
3 answers
70 views
I want to set the Start visibility Indicator for the appointment as visible when the current date of the timelinecontrol  is greater than the start date of the appointment. Which means the start date of the appointment is not in the visible region of the timeline control, i want to see the indicators. Is it possible to achieve this?

The indicators work as I desire when there are no resources. I mean the status indicators are visible. Refer to the screenshot.Here there are no resources and we can see the indicators.




In the following screenshot we have resources but no continuation indicators

Boyan
Telerik team
 answered on 07 Oct 2011
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?