Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
695
can we set data source in xaml file?
posted

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

Parents
No Data
Reply
  • 69686
    posted

    Hello,

    I believe a SQL Query cannot be run from the Xaml only. You have to use c# code.

Children
No Data