Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » A table with two columns(How to sum)
A table with two columns [message #842900] Thu, 12 April 2012 18:17
Aberforth Dumbledore is currently offline Aberforth DumbledoreFriend
Messages: 17
Registered: April 2012
Location: A planet called Earth
Junior Member
Hi there everyone !!!

I want to do two things:

1. Get the sum of the column "Price".
2. Save all table's content in a MySQL table.

For the second issue I try this:

for(int row = 0; row < vista.tdetalle.getItemCount(); row++)
         //product = item.getText(0);
         //price = item.getText(1);         
         product = item.getText(row); // How can I set the first column here???
         price = item.getText(row);// How can I set the second column here???

         facade.RegistrarBitacora(product,price);//Here save on DB

That code only saves the last row.

I fill my table like this:

for(CProductoDTO catalogoproductos :coleccion)
         item = new TableItem(vista.tdetalle, SWT.NONE);
         item.setText(new String[]

I need some illustration here. Thanks.
Previous Topic:Embedding QT widgets in SWT
Next Topic:A table with two columns
Goto Forum:

Current Time: Sat Feb 24 22:29:35 GMT 2018

Powered by FUDForum. Page generated in 0.02039 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software