Telerik Forums
UI for WPF Forum
1 answer
243 views
Hello Telerik forums!

I am building a history screen where the user can select all items that have shipped between a start and end date.  To do this I have two RadDatePickers on my view and they are bound to StartDate and EndDate properties of the ViewModel (MVVM pattern with PRISM).  The classic problem I'm trying to solve is preventing the user from selecting a starting date that is greater then the ending date.  Can this be done with the RadDatePicker or should I just handle it in my ViewModel?

Thanks,
Jeremie
Yana
Telerik team
 answered on 13 Apr 2011
2 answers
153 views
Hi,
i'm currently using the AppointmentSaving event of the RadScheduleView for validation.
if the edited or created appointment does not contain the right values a MessageBox should be shown an the appointment should not be saved.

Unfortunatly the MessageBox only shows up for about half a second. The next time i create an appointment the messagebox shows up again, because the AppointmentSaving event is fired again.

As i searched the known bugs, i found that this should already be fixed, but i'm already using the newest dlls and it does not seem to work. Am i doing something wrong?!

thanks in advance!

private void OnKalenderAppointmentSaving( object sender, AppointmentSavingEventArgs e )
{
      var appointment = (SedlakAppointment)e.Appointment;
 
       if( appointment.SelectedUser == null )
       {
           e.Cancel = true
           e.Handled = true;
           this.ViewModel.ShowError( "Cannot create an appointment without user");
       }  
}
Margret
Top achievements
Rank 1
 answered on 13 Apr 2011
1 answer
94 views
Hello
I am using WPF Radgrid
I have a requirement of deleting multiple rows from a grid whose checkbox column is selected.
I am using MVVM Pattern and MVVM light sample where we are using EventToCommand appraoch is being followed.
Vanya Pavlova
Telerik team
 answered on 13 Apr 2011
1 answer
123 views
Looks like VerticalScrollBar is not getting displayed in DocumentPane

Below is the code
<Window x:Class="WpfApplication2.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"
        WindowStartupLocation="CenterScreen"
        HorizontalAlignment="Center"
        VerticalAlignment="Center"
        Width="800"
        Height="600"
        WindowState="Maximized">
  <StackPanel Orientation="Vertical">
    <Controls:RadDocking AllowUnsafeMode="True">
      <Controls:RadSplitContainer VerticalAlignment="Top"
                                  Width="101"
                                  MaxWidth="101"
                                  HorizontalAlignment="Left"
                                  InitialPosition="DockedLeft">
        <Controls:RadPaneGroup HorizontalAlignment="Left"
                               VerticalAlignment="Top">
          <Controls:RadPane Header="Tools"
                            HorizontalAlignment="Left"
                            CanUserClose="False"
                            ContextMenuTemplate="{x:Null}"
                            CanFloat="False">
<ToolBarTray/>
  </Controls:RadPane>
        </Controls:RadPaneGroup>
      </Controls:RadSplitContainer>
      <Controls:RadDocking.DocumentHost>
        <Controls:RadSplitContainer>
          <Controls:RadPaneGroup>
            <Controls:RadDocumentPane Visibility="Collapsed"
                                      CanUserClose="False">
              <Grid Background="Transparent">
                <ScrollViewer HorizontalScrollBarVisibility="Auto"
                              VerticalScrollBarVisibility="Auto">
                  <Canvas Height="600"
                          Width="800"
                          Background="{StaticResource MyGrayGridBrush}">
                  </Canvas>
                </ScrollViewer>
              </Grid>
            </Controls:RadDocumentPane>
          </Controls:RadPaneGroup>
        </Controls:RadSplitContainer>
      </Controls:RadDocking.DocumentHost>
    </Controls:RadDocking>
  </StackPanel>
</Window>


Could anyone help?
Yana
Telerik team
 answered on 13 Apr 2011
2 answers
65 views
Hi
When I data bind TreeView and use IsChecked, witch works fine but it looks something like this:
[ ]Beverages
 |__ [ ] Alcoholic
 |       |__ [X] Beer
 |......

But I would like it to look like this (with the Indeterminate state)
[-]Beverages
 |__ [-] Alcoholic
 |       |__ [X] Beer
 |......

Is there any way to get this functionality when data binding ? or do I need to do this manually ?

Best regards
Kristján
Petar Mladenov
Telerik team
 answered on 13 Apr 2011
2 answers
81 views
Hi,

I have some questions regarding the RadScheduleView:

* I have problems with appointments spanning several days. These event span the whole width of the column in the day or week view. Our users are used to double clicking in the calendar to add a new appointment, but there isn't any room left in the column to click to add an appointment. I know that the All Day list isn't implemented in the RadScheduleView (it is available in the RadScheduler), but I need a temporary solution to this problem - if there is one. Maybe I could limit the width of the appointment box in the calendar, but I don't know how?

* I've localized the ScheduleView so that all time formats are in 24HR format. This works great in the calendar or if I drag an appointment. But if I resizing an appointment, the new time shown while resizing is shown in 12HR format. Have I missed something or is this a bug?

* Is it possible to store time only in hours and minutes, not seconds when dragging or resizing appointments? I've implemented a custom drag drop behavior class so I'm able to remove seconds when storing the appointment i the datastore, but seconds are still visible in the ScheduleView.

Best Regards,
Windev
Carl Björnberg
Top achievements
Rank 1
 answered on 13 Apr 2011
2 answers
85 views
Hi,

  <>How we can apply Binding.ValidationRules in the telerik:RadNumericUpDown control  ?
Rahul
Top achievements
Rank 1
 answered on 13 Apr 2011
1 answer
87 views
Hi,

I have found a serious bug in the new release. I have attached the example project as well. 

Run the project using the set of DLLs which are there in the bin/debug folder. 

There are Three columns in the GridView. Second column is set to invisible (isVisible = false). But when you run the project you can see second column is visible. Although the Header is empty. you can't resize the column. it just sit there.

One thing I figured it out that if I don;t set the width property of other columns it looks fine. But as you play with the Width or MinWidth property of column it will display the hidden column.

It was not happening before. These Telerik dll we got from the RadControls_for_WPF35_2011_1_0315_Dev.msi Setup.

The same issue is happening in silverlight as well. Let me know if you have any trouble in reproducing it.

I don't find any way to attach the sample project. so just pasting the code here. Name the project as "HiddenColumns". There are two files MainWindow.xaml and MainWindow.xaml.cs

Regards
Sanket Singhvi

MainWindow.xaml
----------------------
<Window x:Class="HiddenColumns.MainWindow"
        xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Controls:RadGridView x:Name="_mainGrid" SelectionUnit="FullRow" SelectionMode="Single">
        </Controls:RadGridView>
    </Grid>
</Window>
 
MainWindow.xaml.cs
-------------------------
 
using System;
using System.Collections.Generic;
using System.Data;
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 Telerik.Windows.Controls;
 
namespace HiddenColumns
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private DataTable _dataTable;
        private GridViewDataColumn _colA;
        private GridViewDataColumn _colB;
        private GridViewDataColumn _colC;
 
        public MainWindow()
        {
            InitializeComponent();
            Init();
        }
 
        private void Init()
        {
            CreateGrid();
            GetDataTable();
            FillGrid();
        }
 
        private void FillGrid()
        {
            DataRow row = _dataTable.NewRow();
            row["_colA"] = "1";
            row["_colB"] = "This is a Dummy Record";
            row["_colC"] = "This is Third Column";
            _dataTable.Rows.Add(row);
 
            _mainGrid.ItemsSource = _dataTable;
        }
 
        private void CreateGrid()
        {
            _mainGrid.AutoGenerateColumns = false;
            if (_colA == null)
            {
                _colA = new GridViewDataColumn();
            }
 
            //
            //  _ColA
            //
            _colA.UniqueName = "_colA";
            _colA.Header = "Column A";
            _colA.IsGroupable = false;
            _colA.IsFilterable = false;
            _colA.IsReadOnly = true;
            _colA.IsVisible = true;
            _colA.Width = 100;
 
            if (_colB == null)
            {
                _colB = new GridViewDataColumn();
            }
 
            //
            //  _colB
            //
            _colB.UniqueName = "_colB";
            _colB.Header = "Column B";
            _colB.IsGroupable = false;
            _colB.IsFilterable = false;
            _colB.IsReadOnly = true;
            _colB.IsVisible = false;
             
            //
            //  _colC
            //
            if (_colC == null)
            {
                _colC = new GridViewDataColumn();
            }
            _colC.UniqueName = "_colC";
            _colC.Header = "Column C";
            _colC.IsGroupable = false;
            _colC.IsFilterable = false;
            _colC.IsResizable = false;
            _colC.Width = 150;
 
            _mainGrid.Columns.Clear();
            _mainGrid.Columns.Add(_colA);
            _mainGrid.Columns.Add(_colB);
            _mainGrid.Columns.Add(_colC);
 
            //_mainGrid.Width = 480;
            _mainGrid.ShowGroupPanel = false;
        }
 
        private void GetDataTable()
        {
            if (_dataTable == null)
            {
                _dataTable = new DataTable();
            }
            _dataTable.Columns.Add("_colA");
            _dataTable.Columns.Add("_colB");
            _dataTable.Columns.Add("_colC");
        }
    }
}

Vlad
Telerik team
 answered on 13 Apr 2011
1 answer
104 views
I'm trying to implement custom filtering. I need to be the one who applies the new filter options to the underlying IEnumerable/IQueryable, as I have to apply certain column filters specially for the data source.

I can't figure out how I can be made responsible for returning the IQueryable that the RadGridView ultimately uses. i'd sort of expect an event like Filtering to have a return object on the EventArgs, for me to pass the IEnumerable back to it.

I'm also completely at a loss as to how to integrate this into the DataPager. Once again, I need to be responsible for implementing the page count retrieval.

Update: I think I can do it by implementing a custom QueryProvider and IQueryable, and parsing what Telerik applies to it into my own form. This sounds hard, though. =/

It's complicated by the fact that my data model doesn't actually have real members for the things I want to query by. I sort of would rather pass them around as text keys.

For example. I'm showing a list of Person objects. Person objects have a collection of Name objects. Only one of which is the "active name." I want the First Name column's filter to be handled by formulating some custom SQL that joins to Name, eliminates all by the current one, and filters that one's FirstName property. I can easily write this code, but I can't figure out how to grab the FilterDescriptor of the FirstName column and actually apply it to the result set the RadGridView AND pager use.
Vlad
Telerik team
 answered on 13 Apr 2011
2 answers
430 views
I need to refresh schedule view on button click or any event. when i bind data with it first time it works perfectly second time when i changed the data and rebind it, its not refresh the scheduleview
Faheem
Top achievements
Rank 1
 answered on 12 Apr 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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?