datagrid vs listview for self developed invoice control (or system)

good day i need to make a form that can add items to a invoice
i am only aware of controls that i need to pay for and i live in a 3rd world country, (spare me the pity).
can anyone give me a tip on how to make one or what components i should use or any help would be appreciated.
these are the fields that need to be in the invoice system:
1      2            3      4      5            6      7      8
CODE      DESCRIPTION      QTY      UNIT      UNIT_PRICE      DISC      TAx      NET_PRICE

fields 1,2 requires another form to be called, and on this second form i will have a datagrid filled with appropriate values
once the user clicks on this second form, the values of the second form will be passed back to the invoice field.
fields 3,5,6,7,8 need to be similar to textboxes and will be filled from a dataset but will be editable as well
fields 4 is combobox type and the user will select for e.g. Meter/ kilogram/ etc.


so far it seems datagrid can do  most of them.
i have viewed this code from
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20728539.html
which enables a user to insert a combobox into a datagrid and it is brilliant.

Q1
would a datagrid or listview be better for this situation.
any other controls that would be suitable?

Q2
would i be able to call a combobox from a listview
as in http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20728539.html

Q3
will i be able to call another form from a cell in a datagrid?
would i be able to do it from a listview

Q4
any other known hiccups i will encounter

or

Q5
possible link to similar/helpful situation / solution
jxhardingAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
RonaldBiemansConnect With a Mentor Commented:
Q1 I would go for the datagrid, I find it easier to manipulate
Q2 Yes, look here http://support.microsoft.com/default.aspx?scid=kb;EN-US;q320342
Q3 Yes, you can use the mouseup or mousedown event to determine the row and collumn
Q4 I don't think you will encounter much problems with the thing you want to do
0
 
tgannettsCommented:
The datagrid is a much better option from the listview.... You can respond to which column and row a user has selected using the HitTest class:

You need to handle the Mouse_Down event, and determine which column the user has selected - doing this you will be able to activate forms etc

0
 
tgannettsConnect With a Mentor Commented:
So:

    Private Sub DataGrid1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseDown

        Dim ht As DataGrid.HitTestInfo

        ht = Me.DataGrid1.HitTest(e.X, e.Y)

        If ht.Type = Windows.Forms.DataGrid.HitTestType.Cell Then

            Select Case ht.Column

                Case 0
                    Dim form1 As New Form1()
                    If form1.ShowDialog = DialogResult.OK Then
                        Me.DataGrid1.Item(ht.Row, 0) = form1.YourValueName
                    End If
                Case 1

                Case 2

            End Select

        End If

    End Sub

This will open up a Modal form which the user can select a value from. If you make sure that value is stored in a property on the form, then you can add that value to the datagrid.

Hope this helps.

Tom
0
 
RonaldBiemansCommented:
Q5. This is an excelent site for the datagrid control http://www.syncfusion.com/FAQ/WinForms/default.asp#44
You will find most of your problems explained here
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.