I have requirements to implement a UI using c# where the user can manipulate what data they want to appear on a document. The data should enter the program via SQL (prefer not using Table Adapters as the database is then hardcoded into the program, but will use it if absolutely necessary).
The following UI will appear when the user chooses to enter a database table:
https://docs.google.com/file/d/0B6b_N7sDgjmvcUt2amxNaXpJRFU/edit?usp=sharing
https://docs.google.com/file/d/0B6b_N7sDgjmvdUhmMUJFbEdKeVk/edit?usp=sharing
https://docs.google.com/file/d/0B6b_N7sDgjmvM3BSWDEyM0ROOFE/edit?usp=sharing
The user should be able to choose what columns (from all tables,
connections should be made using PK/FK.) they want to add to the
table, and sort and move that data.
The control should then able to generate the sql used to pull that
information from the database (or even pass the database back to the
main program, but prefer SQL)
I've seen this UI in many programs and would like to think there is a library out there that will save me the trouble of making this UI from scratch.
Are there any libraries available for C# that has this kind of functionality?
Telerik's Rad Grid will give you all of the functionality in terms of context menus and column reordering. You wont be able to output the code needed to regenerate the table however. You can export data directly from the grid using the column ordering specified in a range of formats (pdf, word, excel, etc.).
The Rad Grid is also not free, it is part of a suite of controls.
You may also try DevExpress. We use this control library for editing operations. It is not free but worth its price.
Related
I use Visual Studio with SAP Business One SDK.
In this example I used a GridView and a simple select on the POR1 table but what I would like to do is that when I fill in a GridView or a matrix what I write registers in the database so in the table por1, I made the example on both fields in the red frame (Photo Attachment).
Please, what do I do so that what I write here is stored in the database in the table por1 and in the fields U_QtyEnCours and U_StatutMarch?
There's a few ways to do this.
The first is using a direct SQL write - this is the fastest and is allowed for UDFs, but may be frowned upon depending on who your SAP Partner is. You also won't get any History logging.
You can use the SAP-DI Documents object to iterate over the Purchase Orders, and update the lines one by one - this is logged, but can be slow.
You could also just export it to a file and update it using the Data Transfer Workbench (DTW) which is logged, and also has all the error handling built in.
I am encountering a situation such as, I want to offer a data entry form of almost more than 100 fields of certain Database Table. It was an old database of Invoice of a particular company and cannot be altered.
So, I would have obviously a resultant Data Grid ( Probably HTML Table ) or MVC Grid containing user entered data inside. But the problem is How to Offer 120 fields in an entry form? ( Could be a partial View contained inside JQuery )? This comes an idea about inline editable Grid. Would that be better? Or DevExpress offers such controls? Would Spreadsheet be helpfull?
or any other technique would be helpfull to adopt for this?
Any body having any idea?
Regards
Usman
OK. I don't think a Grid would be a good way: that would just be too wide. I think the best way would be a series of Tabs each of which contains the data pertaining to one logical section of the invoice (e.g. a section for Forwarder, another for Client, etc etc).
As a design note, try to group items into sections small enough that the user doesn't need to scroll. Everything is a section should be visible of a normal sized screen. This makes it easier for the user.
Not sure if this is possible in your case but since you mentioned
any other technique would be helpfull
This is what I can suggest: In Visual Studio (download free copy here http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx), in your MVC project:
Add Entity Framework package from nuget if you don't already have it (Install-Package EntityFramework from Package Manager console in VS)
Add an EF model in VS by dragging you database table to model designer
Add an Entity Framework controller with Read/Write Actions
This will create views in your project where a user can go an CRUD the table rows. And will also ensure basic constraint checking.
Check this tutorial for Entity Framework details: http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application
I need to create a UI that will load from an xml file information that will determine the look of the UI. Simply put, the xml file will determine the locations of a bunch of buttons in a grid like interface. Im thinking that it could be built with a single Panel container with a variable number (depending on the info given in the xml file) of table layout panels. Each table layout panel will have a variable number of rows/columns (also dependant on the info given in the xml file).
I have the creation and mapping of controls working fine, however proper sizing of everything continues to be a challenge.
Are there other controls out there better suited for mapping out dynamic interfaces?
Any tips/tricks/pitfalls?
Use WPF (as mentioned) or use Gtk# (see website)
Also, a wellknown trick with Winforms is to make ample use of datagrids bound to Datatables (or DataSets in general). Even if your backend isn't actually a ADO.Net provider you can dynamically create DataTables (adding columns with proper datatypes). The datagrid will know how to make these columns editable/sortable etc.
$0.02
Scenario: Client maintains financial/compliance record in a spreadsheet for each quarter of the year. Spreadsheet contains columns which are not static, they can change from quarter to quarter and will not be same the next year. They want a portal by which all the regional managers (of stores/franchise) can enter their data and at the end aggregated at the national level.
Issue: As you could have guessed, I want to develop the spreadsheet column into sql table with all the columns, but the issue is that they want to add new columns dynamically (for future quarters) via admin side. Thinking of providing a textbox (columnname), dropdown (sqltypes possible) and add button which will basically add the column. But the columns can grow and that's not the right option, I guess. Other alternative is, instead of adding columns, I can add it as rows and then use PIVOT to do the sql part.
If anyone of you have developed this kind of application, could you please aware me of any complications before I proceed further with my idea of adding rows instead of columns for adding fields for the reports dynamically. If anyone has got sample example or reference online, please divert me there.
Take a look at Umbraco. It's a cms that puts the concept of PIVOT into practice. (Actually I believe most CMS does).
Actually, I'd go so far as to suggest building that application of yours in Umbraco. You will need to customise it a bit, but you will have quite a bit of heavy lifting already done for you, such as authorisation, membership, and the schema/content mechanism.
I want to write a GUI seating application that allows users to draw and annotate simple "maps" of seating areas.
The end result would probably look something a little like Visio, but specifically for manipulating my "seating" data model rather than producing files.
In Java-land, there's the Graphical Editing Framework (GEF) -- is there anything like this in the .NET space? Should I just use System.Drawing.Drawing2D primitives and handle it all myself?
Here is product from Nevron. It is paid but doing it all yourself will take lot of time and effort.
Open Diagram and EasyDiagram.net are available at Codeplex. Be sure to download and look into their code.
There is Netron Library for diagramming. It is open source and uses GDI+.
Check out NShape. It is an open source diagramming framework written in C# and quite powerful. Its controls are WinForms controls but you can also use it for WPF.
You might consider using the DSL Toolkit from the Visual Studio SDK. It allows you to create a graphical DSL designer by first creating a domain model, and then creating the graphical notation that will allow users to create or edit instances of that model.
You may very well be able to create a graphical notation that looks like a seating area. This would allow your users to not only "diagram", but to produce a file containing a filled-in domain model of what was diagrammed.
Check out our MetaDraw component - www.MetaDraw.com
MetaDraw is designed to make applications like this easy.
MetaDraw will support a background image and an annotation layer
You can put users into a variety of editing modes - Lines, Curves, Text, Shapes, etc.
Every drawn element is distinct - just like in Visio, so you can allow users to select objects and move them around or resize them. Every object can have multiple hidden tags ( like seat numbers or database record pointers ). You can recognize which objects users select ( for instance take some action when user clicks seat 22 ) . You can dynamically modify propertie by code - such as searching for seat 22 and changing it's fill color. Of course you can also scroll, zoom, print, save to a variety of formats and more.