c# - How to know in codebehind when XmlDataProvider has filled target controll with data -


the title of question says already. how can check if xmldataprovider has filled datagrid in code behind. works, want check when finished can style cells in datagrid(foreground, background, textweight) before user able do/see anything:

public excelwindow(string filepath) {     initializecomponent();     _filepath = filepath;      dispatcher.begininvoke((action)(() =>     {         loadscreensettings();     }));      loadxml();      celllayouthandler = new celllayouthandler(datagridxml, _filepath); }  private void loadxml() {     xmldataprovider dataprovider = xmldataprovider;     xmldocument xmldoc = new xmldocument();     xmldoc.load(_filepath);     dataprovider.document = xmldoc;     dataprovider.xpath = "data/row"; } 

  1. use loadingrow event : dgrd.loadingrow += dgrdparent_loadingrow;, beauty of event visible rows fire event, if scroll down or increase size of window, remaining relevant rows fire event.

  2. use hasitems property. property becomes true when datagrid finished itemssource.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -