BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

jdbTable how to set caption or header

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Databases
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri Nov 10, 2006 9:13 am    Post subject: jdbTable how to set caption or header Reply with quote



how do i set jdbTable caption or column header to be
Different from dataset column names?
after this:
jdbTabla.setDataSet(dmProja.getProjects());
// dmProja is a DataModule



this does NOT work
TableColumn c = jdbTabla.getColumnModel().getColumn(0);
c.setCaption("zzz");

This does NOT work
TableColumn c = jdbTabla.getColumnModel().getColumn(0);
c.setHeaderValue( "aaa" );

This returns column count of zero;
com.borland.dx.dataset.DataSet ds;
ds = jdbTabla.getDataSet(); //
int cod;
if (ds != null) {
cod = ds.getColumnCount();
Back to top
John Moore (TeamB)
Guest





PostPosted: Sat Nov 11, 2006 3:36 am    Post subject: Re: jdbTable how to set caption or header Reply with quote



Please repost in the dbswing section for jdbTable help..


"cts" ctskinnerATyahoo.com wrote:
Quote:
how do i set jdbTable caption or column header to be
Different from dataset column names?
after this:
jdbTabla.setDataSet(dmProja.getProjects());
// dmProja is a DataModule



this does NOT work
TableColumn c = jdbTabla.getColumnModel().getColumn(0);
c.setCaption("zzz");

This does NOT work
TableColumn c = jdbTabla.getColumnModel().getColumn(0);
c.setHeaderValue( "aaa" );

This returns column count of zero;
com.borland.dx.dataset.DataSet ds;
ds = jdbTabla.getDataSet(); //
int cod;
if (ds != null) {
cod = ds.getColumnCount();




--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
http://www.microps.com/mps/paperFAQ.html
====================================================
Back to top
Guest






PostPosted: Mon Nov 13, 2006 9:12 am    Post subject: Re: jdbTable how to set caption ANSWER Reply with quote



you cant set caption with just a DataSet
you have to set up the columns
with this sort of code (After SetQuery)

column1.setCaption("Project ID");
column1.setColumnName("PROJECTID");
column1.setDataType(com.borland.dx.dataset.Variant.STRING);
column1.setPrecision(10);
column1.setRowId(true);
column1.setTableName("PROJECTS");
column1.setServerColumnName("PROJECTID");
column1.setSqlType(1);
column2.setCaption("Project Description");
column2.setColumnName("PROJECTDESC");
column2.setDataType(com.borland.dx.dataset.Variant.STRING);
column2.setPrecision(100);
column2.setTableName("PROJECTS");
column2.setServerColumnName("PROJECTDESC");
column2.setSqlType(12);
projects.setColumns(new Column[] {column1, column2});

note you CAN do this in the IDE, do DESIGN in DataModule
click on the Datamodule until columns appear, they have a caption property.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.