Is there any existing software for generating a UserControl from a table of a database?
For example, my table contain 3 fields : name , last name , age.
The software generates a user control that has 3 labels and textboxes with validation and submit button and a gridview for displaying information , etc...
Thanks all.
You might want to look into Dynamic Data. It's an ASP.NET framework developed by Microsoft that automatically generates common UI elements based on Linq to SQL or Entity Framework objects (which are trivially easy to generate from a simple table like the one you mention.)
What you describe sounds an awful lot like UI "scaffolding". Take a look at the following article and related question:
ASP.NET Scaffolding/Templating CRUD Solutions
Dynamic Data
Here's one more O/R mapper capable of scaffolding (generating UI from database):
http://www.subsonicproject.com/
Related
I want to create an application that users can select fields from database table and create a spreadsheet by those data. Is any control or sample to implement it?
Getting the schema of table varies from database to database.
No matter which database you use, it would be easy to get the list of columns and let the user select which columns to show.
To create a speardsheet you should look at these controls ASP.NET Real World Controls
These custom controls enable you to create excel like grids in asp.net. It is open source allowing you to extend them as may be needed by your project.
I'm new to infragistics. I have a database and a datalayer with entity framework and linq. Now I want to get the data to an Infragisticscontrol, let's use a UltraCombo. I have not problem to bind the data to the control. My problem is that all properties from the linqquery is displayed.
As far as I can see there are two options
1) Create a data schema manually. In this way there is much effort put in creating the schema and when I refactor something then the schemas of all controls must be updated.
2) Creating a data schema automatically.
I played a bit with the secand case but can'T find an option how to create the data schema automatically but binding the data manually. I had one case where I bound it to a model of the entity framework and deleted the datasource later from the project. In this case it worked but I don't think that this is the right way to use it.
Can somebody tell me how to do this or what's the best practice?
I found a solution in the Infragistics forum below. Here's the link: http://blogs.infragistics.com/forums/p/24379/89509.aspx
I am fairly new to working with ASP controls. I am having some issues with a project. This project is fairly large and my team has placed the ADO.NET emtity inside the same solution but placed into a different project inside Visual Studio 2010. The original db was built through SQL Server 2008. I was wondering if it would be possible to connect a GridView control to this entity in order to show certain aspects of it?
Also, If not possible, we have a class Customer which has certain members (name, dob, ssn,...etc) and functions that will pull these customers from the db through the ADO.NET. Could I populate the GridView with a a list of instances of this class?
something like
List<Customers> CustList = new List<Customers>();
....populate the list.....
Gridview.DataSource = CustList;
Gridbiew.DataBind();
Sure you can! Just add a reference the other project from the one that has the GridView, and set the DataSource property of the GridView to the entity that is in the other project. Indeed, this is a common design in applications, to separate them by "layers"(also criticised a lot).
Hope it helps,
I have the following scenario:
My website db has a system table called "Companies", which includes an id field, companyName field, and companyImageUrl field.
How do I set up an umbraco document type for adding entries to this table ?
Maybe I shouldn't use a custom table at all ?
Thanks.
As far as I know, Umbraco doesn't support what you want to do out of the box (mapping a document type to a table that isn't part of the umbraco core).
One approach that might work is to create an action handler that syncs a Company doc type to your table when creating a node of that type.
It's a bit of a hack though. I've found that I've very rarely needed to create custom tables. What exactly are you trying to do with it? My guess is that you don't really need it and would be better off working with a doc type instead. Umbraco provides a variety of ways to get and act upon doc types from within custom C# code (check out the umbraco.NodeFactory namespace). You'll also get the added benefit of being able to easily interact with these nodes from XSLT/Razor.
Simple problem. I use the Entity framework to map an SQL Server database to objects. The EF is then used to fill a Dynamic Data Site. There are 50+ tables and layout isn't really important. Allowing the users to use it for quick data entry while keeping the amount of code as low as possible is.
Basically, I have four work-hours to find a solution to filter some of the tables on the first letter of one (or more) of the fields. (One filter per field.) When I have one, I have another 4 hours to implement it. Any time I spend more on this will not be compensated. :-(
I have full control over the code, the database structure and whatever else. However, I am limited to .NET 3.5/Visual Studio 2008 and am not allowed to include MVC. I'm also not allowed to add more libraries. Can't upgrade to .NET 4.0 either. So, how can I add such filters in a minimum number of hours?
Simple answer : add filters the way the Dynamic Data samples add filters, using user controls and FilterRepeaters and designating your custom filters in Metadata . See the DynamicData/Filterss directory for examples.
For example, in metadata
[FilterUIHint("LastNameSearch")]
public object LastName { get; set; }
and a user control called LastNameSearch.ascx.
See this link on MSDN