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"; }
use
loadingrowevent :dgrd.loadingrow += dgrdparent_loadingrow;, beauty of event visible rows fire event, if scroll down or increase size ofwindow, remaining relevant rows fire event.use
hasitemsproperty. property becomestruewhendatagridfinisheditemssource.
Comments
Post a Comment