c# - How to partial update DataGrid - only for one column -


how partial update of datagrid in wpf? want update 1 column , values inside of datagrid without refreshing whole grid. using timer reload grid latest data every xx seconds. how can that?

there double click event on grid row, when whole grid refreshes if user clicks @ moment won't handle double click. same if have hyperlink column. believe if partial update can handle such case?

binding is:

datagrid.datacontext = mycollection; datagrid.items.refresh(); 

and idea refreshing of grids , have similar issue: refresh datagrid on timer tick event when value of mycollection has changed.

in wpf work data elements rather ui elements... instead of trying manipulate column value of each row in datagrid, should think data binding collection of custom class instances datagrid.itemssource property , update whichever property of classes data bound column. see example:

<datagrid itemssource="{binding items}" ... /> 

...

foreach (yourclass item in items) {     item.propertythatisdataboundtoyourcolumn = somenewvalue; } 

to make work properly, custom yourclass class should implement inotifypropertychanged interface.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -