Home Forums WPF controls Xceed DataGrid for WPF Customizing DatePicker control

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #23162 |

    Hello,
    I’d like to replace the editor of the DatePicker control with my custom control. Our users need to be able to enter non standard date formats, which i would then convert to a DateTime object. What would be the best approach, or is this even possible? If it is possible, a quick sample would be very useful.

    Thanks,
    Bill

    Imported from legacy forums. Posted by Bill (had 2983 views)

    Xceed Support
    Member
    Post count: 5658

    Hi,

    You can affect any kind of cell editor on a column by setting it’s CellEditor property…

    You can create your own custom editor by affecting the EditTemplate property of the CellEditor.

    Please refer to the Documentation (Advanced Concepts \ Custom Cell Editors ) for more details.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 229 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Marcus,
    My question is about the datepicker control, not a celleditor. I’d like to use the datepicker outside of the grid as a seperate control. I’d like to replace the editor portion of the control with just a simple text box or my own editor so the user can enter a date in any format they would like, but still retain the caledar drop down. I’m wondering if there is a standard way I could replace the current date editor.

    Thanks,
    Bill

    Imported from legacy forums. Posted by Bill (had 415 views)

    Xceed Support
    Member
    Post count: 5658

    Unfortunately, you’d have to replace the whole ControlTemplate for the DatePicker (starting from scratch, since we did not distribute the DatePicker’s XAML with our package.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 3970 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.