Hi I know we can set data context in xaml by providing a xml data provider as following:
<Page.Resources> <XmlDataProvider Source="http://help.infragistics.com/Help/NetAdvantage/WPF/2009.1/CLR3.X/html/Orders.xml" x:Key="OrderData" XPath="/Orders" /> </Page.Resources>
My question is can we do the similar thing to bind data from sql database? or we are forced to set xamDatagrid1.DataSource property on the backend code?
Thanks
Hello,
I believe a SQL Query cannot be run from the Xaml only. You have to use c# code.