Last post Dec 08, 2009 07:15 PM by sjnaughton
Dec 08, 2009 10:17 AM|klca|LINK
I would like to know how to configure/alter/customize the filtering part of the Dynamic Data website by means of using/modifying the templates that comes intrinsically inside the standard architecture provided by the DataContext and Templates.
I know that there are other controls in the dynamic data futures project but for what I intend to do the standard templates are more than enough is just that I haven’t found a way of modifying those templates as to produce my own filtering schema.
So I would like to know how to read by my own the database structure of each of my tables as to identify primary and foreign keys and then make a loop and build my own filtering schema without having to override this mechanism for every page that I have
to build (my guess is that can be accomplished by means of a class method but I don’t know which one)
I KNOW MY ENGLISH IS NOT GOOD SO I AM PRESENTING HERE TOO A SECOND BRAINSTROM THAT MIGHT HELP YOU TO UNDESRTAND WHAT I AM TRYING TO ACCOMPLISH
Ok. Here I go again!
I would like to know how to do the following using the Dynamic Data and/or LINQ:
I have two sets of tables in my O/RM: One set with prefix mst_ and another set with prefix tbl_
The mst_ set belongs to “catalog or reference” tables (type of movements, type of financial institutions, types of products, types of credits, type of operations, etc.)
The tbl_ set is intended to store/register all system data: sales, purchases, stock, pricing, credits, payments, etc.
Using Dynamic Data I got a fantastic development/debugging behavior for my system. I got all CRUD operations, referential integrity is kept as defined in my model, some basic rules for data validation are available too, etc.
Combining Dynamic Data with LINQ gives me the opportunity of configuring my own pages by means of displaying information on screen in a very structured fashion by using filtering (most of the times with DropDown controls and GridViews)
In all cases I have overridden the “default.aspx” automatically generated page eliminating the filtering part and using my own as to get proper display according to my filtering butt that gives my an additional page per table which seems to be quite unreasonable
if I could built this based on templates.
Dec 08, 2009 07:15 PM|sjnaughton|LINK
So I would like to know how to read by my own the database structure of each of my tables as to identify primary and foreign keys and then make a loop and build my own filtering schema without having to override this mechanism for every page that I have to
build (my guess is that can be accomplished by means of a class method but I don’t know which one)
This I can help you with [:)] on the each page there is field called "table" this is of type MetaTable and you can fine out much abort the current table including PK etc. Also the is a collection of columns of type MetaColumn table.Columns and each MetaColumn
can tell you much about the column.
This Metadata is the real power of DynamicData [:D]