Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute22-Dec-10 13:13
Henry Minute22-Dec-10 13:13 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC22-Dec-10 13:28
LAPEC22-Dec-10 13:28 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute22-Dec-10 13:35
Henry Minute22-Dec-10 13:35 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC22-Dec-10 14:00
LAPEC22-Dec-10 14:00 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? [modified] Pin
LAPEC26-Dec-10 4:46
LAPEC26-Dec-10 4:46 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC30-Dec-10 10:44
LAPEC30-Dec-10 10:44 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute4-Jan-11 11:40
Henry Minute4-Jan-11 11:40 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC4-Jan-11 12:05
LAPEC4-Jan-11 12:05 
Hi Henry

Good to hear from you again.
I actually managed to sort out the problem that you explained to me, and I'm only doing with two panels (food and drink panel).
Now another problem is rising.
You know on the listview the sample that you send it to me as a zip file.
On that listview of your sample, you have divided the courses into groups of the listview (and I did managed to do that on my project).
The problem is like so

When I add the starter items in to listview and also the main items it groups on the listview like so:

Starters ════════════════════════════════════
1 Soup		£0.00		
1 Bruschetta	£0.00	
Mains ═══════════════════════════════════════
1 Ravioli	£0.00
1 Lasagne	£0.00
1 Veg. Pizza    £0.00


But what I want to do now is: (maybe you have noticed there is a button called Course Separator)....

Between starter group header and main group header I want to insert a line string into listview like so....

Starters ════════════════════════════════════
1 Soup		£0.00		
1 Bruschetta	£0.00	
****** Course 1 ****** this is what I want to insert in between...
Mains ═══════════════════════════════════════
1 Ravioli	£0.00
1 Lasagne	£0.00
1 Veg. Pizza    £0.00


here is the code of the button but for some reason its not displaying nothing into listview.

private void cmdCourseSeparator_Click(object sender, EventArgs e)
        {
            string line1 = "════";
            string line2 = "══════ Course 1 ══════";
            string line3 = "══════";
            string line4 = "══════ Course 2 ══════";
            ListViewGroup liViGroup = new ListViewGroup();
            liViGroup.HeaderAlignment = System.Windows.Forms.HorizontalAlignment.Center;
            if (liViGroup.Header == "Starter")
            {
                liViGroup.Items.Add(line1);
                //foodItem.SubItems.Add(line2);
                //foodItem.SubItems.Add(line3);
                //foodItem.SubItems.Add(line3);
            }
            this.TableOrderListView.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] {
            liViGroup});
        }

GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute4-Jan-11 12:25
Henry Minute4-Jan-11 12:25 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute4-Jan-11 13:08
Henry Minute4-Jan-11 13:08 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC4-Jan-11 13:21
LAPEC4-Jan-11 13:21 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC4-Jan-11 14:02
LAPEC4-Jan-11 14:02 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? [modified] Pin
Henry Minute5-Jan-11 9:03
Henry Minute5-Jan-11 9:03 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC5-Jan-11 13:15
LAPEC5-Jan-11 13:15 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute5-Jan-11 13:17
Henry Minute5-Jan-11 13:17 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC5-Jan-11 13:23
LAPEC5-Jan-11 13:23 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute5-Jan-11 13:24
Henry Minute5-Jan-11 13:24 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC6-Jan-11 2:32
LAPEC6-Jan-11 2:32 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute6-Jan-11 4:36
Henry Minute6-Jan-11 4:36 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC6-Jan-11 6:01
LAPEC6-Jan-11 6:01 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute6-Jan-11 8:29
Henry Minute6-Jan-11 8:29 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC6-Jan-11 8:35
LAPEC6-Jan-11 8:35 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute6-Jan-11 11:04
Henry Minute6-Jan-11 11:04 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC6-Jan-11 11:28
LAPEC6-Jan-11 11:28 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute6-Jan-11 11:29
Henry Minute6-Jan-11 11:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.