Telerik Forums
UI for WPF Forum
5 answers
100 views
At the current max of "4", I cannot create a strip of 6 or more months (for example). Is there a workaround for showing more than 4 columns/rows, or is there some technical issue in doing so?

Thanks - Mitch
Mitchell
Top achievements
Rank 1
 answered on 09 Jan 2015
3 answers
315 views
Hi,

It seems if I use the RadGridView, 
the option "click here to add new row" is only visible after I edited the first row.
If i use 'tab' to navigate through the cells i eventually enter a new second row.
But at that moment the option "click here to add new row" is not available anymore.
Is it possible to make that option ALWAYS available and make it not dissapear when i enter a new row by 'tabbing'

thanks,
simon
Stefan
Telerik team
 answered on 09 Jan 2015
3 answers
326 views
hi,
following setup: a radpane with a user control with a grid that has two rows (row 1 is height auto, row 2 is height *), the second row contains a radgridview. the gridview holds four columns gridviewdatacolumn, nothing fancy. i'm assigning an observablecollection to the itemssource in the usercontrol.loaded event handler.

for some reason the column widths are not set when starting the software. instead they are as it looks like set to the minimum width. it worked before and i can't remember doing anything to this part of the application.

i have to resize the pane or a column a bit or re-assign the observablecollection to the itemssource and then the correct widths are applied. tried with ColumnWidth="*" and with Width="*" on the GridViewDataColumn entries. also setting AutoGenerateColumns to true shows the same result. setting ColumnWidth="Auto" at least shows the full content for each row but looks ugly because it leaves too much whitespace.

i also replaced the whole usercontrol with a backup i made yesterday but same result. works in the backup, not in the current version. replaced also the other controls with old code and it's still not working. 

any clue what could cause this behaviour or at least how i can force the gridview to recalculate the column sizes once the control is displayed?

        
<telerik:RadGridView Grid.Row="1" ColumnWidth="*" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ShowGroupPanel="False" AutoGenerateColumns="False" CanUserInsertRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" ShowColumnHeaders="True" CanUserSortColumns="False" RowIndicatorVisibility="Collapsed">
 
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Title, Mode=OneWay}"   IsReadOnly="True" Header="Chord" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding DisplayNotes, Mode=OneWay}"  IsReadOnly="True" Header="Notes" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding NumNotes, Mode=OneWay}"   IsReadOnly="True" Header="Notes"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding PlayKey, Mode=OneWay}"   IsReadOnly="True" Header="Play"/>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>
Ivan Ivanov
Telerik team
 answered on 09 Jan 2015
27 answers
1.0K+ views
Hi!

I've actually a radGridView and a RadDataPager.

The source of the RadDataPager.Source is bound to the radGridView.items.

It was working fine, but I found a problem: Sometimes I have to switch between tabs and select a specified object.

I'm using the RadGridView.SelectedItem =TheNewItem.

But if the new item is on another page, it just doesn't select anything. So how can I do that?

thank you!
Lawrence
Top achievements
Rank 2
Iron
 answered on 09 Jan 2015
5 answers
156 views
If I have a cell with string values
"value1" "value2" "value3"

In my custom filter, how do I get these values?

I have made this custom one, but I have hard coded the values

CustomItems = new ObservableCollection<CheckBoxCustomFilterType>
{
    new CheckBoxCustomFilterType { Checked = false, Text = "5016" },
    new CheckBoxCustomFilterType { Checked = true, Text = "25835" }
};


I need to get them instead and create a list, how would I retrieve those values? I cant seem to find an example, the date one is not applicably here

<UserControl
    x:Class="Systematic.KVK.InseminationPlan.UIL.Details.Windows.SemenBucket.CustomFilters.CheckBoxFilterControl"
    xmlns:localization="clr-namespace:Systematic.KVK.InseminationPlan.Localization"
    xmlns:customFilters="clr-namespace:Systematic.KVK.InseminationPlan.UIL.Details.Windows.SemenBucket.CustomFilters"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Systematic.KVK.WPFCommon;component/Style/ModernStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
 
    <Border x:Name="LayoutRoot" BorderThickness="1" BorderBrush="{StaticResource DarkGreenHoverColor}" Padding="5"
            Background="{StaticResource White}">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120" />
                <ColumnDefinition Width="120" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
 
            <CheckBox Margin="3, 0, 0, 8" Content="{x:StaticExtension localization:SemenBucketTexts.SelectAll}" Click="SelectAll" />
 
            <telerik:RadGridView
                Name="CheckBoxGridView"
                Grid.Column="0"
                Grid.ColumnSpan="2"
                Grid.Row="1"
                AutoGenerateColumns="False"
                CanUserDeleteRows="False"
                CanUserSelect="False"
                ShowColumnHeaders="False"
                CanUserReorderColumns="False"
                BorderThickness="0"
                HorizontalAlignment="Left"
                ItemsSource="{Binding CustomItems}">
                <telerik:RadGridView.Columns>
 
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=IsSelected}" Header=""
                                            EditTriggers="CellClick" IsReadOnly="True">
                        <telerik:GridViewDataColumn.HeaderCellStyle>
                            <Style TargetType="{x:Type telerik:GridViewHeaderCell}">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate>
                                            <CheckBox Margin="3, 0, 0, 8"
                                                Command="{Binding Path=DataContext.SelectedAllCommand, ElementName=ListTabViewName}"
                                                IsChecked="{Binding Path=DataContext.ShouldAllBeChecked, ElementName=ListTabViewName}"
                                                HorizontalAlignment="Left" VerticalAlignment="Center" />
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </telerik:GridViewDataColumn.HeaderCellStyle>
                        <telerik:GridViewDataColumn.CellTemplate>
                            <DataTemplate>
                                <CheckBox IsChecked="{Binding Path=Checked, Mode=TwoWay}"
                                          Content="{Binding Path=Text}"
                                          HorizontalAlignment="Left" VerticalAlignment="Center" />
                            </DataTemplate>
                        </telerik:GridViewDataColumn.CellTemplate>
                    </telerik:GridViewDataColumn>
 
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
 
            <Button Grid.Column="0" Grid.Row="2" Name="FilterButton"
                    Content="{x:StaticExtension localization:SemenBucketTexts.Filter}" Click="OnFilter" Margin="9" />
            <Button Grid.Column="1" Grid.Row="2" Name="ClearButton"
                    Content="{x:StaticExtension localization:SemenBucketTexts.Clear}" Click="OnClear" Margin="9" />
        </Grid>
    </Border>
</UserControl>
Codebehind
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.GridView;
using Telerik.Windows.Data;
 
namespace Systematic.KVK.InseminationPlan.UIL.Details.Windows.SemenBucket.CustomFilters
{
    /// <summary>
    /// Interaction logic for CheckBoxFilterControl.xaml
    /// </summary>
    public partial class CheckBoxFilterControl : IFilteringControl
    {
        public ObservableCollection<CheckBoxCustomFilterType> CustomItems { get; set; }
        private GridViewBoundColumnBase column;
        private CompositeFilterDescriptor compositeFilter;
 
        public CheckBoxFilterControl()
        {
            InitializeComponent();
 
            CustomItems = new ObservableCollection<CheckBoxCustomFilterType>
            {
                new CheckBoxCustomFilterType { Checked = false, Text = "5016" },
                new CheckBoxCustomFilterType { Checked = true, Text = "25835" }
            };
             
            DataContext = this;
        }
 
        private void OnFilter(object sender, RoutedEventArgs e)
        {
            column.DataControl.FilterDescriptors.Clear();
 
            compositeFilter = new CompositeFilterDescriptor();
            compositeFilter.LogicalOperator = FilterCompositionLogicalOperator.Or;
            string dataMember = column.DataMemberBinding.Path.Path;
            foreach (var checkBoxCustomFilterType in CustomItems)
            {
                if (checkBoxCustomFilterType.Checked)
                {
                    var filter = new FilterDescriptor(dataMember, FilterOperator.IsEqualTo, checkBoxCustomFilterType.Text);
                    compositeFilter.FilterDescriptors.Add(filter);
                }
            }
 
            if (!column.DataControl.FilterDescriptors.Contains(compositeFilter))
            {
                column.DataControl.FilterDescriptors.Add(compositeFilter);
            }
 
            IsActive = true;
        }
 
        private void OnClear(object sender, RoutedEventArgs e)
        {
            column.DataControl.FilterDescriptors.Reset();
 
            IsActive = false;
        }
 
 
        public void Prepare(Telerik.Windows.Controls.GridViewColumn column)
        {
            this.column = column as GridViewBoundColumnBase;
            if (this.column == null)
            {
                return;
            }
        }
 
        public bool IsActive { get; set; }
 
        private void SelectAll(object sender, RoutedEventArgs e)
        {
            var checkbox = (sender as CheckBox);
            if (checkbox == null || checkbox.IsChecked == null)
            {
                return;
            }
 
            foreach (var checkBoxCustomFilterType in CustomItems)
            {
                checkBoxCustomFilterType.Checked = checkbox.IsChecked.Value;
            }
        }
    }
}
Dimitrina
Telerik team
 answered on 09 Jan 2015
2 answers
113 views
Hello everyone,
I'm working with radAutoCompleteBox.
Is there a way to select an item from Javascript?

Thank You
Aneliya Petkova
Telerik team
 answered on 09 Jan 2015
1 answer
228 views
Hi all,

I updated to the latest version of Telerik's UI for WPF, from version 2013.1.403.40 to 2014.3.1305.40.

In our application we have RadListbox which is bound to a list of items. The datatemplate used holds 2 usercontrols and a button.
The usercontrol in itself has a numericupdown and maskedtextbox. So when all items are rendered there are five controls per listbox item/line.

Now in the past when the user selected one of the controls inside the datatemplate and then tabbed away, all controls in all the items would be cycled over, this is how the user wants to use it. Now with the new version this behavior is not present anymore, when the user selects for example the first maskedtextbox of the first item and tabs, the focus is moved to other fields outside of the listbox and when cycling further, the listbox its items (controls inside it) are never tabbed over again... When I just change the version of the Telerik dll's back to the old ones, I get the behaviour expected.

I've setup a small POC showing that this happens with the RadListBox but not with an ItemsControl.

Any help is appreciated, thnx in advance!

See http://1drv.ms/141ezct for the files.

Dwight
Kalin
Telerik team
 answered on 09 Jan 2015
9 answers
374 views
Hello,
I've a RadMaskedNumericInput with the mask  Mask="#9.4", I want to show _____.__ when the page loads up (null value binded) but I got ____0.00 why?

Thanks
Ankur
Top achievements
Rank 1
 answered on 09 Jan 2015
3 answers
310 views
Why does Telerik default back to the Microsoft.Win32 open file dialog rather than creating their own?
Petya
Telerik team
 answered on 09 Jan 2015
1 answer
195 views
Hey,

I am trying to make a custom LineTool but i am having some trouble changing the geometry for the inserted shape. Do you guys have some examples of making custom tools, feels like i am missing something, but haven't been able to find any resources on this area.

On MouseMove is create a new GeometryShape and set the geometry data to a line. But it still show a arc geomtry even thoug active shape holds a LineGeometry. Seem like DrawingService.InitializeDraw(shape, "PencilTool"); is wrong but use "LineTool" as paramter will result in no geometry at all.

Also a other issue is that i need the manipulation adorner to only show resize handles in the end of the line. I can override the style for the ManipulationAdorner, but the issues is i will also have other shapes that need all four resize handles?

This is my custom tool:

    public class LineTool : DrawingToolBase
    {
        private readonly RadDiagram _diagram;

        public const string ToolName = "LineTool";

        public LineTool(RadDiagram diagram)
            : base("LineTool")
        {
            _diagram = diagram;
            Cursor = Cursors.Cross;
        }

      
        public override bool MouseDown(PointerArgs e)
        {
            if (!IsActive)
                return false;

            DrawingService.StartDraw();
            DrawingService.DrawPoints(e.TransformedPoint, e.TransformedPoint);

            return base.MouseDown(e);
        }

        public override bool MouseMove(PointerArgs e)
        {
            if (!IsActive || !ToolService.IsMouseDown || (ToolService.IsControlDown || !DrawingService.IsDrawing))
                return false;
            
            if (DrawingService.ActiveShape == null)
            {
                var shape = CreateShape();
                shape.IsSelected = true;
                shape.Geometry = new LineGeometry(e.TransformedPoint, e.TransformedPoint);

                DrawingService.InitializeDraw(shape, "PencilTool"); //LineTool does not show anything
                //SelectionService.ClearSelection();
                
                return base.MouseMove(e);
            }


            if (DrawingService.AnchorPoints.Count() > 1)
                DrawingService.RemoveLastAnchorPoint();
                
            DrawingService.DrawPoints(e.TransformedPoint, e.TransformedPoint);
            return true;
        }

        public override bool MouseUp(PointerArgs e)
        {
            if (!IsActive || !DrawingService.IsDrawing)
                return base.MouseUp(e);
            CompleteTool();
            _diagram.ActiveTool = MouseTool.PointerTool;
            return true;
        }
    }


Petar Mladenov
Telerik team
 answered on 09 Jan 2015
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?