Home Forums WPF controls Xceed DataGrid for WPF DataGrid and ComboBox

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

    Hi All

    I have a grid that has a combox which is bound to a DataTabe. Basically similar to the DataBinding examples that you can download from xceed.

    What i would like to do is to query that datatable and only display elements in the datatable based on a product ID that is in the same row.

    So i was wondering how can i send a parameter in the same row to do this.

    Cheers

    Alan

    Imported from legacy forums. Posted by Alan (had 2871 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi all

    Well i found a work around for this. Which i’m reasonably happy *cough* hack *cough*.

    For those in the same boat.

    Basiclly i used the DataRowMouseEnter event , from here i assign a static
    Xceed.Wpf.DataGrid.DataRow variable that current row. from this i was able to get the property value i need to dynamiclly populate the combo box.

    THEN

    i use the combo Initialized event, which is called when the cell goes in edit mode, to query a data source and assign the results to the item source.

    told you a hack. but don’t tell anyone!

    But if anyone has a better solution feel free to post here. I would like to hear other possiblities.

    Cheers

    Alan

    Imported from legacy forums. Posted by Alan (had 434 views)

    Xceed Support
    Member
    Post count: 5658

    Have you tried LinqToSql? I think it would work perfectly in your scenario. Take a look at the LINQ samples included in the documentation, there is one that uses a combobox to sends a Linq query to display only data items that have a specific value that should point you in the right direction.

    Imported from legacy forums. Posted by Jenny [Xceed] (had 338 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Jenny

    Thanks for the post. I will check it out.

    Alan

    Imported from legacy forums. Posted by Alan (had 3794 views)

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