Home Forums WPF controls Xceed DataGrid for WPF CellEditor Request

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #22339 |

    Concerning CellEditor, i have picture column that get pictures from DB
    i want to provide button beside the picture ( or even when user clicks on the picture ) he can browse another picture and replace this picture

    i know the code to convert from image to bytes
    and vice versa

    But i don’t know how to deal with cell editor to provide what i want
    if any help i would be so gratefull

    thx in advance

    Imported from legacy forums. Posted by hesham (had 2545 views)

    Xceed Support
    Post count: 5658

    Hi Hesham,

    for that particular scenario, you could implement a DataTemplate as the EditTemplate of your CellEditor. In that template, you could implement a stack panel that contains your button and your Image. You can then handle the Click event on the Button. In that handler, you could implement a file chooser to browse your file system to get your picture. You could then access the business object Image field and replace its content with the one obtain from your file chooser. The last operation should directly update the Cell content upon leaving the edition if you are using an IBindinglist or had implemented the INotifyPropertyChanged on your data source collection.

    Imported from legacy forums. Posted by Mohamed [Xceed] (had 507 views)

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