Thread View: borland.public.jbuilder.database
3 messages
3 total messages
Started by cts ctskinnerATyahoo.com
Fri, 10 Nov 2006 05:38
jdbTable how to set caption or header
Author: cts ctskinnerATyahoo.com
Date: Fri, 10 Nov 2006 05:38
Date: Fri, 10 Nov 2006 05:38
23 lines
1382 bytes
1382 bytes
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();
Re: jdbTable how to set caption or header
Author: John Moore (TeamB)
Date: Fri, 10 Nov 2006 21:36
Date: Fri, 10 Nov 2006 21:36
37 lines
2067 bytes
2067 bytes
Please repost in the dbswing section for jdbTable help..
"cts" ctskinnerATyahoo.com wrote:
> 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
====================================================
Re: jdbTable how to set caption ANSWER
Author: cts ctskinnerATyahoo.com
Date: Mon, 13 Nov 2006 03:54
Date: Mon, 13 Nov 2006 03:54
24 lines
1804 bytes
1804 bytes
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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads