Задайте вопросЗадайте вопрос
 

ВопросAuto Update of a ListView from a DataSet

  • 9 июня 2008 г. 15:41Roy in Acworth Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     
    This is part WPF and part DataSet question.  I want to be able to use the built-in 'notification' of a change in a DataSet to update the bound ListView.  It is not working, and I think I know why, but I don't really know enough to fix it.

    My DataSet has several table that are a one-to-one mapping of the data tables in the SQL database.  The data table that is bound to my ListView is populated though a Relation that effectively filters the results based on a previous selection.  (The initialation code for the from that contains the ListView calls GetChildRows using the relation to populate the table.)

    If after I add a row to my DataSet and then call GetChildRows again, then I see the new row.

    It appears that the auto update notification does not force a call through GetChildRows, which I guess is not a surprise.

    What I need to know is how to do the equivalent of the Relation in such a way that auto update notification to the ListView will work.

    Thanks

Все ответы