craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > General QuickTable Support/Help Post New Topic   Post A Reply
insert() does not show the new row. printer friendly version
next newest post | next oldest post
Author Messages
sandeep.bhatt
Private

Gender: Unspecified
Location:
Registered: Apr 2007
Status: Offline
Posts: 9

Click here to see the profile for sandeep.bhatt Send email to sandeep.bhatt Send private message to sandeep.bhatt Find more posts by sandeep.bhatt Edit or delete this message Reply w/Quote
Posted Thursday, April 26, 2007 @ 05:53:09  

Hi,

am using refresh(vectorofVectors) to create the first row for the table and then using
insert to add more rows.

the refresh() works fine and displays the first row, but the insert() doesnt seem to work
i.e the second row doesnt get displayed in the table even though a print of the rowcount
displays the no of rows as 2

why is the second row not getting displayed in the table?

here is the code:-

Vector tabledata = new Vector();
tabledata.addElement(dbv);




try {
odbtable.refresh(tabledata);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

//set up column properties

for ( int i = 1; i <= numberOfColumns; i++ ) {

Column c;
c = odbtable.getColumn(i-1);
try {
c.setHeaderValue(metaData.getColumnName( i ));
c.setType(metaData.getColumnType(i));
c.setReadOnly(true);
c.setPreferredWidth(100);

System.out.printf( "%-8s\t", metaData.getColumnName( i ) );
System.out.println();

System.out.printf( "%-8s\t", metaData.getColumnType( i ) );
System.out.println();

} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}//end for

//insert a non-db row

//odbtable.setEditable(true);

Vector ndbv = new Vector();

ndbv.addElement(new String("MNO"));
ndbv.addElement(new String("PQR"));
ndbv.addElement(new String(""));
ndbv.addElement(new String(""));

odbtable.insert(ndbv);
System.out.println("NO OF ROWS" + odbtable.getRowCount());// displays 2

Thanks in advance

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Monday, April 30, 2007 @ 01:37:23  

did you enable debug? debug may give you some hint.
Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios