Telerik Forums
UI for WPF Forum
2 answers
141 views
I'm trialing the latest version of Telerik 2010.2 WPF. So my experience with the toolkit is limited. I'm having the following problem:

I'm using XmlDataProvider as the data source. One of the elements of the XML file contains dates
    <Date>2010-10-30T01:01:01.0000000+08:00</Date>
I got around of the problem displaying those dates in a user friendly manner by handling AutoGeneratingColumn event and assigning a value converter to the Date column.

But what about filtering? I need to be able to filter the dates. I've tried to create a filter and specify member type as DateTime by for obvious reason the grid fails with invalid object type exception

var dtFilter = new FilterDescriptor("Date", FilterOperator.IsGreaterThanOrEqualTo, DateFrom);
dtFilter.MemberType = typeof(DateTime);
_filterDescriptior.FilterDescriptors.Add(dtFilter);


So my question is, when using XmlDataProvider, is there anyway to convert data to a native time (DateTime in my case).

Thanks,
Yury
Yury
Top achievements
Rank 1
 answered on 05 Nov 2010
1 answer
184 views
Hi,
   Here is the what i would like to achieve.
   I have special dates collection with fields date and description. I would like to highlight those dates with Red background in the Calendar control and in the Tooltip or Mouseover I would like to display Order details for that date in the user control.
    Is this possible ? My preference is to write code in VB.Net than XAML
   I tried to search here couldnt find anything that would meet my criteria.

Thank you
Kaloyan
Telerik team
 answered on 04 Nov 2010
1 answer
142 views
Is there a way I could determine what is the current tab item that the user is selected AND with that tab item I could dynamically load usercontrol/xaml page into the tab item.

Here's the scenario: I have two user controls one is Main page and the next is let's say Sales Page.

By default my first tab already loads the Main page, now when I want to add a new tab, I will have to load the Main page too and by that I would like to navigate to the Sales page on the second tab? I can only do navigate on the first tab but I don't know how to dynamically navigate on the succeeding new tabs? Unless I know how to determine the tab that is selected and manipulate the Content property of tabItem into the user control.

Is there any possible solutions or how is this possible? Help please. Thanks 
Petar Mladenov
Telerik team
 answered on 04 Nov 2010
5 answers
550 views
Are there any plans to incorporate the RadTreeListViewItem class from SL into WPF? I could really use this functionality. In the meantime, if anybody know how to quickly implement tri-state checking using the current RadTreeListView I'd like to see your code.

Thanks,

Corey
Corey
Top achievements
Rank 1
 answered on 04 Nov 2010
4 answers
148 views
Hello!
I'm sorry for my english ;)

I want to download images in a grid from a database, edit them and save the result back to base.

I have a database (SQLite) that has a table with images.

I use the grid as follows:
<Window.Resources>
        <my:GoodsInStoreDataSet x:Key="dsMy" />
        <CollectionViewSource x:Key="vs_t_test" Source="{Binding Path=t_test, Source={StaticResource dsMy}}" />
</Window.Resources>
<Grid DataContext="{StaticResource vs_t_test}">
        <telerik:RadGridView ItemsSource="{Binding}" Name="rdGrid" AutoGenerateColumns="False"   MouseDoubleClick="rdGrid_MouseDoubleClick">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}" Header="ID"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding NOTE}" Header="Note"/>
                <telerik:GridViewImageColumn DataMemberBinding="{Binding Picture}" Header="Pic" MinWidth="100" ImageStretch="Fill" MaxWidth="100"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
</Grid>

Code when loading windows

private void Window_Loaded(object sender, RoutedEventArgs e)
{
    GoodsInStore.GoodsInStoreDataSet dsGIS = ((GoodsInStore.GoodsInStoreDataSet)(this.FindResource("dsMy")));
 
    GoodsInStore.GoodsInStoreDataSetTableAdapters.t_testTableAdapter ta_t_test = new GoodsInStore.GoodsInStoreDataSetTableAdapters.t_testTableAdapter();
    ta_t_test.Fill(dsGIS.t_test);
    System.Windows.Data.CollectionViewSource vs_t_test = ((System.Windows.Data.CollectionViewSource)(this.FindResource("vs_t_test")));
    vs_t_test.View.MoveCurrentToFirst();        
 
}

When the window boot - displays a grid with pictures. All works well.
I can make changes in the "Note" and save the changes to the database.

Saving changes is as follows:
private void  SaveButton_Click(object sender, RoutedEventArgs e)
{
    GoodsInStore.GoodsInStoreDataSet dsGIS = ((GoodsInStore.GoodsInStoreDataSet)(this.FindResource("dsMy"))); 
    GoodsInStore.GoodsInStoreDataSetTableAdapters.t_testTableAdapter ta_t_test = new GoodsInStore.GoodsInStoreDataSetTableAdapters.t_testTableAdapter();
    ta_t_test.Update(dsGIS.t_test);
}

I'm trying to change the picture in the grid as follows:

private void OnCellDoubleClick(object sender, RadRoutedEventArgs args)
{
    GridViewCellBase cell = args.OriginalSource as GridViewCellBase;
    if (cell != null && cell.Column.UniqueName == "Picture")
    {
        Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
        dlg.DefaultExt = ".jpg";
        dlg.Filter = "Jpeg pictures (.jpg)|*.jpg";
        Nullable<bool> result = dlg.ShowDialog();
 
        if (result == true)
        {
            string filename = dlg.FileName;
            BitmapImage myBitmapImage = new BitmapImage();
 
            myBitmapImage.BeginInit();
            myBitmapImage.UriSource = new Uri(filename, UriKind.RelativeOrAbsolute);
            myBitmapImage.EndInit();
 
            rdGrid.CurrentCell.Value =  myBitmapImage;
        }               
    
}

No changes (not in the grid, not in the database) does not occur. The grid displays the old picture.

Tell me what am I doing wrong?
How to change the image with the grid and in the database?

Гоша
Top achievements
Rank 1
 answered on 04 Nov 2010
1 answer
64 views
Having this style defined in app.xaml...

<Style TargetType="Grid">
    <Setter Property="Background" Value="#00000000" />
</Style>

.. breaks the TreeListView expand/collapse behaviour.  This breaks regardless of the value of the Background.  This was an extremely time consuming and frustrating bug to track down.


Full sample:

MainWindow.xaml
<Window x:Class="TreeListViewExample.MainWindow"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Controls:RadTreeListView ItemsSource="{Binding Items}" AutoGenerateColumns="False">
            <Controls:RadTreeListView.ChildTableDefinitions>
                <Controls:TreeListViewTableDefinition ItemsSource="{Binding Children}"/>
            </Controls:RadTreeListView.ChildTableDefinitions>
            <Controls:RadTreeListView.Columns>
                <Controls:GridViewDataColumn Header="Test" DataMemberBinding="{Binding Text}"/>
            </Controls:RadTreeListView.Columns>
        </Controls:RadTreeListView>
    </Grid>
</Window>

App.xaml
<Application x:Class="TreeListViewExample.App"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <Style TargetType="Grid">
            <Setter Property="Background" Value="Green"/>
        </Style>
    </Application.Resources>
</Application>


Codebehind:
public partial class MainWindow : Window
{
   public MainWindow()
   {
      InitializeComponent();
      DataContext = this;
 
      Items = new ObservableCollection<TestClass>();
      var child3 = new TestClass {Text = "child 3"};
      var child2 = new TestClass {Text = "child 2", Children = new[] {child3}};
 
      var child = new TestClass {Text = "child", Children = new[] {child2}};
      Items.Add(child);
   }
 
   public ObservableCollection<TestClass> Items { get; private set; }
}
 
public class TestClass
{
   public string Text { get; set; }
   public IEnumerable<TestClass> Children { get; set; }
}


Cheers,

Andy
Vanya Pavlova
Telerik team
 answered on 04 Nov 2010
1 answer
136 views
How do you change the time slot template in the ScheduleView? In the Scheduler you would use the TimeSlotTemplateSelector.
Pana
Telerik team
 answered on 04 Nov 2010
4 answers
166 views
Hello team and congratulations for the job done with this new tool!

I'm a Silverlight developer and I need to display a ressource planning using 2 groups. The native scheduler isn't able to do this, that's why i just tried this new scheduler for wpf.
It seems to be well working, but I have several questions:

- Is it possible to change the date format in a timeline view? In my case I need to display days and not hours since I want to display a 2-months planning.
I used to set the "TimeLineHeaderFormat" in the RadScheduler control, but it doesn't seem to exist anymore.

- When my groups are displayed horizontally, their title are displayed vertically. Is it possible to change the orientation of the text?

- Furthermore, is it possible to change the content of the group header? I mean I would add an image of the concerned ressource in the header.

I just added a screenshot to illustrate my questions.

Thank you for your answer.

Best Regards,

Julien LOFFICIAL
Pana
Telerik team
 answered on 04 Nov 2010
3 answers
376 views
Hello,

I am trying to use RadGridView in one project but I have been experiencing some difficulties

Basically I have a GridView with ItemSource binding to my list of items.

Problem is data, when I try to add a new row to the grid, using BeginInsert method,
instead of start editing the new row, the grid starts editing a blank cell on the previous row (this cell can be left blank)

Also sometimes when a row enters in editing mode, doesn't matter what I do (press insert key, etc..)
it stays this way...

P.S: Just to notice that  I am using MVVM, so all the events are made by use of Commands

Thanks a lot

Nedyalko Nikolov
Telerik team
 answered on 04 Nov 2010
1 answer
108 views
Hi,

I am actually evaluating a powerful grid and I am choosing between the yours, the devexpress one and xceed.

Everything is working fine except one problem :

I am modeling data using entity framework. In my modeling, the class 'Collaborator' is teh base class for the other class 'User'.

I am getting coll which is the collection of type 'Collaborator'. So, the collection will contain instances of both classes.

If I bind the grid to a collectionviewsource created on coll I get blank rows and sometimes exceptions are thrown. (an Observable collection is created as an intermediary object).

If I bind directly to coll everything goes well.

So, what's the problem ?

Best regards
Pavel Pavlov
Telerik team
 answered on 04 Nov 2010
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
Security
VirtualKeyboard
HighlightTextBlock
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?