Artificial fields and dynamic data

4 posts, 0 answers
  1. Emil
    Emil avatar
    6 posts
    Member since:
    Feb 2009

    Posted 13 Oct 2010 Link to this post

    Hi,
    I have select statements and field descrptions for this statements saved in database.
    What I have done in Delphi is by start of the application is to read one select statement, fields descriptions and some class description from database. From this statement I am creating a dataset and from fields and class description and then columns in a grid control with corresponding editors. I am trying to do the same in .Net with your compnents.
    Is it possible to save an OpenAccess persistent class definition in DB nad by start of the application to read and create it dynamically?
    Or maybe is possible to do it with an OpenAccess persistent class, create artificial fields from descriptions stored in database  for this class and dynamic binding to an editable GridView in WPF?
    Or there is an easier way?

    Regards,
    Emil
  2. Serge
    Admin
    Serge avatar
    375 posts

    Posted 18 Oct 2010 Link to this post

    Hi Emil,

     Can you please provide a little more information. Usually it is not recommended to dynamically create the database during runtime, however we have API allowing you to do exactly this. At the moment we are working on implementing a Fluent API for defining mapping and extending the model with artificial types and properties and then persisting the changes to the database. We have released this API in the internal build last week, however the documentation is not yet up. You can have a look at this help article for more information.

    I hope this is helpful.

    Sincerely yours,
    Serge
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Emil
    Emil avatar
    6 posts
    Member since:
    Feb 2009

    Posted 19 Oct 2010 Link to this post

    Hi Serge,
    we don't create any objects in database in runtime. What we want to achieve is following.
    We have about 50 simple tables. For this tables we have a type of dictionary in database. This is a set of tables in which is stored information about these 50 tables. Small sample:
    Lets say that we have a table Products. By start of application is an dynamic select statement loaded:
    select prod_id,name,description,category,unit_type,qty_per_unit from products

    Than the application loads the description of all these fields from dictionary in database. For sample the field unit_type is string 3 character long, who's title is "Units" and has an lookup editor who's values came from table units. The field's qty_per_unit is between 1 and 100 and so on. With this information are an editable DataGrid and corresponding editors created. And all this is by start of the application. Than the application behave  like is created only to edit the table products.
      We have created such applications with Delphi. But now we should move to .Net and I am looking for best possible way to achieve the same.

    Regards,
    Emil
  5. Serge
    Admin
    Serge avatar
    375 posts

    Posted 22 Oct 2010 Link to this post

    Hi Emil,

     You can use the information you have about the your products table to generate the column of the gridview in runtime. You can have a look at this help article about the WPF GridView in order to see how. And you can use the same information and implement fetch plans in your OpenAccess setup so that no unnecessary data is retrieved. More information on this here

    I think this should be enough to get you started, if you however feel there is something else you need please let us know.

    Best wishes,
    Serge
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top