Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » A table with two columns
A table with two columns [message #843035] 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[]
{
catalogoproductos.get_Nombre_Producto(),//product
catalogoproductos.get_Precio_Producto(),//price
});
}


I need some illustration here. Thanks.
Previous Topic:A table with two columns
Next Topic:A table with two columns
Goto Forum:
  


Current Time: Thu Mar 28 10:24:23 GMT 2024

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

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

Back to the top