Telerik Forums
UI for WPF Forum
7 answers
295 views
Hi,

I need DateTimeCategoricalAxis.MajorTickInterval's value is dynamic.

For examaple:
I have a list binding with a LineSeries. the list's count are dynamic.
When the number of list is extremely small or large, it will be necessary to set the value of MajorTickIntrval dynamic.
So, the DateTimeCategoricalAxis.MajorTickInterval's value need to changed with List.count.
like:
//Count: List's count
//MajorStepNum: How many labels are there below the X axis.
MajorTickInterval = Count / MajorStepNum > 1 ? Count / MajorStepNum + 1 : 1;

But the DateTimeCategoricalAxis.MajorTickInterval can not be Binding.(will thrown an exception)
So, have other way can be done this? (Except for the assignment MajorTickInterval)

Thanks
Petar Marchev
Telerik team
 answered on 24 Oct 2014
1 answer
137 views
I have implemented a custom resizing service as per your guide http://www.telerik.com/help/wpf/raddiagram-howto-customize-resizing.html. However i wonder if it is possible to disable the small corners so that users dont try and resize shapes that cant be resized.
Zarko
Telerik team
 answered on 24 Oct 2014
3 answers
151 views
I have a GridView (WPF 4.5, Q2 2013) that has another GridView in its RowDetailsTemplate. When I set the width to "*" on any columns of the second RadGridView, the DetailsPresenter gets extremely long (about 10000 px), even though I only have two columns that should fit on the screen.

I found a strange solution: in a new style for RadGridView, if I wrap the GridViewVirtualizingPanel in a Grid and apply it to "SecondGridView" in the RowDetailsTemplate, the columns size normally. I am hesitant to do this because I don't understand why it works; is there a better way?

Here is what I am working with, where the columns get really long:

<DataTemplate x:Key="MyRowDetailsTemplate" >
        <Border >
            <controls3:RadGridView x:Name="SecondGridView" ItemsSource="{Binding MoreItems}">
                    <controls3:RadGridView.Columns>
                        <controls3:GridViewDataColumn Width="*"
                                                      MinWidth="200"
                                                      Header="Name" />
                        <controls3:GridViewDataColumn Width="75"
                                                      MinWidth="75"
                                                      Header="Status" />
                    </controls3:RadGridView.Columns>
                </controls3:RadGridView>
        </Border>
    </DataTemplate>
 
<controls:RadGridView Name="TemplateRoot"
                                      ItemsSource="{Binding MyItems}"
                                      RowDetailsTemplate="{DynamicResource MyRowDetailsTemplate}">
                    <controls:RadGridView.Columns>
                        <controls:GridViewDataColumn Width="*"
                                                     MinWidth="200"
                                                     Header="Name"/>
                        <controls:GridViewDataColumn Width="75"
                                                     MinWidth="75"
                                                     Header="Status"/>
                    </controls:RadGridView.Columns>
</controls:RadGridView>
Dimitrina
Telerik team
 answered on 24 Oct 2014
1 answer
321 views

Hello,

I have an application with a radspreadsheet and a button. When i click the button with the cell in edit mode (i have the cursor of the mouse inside it) i cant get the new value of the cell. Is there any way to end the edit mode of the current cell?.

When i write on C2 "1" ,exit the cell and click on save i get "1".


Then, when i write on C2 "2" , and click on save without exit the cell i still get "1" instead of "2".


Thanks!














Anna
Telerik team
 answered on 24 Oct 2014
4 answers
384 views
Hi Telerik,

I have this RadGridView:

<telerik:RadGridView IsFilteringAllowed="False" BorderBrush="#9AB400" Name="gridView" Grid.Column="0" ItemsSource="{Binding ChamberMeasurements}" AutoGenerateColumns="True" Margin="120,10,12,0" VerticalAlignment="Top" ShowGroupPanel="False">
</telerik:RadGridView>

When i click a row in the table created by the RadGridView then the selected row is not highlighted and i don't understand why. Should i set the color of the selected row somehow?

The ChamberMeasurements property is of type DataTable.

Can you tell me if i am doing something wrong or missing something?

Best regards,
Jeppe
Unisense
Top achievements
Rank 1
 answered on 24 Oct 2014
3 answers
325 views
Hi everyone,

I'm using two Telerik NumericUpDown controllers (lets say A and B)

If A is edited B is set to 0

If B is edited A is set to B.Value * Variable

If I use only the ValueChanged event I'm not able to implement this.

Is it possible to capture arrowUp or arrowDown clik events?


Thanks everyone, I hope I made myself clear, sorry if not it's my first post here.
Pooja
Top achievements
Rank 1
 answered on 23 Oct 2014
3 answers
208 views
I want to implement the following features using the Schedule View, Is there an example that can help me.

- Display specific dates for a resource for ex (calendar should display 17th Oct, 1st Nov and 25 Nov)
- I also have to do that same for multiple resources for ex calendar should display (For resource 1 -- 17th Oct and 1st Nov) (For resource 2 -- 20 Dec)
- Want to display a custom range, the user will be able to say show me calendar for next 4,5,7,10 days or show me calendar from 17 - 22

I believe if there is way to do the first 2 i should be able to use that to implement the last feature.

Thanks
vikas


Vikas
Top achievements
Rank 1
 answered on 23 Oct 2014
2 answers
119 views
Is it possible to set the schedule view to current month/week/day, The requirement is to have a button and when user clicks that month

- if the active view is month and lets say currently user is viewing Dec, on click of the button the view should automatically change to current month Oct
- same for week and day

Thanks
Vikas
  
Vikas
Top achievements
Rank 1
 answered on 23 Oct 2014
8 answers
409 views
I have a datagrid filled from an entity framework data model. 

One of the columns is a combobox and I need to bind the SelectedValue of the combobox to the navigation property of the entity and I need to bind the SelectedIndex to the ID. If I can't bind to both of those properties and keep them consistent (ID matches the value in the database) then Entity Framework is a pain to work with.

It's not hard to do with a standard WPF combobox as explained here:

http://www.codeproject.com/Articles/301678/Step-by-Step-WPF-Data-Binding-with-Comboboxes 

Here is the closes I've gotten: 

<telerik:GridViewComboBoxColumn Header="Units"                                                                                                                   ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}},Path=DataContext.UnitsOfMeasure}"                                                                                                                           DisplayMemberPath="Name"                                                                                                         DataMemberBinding="{Binding UnitOfMeasureID}"                                                                                     SelectedValueMemberPath="Id"/>

It Binds to the UnitsOfMeasure collection as the items source. It displays the name of the units as it should, and the UnitOfMeasureID in the datagrid row member is properly bound to the Id of the selected item from the combobox. The thing I can't seem to figure out is how to get the UnitOfMeasure object bound to the SelectedValue object of the combo box.

Thanks!

Eric
Top achievements
Rank 1
 answered on 23 Oct 2014
5 answers
223 views
I found this nice example on https://github.com/telerik/xaml-sdk about creating a Column Chooser for the GridView. However in my scenario I'm creating a GridView via custom control and I want to create the Column Chooser via RadWindow. I am unfortuantely unable to bind the Listbox ItemSource to the Columns property of the grid, am I missing something?
Below is my code to better explain:


Xaml:
<Window x:Class="WpfApplication1.MainWindow"
        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="MainWindow">
<Window.Resources>
        <DataTemplate x:Key="RadMenuContentTemplate">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="100" />
                </Grid.RowDefinitions>
                <TextBlock Text="Available columns:" />
                <ListBox Grid.Row="1" ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=telerik:RadGridView}, Path=Columns}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <CheckBox Content="{Binding Header}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </Grid>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <telerik:RadGridView x:Name="RadGridView1" ItemsSource="{Binding View}" Grid.Row="1" ShowGroupPanel="False" />
    </Grid>
</Window>

Code-Behind:

public partial class MainWindow : Window
    {
        private readonly RadContextMenu defaultContextMenu = new RadContextMenu();

        public MainWindow()
        {
            InitializeComponent();
            var filterMenuItem = new RadMenuItem { Header = "Show/Hide Columns" };
            filterMenuItem.Click += this.FilterMenuItemClick;
            this.defaultContextMenu.Items.Add(filterMenuItem);
            RadContextMenu.SetContextMenu(this.RadGridView1, this.defaultContextMenu);
            
            DataContext = new MyDataContext();
        }

        private void FilterMenuItemClick(object sender, Telerik.Windows.RadRoutedEventArgs e)
        {
            var radWindow = new RadWindow
            {
                ContentTemplate = this.Resources["RadMenuContentTemplate"] as DataTemplate,
                CanClose = true,
                CanMove = false,
                ResizeMode = ResizeMode.NoResize,
                WindowStartupLocation = WindowStartupLocation.CenterScreen,
                HideMinimizeButton = true,
                HideMaximizeButton = true,
                MinHeight = 100
            };
            radWindow.ShowDialog();
        }
    }

Dongzhi
Top achievements
Rank 1
 answered on 23 Oct 2014
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?