Telerik Forums
UI for WPF Forum
1 answer
97 views
Hi,

can we have a Treeview in the dropdown or look like dropdown?

when user click on the down arrow (on the dropdown), it should display the treeview.

Please let me know any example code or how to make it possible.

thanks,
Suman
Petar Mladenov
Telerik team
 answered on 07 Jun 2011
4 answers
87 views
Hello,
I´m adding columns into the grid through behindcode. I want to show group title but i dont want to show footer title, I´m try to do this in behindcode:

<telerik:GridViewDataColumn.Footer>
    <GridView:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center" Grid.Column="4">
        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <TextBlock VerticalAlignment="Center" Text="{Binding FormattedValue}" />
            </DataTemplate>
        </ItemsControl.ItemTemplate>                           
    </GridView:AggregateResultsList>
</telerik:GridViewDataColumn.Footer>



I do this but it doesn´t work:

var bindingFooter = new Binding { Path = new PropertyPath("FormattedValue") };
var frameworkElementFactoryFooter = new FrameworkElementFactory(typeof(TextBlock));
frameworkElementFactoryFooter.SetBinding(TextBlock.TextProperty, bindingFooter);
frameworkElementFactoryFooter.SetValue(FrameworkElement.HorizontalAlignmentProperty, HorizontalAlignment.Right);

var dataTemplateFooter = new DataTemplate { VisualTree = frameworkElementFactoryFooter };

dataTemplateFooter.Seal();

var itemControl = new ItemsControl() { ItemTemplate = dataTemplateFooter };

 

var listaAgregada = new AggregateResultsList();
listaAgregada.Items.Add(itemControl);
gridViewDataColumn.Footer = listaAgregada;



Thanks

 

 

 

 

 

 

Gerardo
Top achievements
Rank 1
 answered on 06 Jun 2011
3 answers
136 views
Hi
I have GRidview with this Column
<telerik:GridViewDataColumn Header="In"  DataMemberBinding="{Binding TimeIn}" >
                                    <telerik:GridViewDataColumn.CellEditTemplate>
                                        <DataTemplate>
                                            <telerik:RadDateTimePicker Culture="en-GB"  SelectedDate="{Binding TimeIn}" TimeInterval="0:30:00" IsTooltipEnabled="False"/>
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellEditTemplate>
                                </telerik:GridViewDataColumn>

Now this column doesnt set SelectedDate to bounded date and i thought to do other way around on BeginningEdit routine.

I want to know how to get DateTimePicker control while edit mode to setup manually databound value to Datetimepicker.

anyhelp please.


Kind Regards:
Pavel Pavlov
Telerik team
 answered on 06 Jun 2011
16 answers
440 views
Please help...

I am trying to figure out how to do a simple RadPanelBar with 2 related tables. We will use Northwind as an example, using Categories and Products and Linq.

I want each Header to be the Category and within each area, the Products for that Category.It seems that this should be straight forward.

I am able to do the Headers, but cannot figure out the items.

Below is my code:
------------ Window1.xaml.cs -----------
using System.Linq;
using System.Windows;

namespace RadPanelTest
{
    public partial class Window1 : Window
    {
        private IQueryable<Category> listCategory;
        private IQueryable<Product> listProduct;

        public Window1()
        {
            InitializeComponent();
            Setup();
        }

        public void Setup()
        {
            this.DataContext = this;
            LinqTestDataContext ltdc = new LinqTestDataContext();
            ListCategory = from c in ltdc.Categories select c;
            ListProduct = from p in ltdc.Products select p;
        }

        public IQueryable<Category> ListCategory
        {
            get { return listCategory; }
            set { listCategory = value;}
        }

        public IQueryable<Product> ListProduct
        {
            get { return listProduct; }
            set { listProduct = value; }
        }
    }
}
---------------------------------
----------- Window1.xaml --------------------
<Window x:Class="RadPanelTest.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    Title="Window1" Height="350" Width="500"
    >
    <Grid>
        <telerik:RadPanelBar Margin="0" ItemsSource="{Binding Path=ListCategory}" >
            <telerik:RadPanelBar.ItemTemplate>
                <HierarchicalDataTemplate >
                    <HeaderedContentControl>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding CategoryName}" />
                        </StackPanel>
                    </HeaderedContentControl>
                </HierarchicalDataTemplate>
            </telerik:RadPanelBar.ItemTemplate>
        </telerik:RadPanelBar>
    </Grid>
</Window>

Petar Mladenov
Telerik team
 answered on 06 Jun 2011
0 answers
109 views
I have a generic CellStyleSelector that is applying styles based on the value the cell is bound to. Column and Row Virtualization is enabled on the grid. My style selector is reading the value of cell. When SelectStyle is called the value of the cell does not match the value of the underlying property on the object to which the column is bound. This is causing the wrong styles to be displayed after the user scrolls the grid.

Code below

public class GridViewCellStyleSelector : StyleSelector
{
    public override Style SelectStyle(object item, DependencyObject container)
    {
        if (container is Telerik.Windows.Controls.GridView.GridViewCell)
        {
            return SelectMyStyleForValue(((GridViewCell)container).Value);
        }
        else
        {
            return null;
        }
    }
}

The value of the ((GridViewCell)container).Value does not match the property on the item. This need this to be a generic method, hence this method does not know what property to evaluate on the item parameter. Is there a way to read the property on the item which the cell is bound to? Or should the value of the cell be updated before SelectStyle is called? I understand that virtualization is replacing the values of the cells and I do not want to disable this feature as my grid has a lot of data. 

I am using the latest internal build binaries 2011.1.530.40

Thanks


Mat
Top achievements
Rank 1
 asked on 06 Jun 2011
0 answers
465 views

I' have a Grid with various columns. For eg. Grid havng a column with status. I want to enable / disable the buttons(edit button, cancel button) as per the status (that particular row selected). their are other columns in grid as wel. 

<Button x:Name="btnEdit" Content="Edit" Style="{StaticResource GreyButtonStyle}" IsEnabled="{Binding EditEnable}" >
          <i:Interaction.Triggers>
            <i:EventTrigger EventName="Click">
              <cmd:EventToCommand Command="{Binding Path=EditCustomerOrdersCommand}" PassEventArgsToCommand="True" />
            </i:EventTrigger>
          </i:Interaction.Triggers>
        </Button>
<Telerik:GridViewDataColumn DataMemberBinding="{Binding Status}" Header="Status" TextWrapping="NoWrap" Width="*" />


I' using MVVM Pattern.
Nikhil Jain
Top achievements
Rank 1
 asked on 06 Jun 2011
3 answers
154 views
System Specifications:
   - RadControls for WPF Q3 2010 SP1
   - Windows XP SP3
   - VS2010 .NET 4.0
   - C#

The DragAndDrop TreeToGrid example in the WPF Demos shows dragging from a Grid to TreeView. I have implemented a WPF application in a TileView that contains several tiles with TreeViews and GridViews in separate tiles. Drag and Drop from a TreeView to GridView works however drag and drop from the GridView to TreeView does not. Is this functionality supported in RadControls for WPF Q3 2010 SP1? The DragAndDrop TreeToGrid example in the WPF Demos shows example code but not XAML. Is the TreeToGrid XAML viewable?

Thanks,
Mike
Maya
Telerik team
 answered on 06 Jun 2011
3 answers
339 views
Wondering if anyone has a solution to this. I have a SelectionBoxTemplate on my combo box but it keeps getting the right hand side of the template cut-off.. The template is basically the same template that I use for the ItemTemplate without a border.
 
I am hoping to avoid having to hard code a width into the ComboBox to ensure that this doesn't happen:(

Cheers!
AJ
Dani
Telerik team
 answered on 06 Jun 2011
2 answers
88 views
Hi,

i have UserControl that contains a RadGridView and a RadCarousel. The ItemSource of the RadCarousel is bound to the SelectedItem of the Grid and has a filter. So far so good.

The Problem is: when the user filters the grid, the filter of the RadCarousel is beeing removed. How can i keep the filter? Is there something wrong with my databinding?

here is the source of the xaml:

<telerik:RadGridView x:Name="uxCustomerGrid" ItemsSource="{Binding Customers}" Grid.Row="0" DataLoadMode="Asynchronous" IsReadOnly="True" EnableColumnVirtualization="True" EnableRowVirtualization="true" SelectionMode="Extended" RowIndicatorVisibility="Collapsed" IsSynchronizedWithCurrentItem="True" />
        <telerik:RadCarousel Name="uxEmployeeCarousel" Grid.Row="1" DataContext="{Binding ElementName=uxCustomerGrid, Path=SelectedItem}" ItemsSource="{Binding Bedienstete}" ItemTemplate="{DynamicResource EmployeeTemplate}" IsSynchronizedWithCurrentItem="True">
            <telerik:RadCarousel.FilterDescriptors>
                <telerik:FilterDescriptor Operator="IsEqualTo" Member="BEDDeaktiviert" Value="0">
                </telerik:FilterDescriptor>
            </telerik:RadCarousel.FilterDescriptors>
        </telerik:RadCarousel>
Mike
Top achievements
Rank 2
 answered on 06 Jun 2011
3 answers
299 views
I can't post any code at the moment but I have a standard radgridview on my view which presents data from an entity framework entity.  I have GridViewDataColumns for all but one column which is an expression column. On load the column footer totals show the correct value, i.e. the GridViewDataColumn.AggregateFunction sumfunction routine appears to run in all but the expression column. I have two issues:

  1. when I change any value in the grid the column footers are not updated. They do total across and upate their respective row total cell (which is my expression column). And all have the appropriate aggregate function tdefined in the xaml for the type of grid column.
  2. the expression column total (value in the footer) is never updated at any time and that includes on initial load. It always shows '0'.

My implementation is WPF - MVVM using Caliburn Micro framework.

Since I can't post any code at the moment (it's on another computer) I'm looking for suggestions as to what could be the issue so anyone and everyone, please chime in!

I have tried invoking the CalculateAggregates function in the code behind in the CellEditEnding event and it is invoked but still no upates occur.

Any and all assistance, suggestions are greatly appreciated.

Pete
Top achievements
Rank 1
 answered on 05 Jun 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
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?