in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Creating a DateTime Picker in Code

Last post 07-14-2008 5:54 AM by JohnRBeacon. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-14-2008 5:10 AM

    Creating a DateTime Picker in Code

    Hi,

    I'm trying to create a simple(ish) ListView that uses a GridView as its View - rather than the all out complexity of the C1DataGrid.

    I'd like to do the following:

    using C1.Schedule;

    ...

    fef = new FrameworkElementFactory(typeof(C1.Schedule.C1DateTimePicker));

    but the intellisense doesn't show the C1DateTimePicker as a possibility. 

    So I thought I'd go back and try to drag and drop a DTP onto my wpf user control just to be sure it can be instantiated.  I get an error:

    'Error Template' property cannot be data-bound. Parameter name: dp.

    Yet if I do a simple project and drag/drop a DTP onto that all is OK.

    Any ideas on what is the problem here?

    Are the 2 things even related?

    Thanks

    Filed under:
  • 07-14-2008 5:54 AM In reply to

    Re: Creating a DateTime Picker in Code

     I've found it... I was using the wrong reference and should have been using C1.WPF.Schedule which does contain C1DateTimePicker and lets me instantiate it as a FrameworkElementFactory item.

    Now have to make it understand that 1/4/1959 is 1st April not 4th Jan but I saw another posting about this.

    Thanks

    John

Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.