datatable to object table

2 posts, 0 answers
  1. manuel
    manuel avatar
    1 posts
    Member since:
    Mar 2016

    Posted 16 Mar Link to this post

    Hi, I need help.


    I am using c #, and I'm working on a report which I have an object table which I want to fill a DataTable by code, I tried this way but it did not work.


    DataTable table = new DataTable("patients");
    table.Rows.Add("sam", 1);
    table.Rows.Add("mark", 2);
    table1.DataSource = table;

    prints the rows that have this datatable(2), but empty.


  2. Nasko
    Nasko avatar
    909 posts

    Posted 18 Mar Link to this post

    Hello Manuel,

    You will need to use an ObjectDataSource component at design-time to bind the table to data. For more information, please refer to the ObjectDataSource Component help articles.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top