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
240
how Can i create Xam grid dynamically
posted

how  Can i create Xam grid dynamically?

Parents
No Data
Reply
  • 22852
    Offline posted

    vikas227,

    Begin by adding references to the following assemblies

    InfragisticsWPF3.v10.3
    InfragisticsWPF3.Editors.v10.3
    InfragisticsWPF3.DataPresenter.v10.3

    Or another version of the same assemblies.

    Once that is done, add a using (C#) or Imports (VB) statement for the Infragistics.Windows.DataPresenter namespace:

    using Infragistics.Windows.DataPresenter;

    Imports Infragistics.Windows.DataPresenter

    Then simply create an instance of the XamDataGrid and make it the child of a Panel or Window:

    C#:

    Window w = new Window();
    w.Title = "Dynamically Created Window With XamDataGrid";

    XamDataGrid xdg = new XamDataGrid();
    xdg.DataSource = GetData(); // Where GetData returns an IEnumerable
    w.Content = xdg;
    w.Show();

    VB:

    Dim w as Window new Window()
    w.Title = "Dynamically Created Window With XamDataGrid"

    Dim xdg as XamDataGrid new XamDataGrid()
    xdg.DataSource = GetData() ' Where GetData returns an IEnumerable
    w.Content = xdg
    w.Show()

    Let me know if you have any questions with this matter.

Children