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 > Column Post New Topic   Post A Reply
refresh table data modify the header value by default printer friendly version
next newest post | next oldest post
Author Messages
infow
Lieutenant General

Gender: Male
Location: France
Registered: Mar 2005
Status: Offline
Posts: 38

Click here to see the profile for infow Send email to infow Send private message to infow Find more posts by infow Edit or delete this message Reply w/Quote
Posted Thursday, March 24, 2005 @ 10:10:57  

Hi,
when i call a quicktable, i made
createColumnModelFromQuery();
getColum(j).setHeaderValue(..);

when refresh a quicktable, i put
myQuickTable.setselectSQL(myQuery);
myQuickTable.refresh();

and the quicktable is always put the header by default (name of the row),
i had to make again the
createColumnModelFromQuery();
getColum(j).setHeaderValue(..);

How can i resolve this problem ?
I had seen in DBTableModel and the function refresh(Object input, Properties prop),
i had to take away this line :
if(dbColumnModel.defaultColumnsDisplayed == true || gridType == RESULTSET_GRID)
createColumnModelFromQuery(tableResultSet);

but it's not very beautifull !
what can i do ?
Thank for your help and have a nice day

--------------------
Olivier

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 Thursday, March 24, 2005 @ 20:49:45  

call useOldColumnProperties(true); as below. Refer the api help of useOldColumnProperties for more information.

Code:

myQuickTable.createColumnModelFromQuery();
getColum(j).setHeaderValue(..);

///////////////////
myQuickTable.useOldColumnProperties(true);
//////////////////

myQuickTable.setselectSQL(myQuery);
myQuickTable.refresh();


infow
Lieutenant General

Gender: Male
Location: France
Registered: Mar 2005
Status: Offline
Posts: 38

Click here to see the profile for infow Send email to infow Send private message to infow Find more posts by infow Edit or delete this message Reply w/Quote
Posted Saturday, March 26, 2005 @ 06:45:13  

I saw this function but i'm afraid this doesn't work
when i put myquickTable.useOldColumnProperties(true);
then the quicktable is displaying default header (name of the row)

it doesn't work !
I'm using database record ...

--------------------
Olivier

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 Saturday, March 26, 2005 @ 12:06:23  

Please send a small source code reproducing this problem. I will look into it immediately.

It should be called between calling refresh() methods, it should not be called before refresh() is called for the first time.

infow
Lieutenant General

Gender: Male
Location: France
Registered: Mar 2005
Status: Offline
Posts: 38

Click here to see the profile for infow Send email to infow Send private message to infow Find more posts by infow Edit or delete this message Reply w/Quote
Posted Monday, March 28, 2005 @ 03:46:44  

the problem seems to be in the fucntion setSelectSql from DBTable:
there is a line : useOldColumnProperties(false) ;
when i put this line off, it's ok ...

You should correct your code ...

Have a nice day

--------------------
Olivier

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, March 28, 2005 @ 22:26:37  

You are right, it should be corrected to

if( !useOldColumnProperties )
useOldColumnProperties(false);

We will update this change in the next release.

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