Currently, I'm in the process of making a custom solution for invoicing. I have created multiple ways for customers to create their template (HTML, Word, LaTex) and get invoices according to their template. However, these invoices are party manually generated.
So, the process is:
Request to create a new invoice
An preliminary invoice is created
The user gets a chance to make changes (i.e. add, remove, change rows)
Create a pdf
Just to be clear, the preliminary invoice does not need to be formatted as the template is, but you should be able to add/remove/change rows and for every cell, indicate whether the value should be visible in the final result.
My problem is that i cannot find a suitable way to display the preliminary invoices. I tried a datagrid (default, telerik, devexpress), but it's too messy. Besides a datagrid, i have no idea what i can use.
What controls can i use best to have a nice and usable UI.
Please don't be like this:
alt text http://bitsandpieces.us/wp-content/uploads/2008/03/imagesapple-20google-20and-20you.png
A typical UI paradigm for this kind of thing is to view it as two separate problems: giving the user a way of viewing the elements that he can modify, and giving him the ability to modify any specific element. You use a list control (ListBox, ListView, maybe TreeView if the elements are organized hierarchically or need to be grouped into categories) to present the elements, and then when the user selects an element the program presents a tabular presentation of field names and editable value controls.
Basically, you're dividing the program's functionality into two categories: stuff that the user wants to do to rows (add, remove, re-order, select) and stuff that the user wants to do to the selected row's elements.
You can mush these two sets of functionality into one if you use a DataGridView, but as you've seen that gets pretty ugly if there's any complexity to the elements you're editing.
Two possible approaches to this: the property-sheet paradigm (select object, right-click, select "Properties", edit values in a modal dialog), or a paradigm where the window's split into two panels, with one being the rows and the other being the details of the currently selected row. There are lots of others.
What is your platform? Winforms? WPF?
What exactly did you dislike about using a datagrid for this? Part of the problem is that whether you like it or not, you're going to be coding a datagrid - you essentially described features of one. If at all possible try to use someone else's datagrid because it will save you a lot of work. Typically, 3rd party datagrids should be fairly customizable, and you should be able to make it look however you want - and take advantage of the built in sorting, editing, grouping, etc. Creating a datagrid-like control from scratch isn't easy and should be avoided if possible.
You don't have to have a plain giant datagrid - you can crate a custom control that displays the invoice formatted however you like, with a live datagrid appearing only where the invoice shows tabular data, formatted to appear as an integral part of the invoice itself.
I'm doing something similar, where the client can edit or even remove the line items for the invoice prior to sending it to the client.
The current app they run their business on is a WebForms Intranet application, so this is an extension to that. So they can add/remove/edit rows fairly easily.
But Egor is right. You're essentially talking about a datagrid no matter what you do. I take it you want something 'cleaner' and more intuitive?
Simplicity is difficult.
I would take a look at what is already out there, especially for invoices, and see how they are doing it.
Not sure how big your company is, but it never hurts to take advantage of the large company applications and user interfaces, the pour thousands/millions of dollars into user interface design and testing.
I would take a look at any of the following (most offer a free trial, or just try searching for screenshots):
www.freshbooks.com
www.invoicera.com
www.getcashboard.com
www.simplifythis.com
Just some ideas ... hope this helps!
Related
For the last few weeks I've been building a product demo for work which includes a winform to enter new customer enquiry information. One of the form elements is a text box which, for the sake of ease, I haven't imposed any validation on so far. However, I now need to make it so that the user can only enter a valid location from an sql database table (containing around 15k streets).
I'm still quite new to C# programming. My first thought was that I should change my text box to a combobox but I seem to remember that when you click on a combobox all the options in the list appear before you've typed anything. Since our computers are slow and there's so many options, I don't really want to flood the screen so I was wondering if there was a way I could continue using my text box and onkeypress (probably the tab key) a dialogue pops up with all the closest matches from the list, prompting the user to select a valid option?
If not, is there a way to stop my combobox from showing the option list until prompted?
I would not think a combobox is not well suited for that many items.
The way I have approach this is to use a separate list view to show matches. You could probably put matches in a drop-down style borderless window, but I find that more complex and may be difficult to make the interaction work well.
I would just have the streets in a separate list view control and apply a filter to that.
Make sure the view is resizable, I find it very frustrating when working with old window controls where the list is tiny due to it being written for 640x480 screens, and does not allow resizeing.
Keep performance in mind, when searching with each key-press you might want to fetch all records and do the search in memory rather than making a sql query for each key.
I have a need to provide as options multiple objects from a particular data set, and populate a list so that an end-user can select, none,some, all, or all + possibly missing data fields (user-input).
I originally planned to extend a System.Windows.Forms.ListView to include a whitespace item that contained a checkmark, then specially handle the case where a user had clicked this blank line item.
I would like the ability to remove these user-input line items if possible. I do not have to use a System.Windows.Forms.ListView, but its design seems to best-fit this particular use.
Is there a control with this functionality already , or an attribute of the System.Windows.Forms.ListView I have missed that may handle these situtations?
---Update---
ListBox is changed to System.Windows.Forms.ListView
DataGrid sounds like it would be a good fit; otherwise I'd suggest looking at 3rd party controls.
i got a question regarding C#
I'm about making a program to hold all my daily tasks, and i need to show them in some kind of panel/list, Ive tryed with the gridview and it worked fine, but i don't want a "table" look, i rather want somekind of access database look, so it creates a new textbox/label maybe a panel with several informations - got any suggestions for this one? if it's possible in a easy way.
If you want just use WindowsForms, you can, for example, define a UserTaskControl:UserControl that holds unique set of controls you need for single entry.
Let's say you need for single entry to have Title, StartDate, EndDate, Description, so you can create a control with 4 TextBoxes or 2 TextBoxes and 2 Calendar controls (matter of design choice).
After define on main window TableLayoutPanel and at runtime add new instances of your UserTaskControl in the moment you need a new entry in your task list.
If you want to make things much better, consider of using WPF, as there you can use also UI Virtualization technique (just one example), which can make a difference in regard of WindowsForms, if you have too much entries in your list (too much is application specific measure, obviously). But in this case you need to learn WPF and learn to use it in a good way, which is a right thing to do IMHO, but depends on how much time you have.
Hope this helps.
A listview with checkboxes to check off when you've completed them? You can make the items editable or put in an "editing panel" to use to edit the values.
So you'd have:
[x] Get dressed
[x] Take out the garbage
[x] Make breakfast
[x] Ask ? on stackoverflow !
[ ] Implement solution
I did this one for work as a task tracker.
Well it's not playing actually.
I have a database with about 200 list of items in it. I've used DataTable to fetch all the data in single connection.
Then created a windows button that creates new button for all the items.
It is OK and I was able to do it easily.
But I stuck over two things..
First is, I have limited space in my windows form, that's why I want to load only 30 buttons at first and then upon second click event, I want to load buttons for remaining 30 items and so on..
Second problem is, even if i managed to solve the first problem? How to arrange them in proper row/column?
Please help.
Grab an ordered list of records, split it to a list of "pages" (which is also a list of records) and use navigation buttons to change the context of current page.
Why don't you take a DataGridView with a BindingSource and a DataGridViewButtonColumn? With this as a starting point you can simply glue them together by calling:
myDataGridView.DataSource = myBindingSource;
myBindingSource.DataSource = myDataTable;
Update
Surely you can try to do the whole visualization on yourself by using a TableLayoutControl. But the DataGridView is a control that is specialized to visualize data in a data grid (hence the name of it).
The grid view is a very complex control, but it has a lot of nice features which make your results looking more professional by simply configuring some properties of it. For example simply set the property AutoSizeColumnsMode to Fill to simply avoid horizontal scroll bars and set the Column.AutoSizeMode of some columns to e.g. DisplayedCells to enforce which columns should be wrapped, etc.
Also there are a lot of features regarding to data validation, formatting, etc. So i think even if the step-in hurdle is a little higher you got a much better visualization then trying to do all this stuff manually by taking a TableLayoutPanel. Last but not least there are lots of examples about how to use the specific properties within the MSDN and if you get really stuck just search for the problem here on SO or on the web and if you don't find a proper solution just ask a question here on SO.
(C#/SQL/Approach-question)
This has to be one of the hardest nuts I've ever had to crack. So I sincerely hope one of you smart people out there have tried to solve this before! :)
I have a much of categories (A,B,C) with pictures.
For each picture I need to ascribe some information, based on some controls that have either no- or predefined options. For instance in category A I have a textbox where you can enter anything you want, and a dropdownbox where you can choose between 3 options.
Now, for each category I would like to be able to design (decide) which controls (text, select, checkbox, radio, etc.) I want to ascribe to a category, and I want also to be able to decide what values apply to that control. Let's say I have a select-control, and I want to be able to decide if multiple select are allowed, and which values are available.
So the end product would be:
I can administrate what categories have which controls in them, and which options are available (i.e. single or multiple select) as well as which values are ascribed or allowed.
I need to be able to store this information in a persistable fashion.
I need to be able to "easily" parse the return-data from the page where the controls are rendered.
I realize this is a complicated question, and I will be happy to answer any questions you might have to help clarify the problem.
Thank you in advance!
You could separate the render part (dynamically generated) apart from what to render(based on categories).
Assuming you will use winform controls.. you could have a config file or a simple SQL table that follows schema below:
Table_Category (CategoryName, nickNameOfControl, NotNull, OtherAttributes)
Table_Control (nickNameOfControl, ControlType, Values)
Based on your actual table design, you will be able to CRUD on the tables design time for administration, your render part of the program can read the ControlType information (TextBox, ComboBox etc) and dynamically generate the controls at run time.
Hope this helps.