Board index » jbuilder » JdbComboBox in JdbTable

JdbComboBox in JdbTable


2004-04-13 01:11:09 AM
jbuilder7
Hi all,
My JdbTable has 7 columns. I would like to replace 1st column to the custom created column so that the picklist will have custom keyselectionlistener
I have created a jdbComboBox, set its keyselectionlistener to the custom listener.
jdbBox = new JdbComboBox();
jdbBox.setKeySelectionListner(new CustomKeySelection());
TableColumn tblColumn = new TableColumn(0);
tblColumn.setCellEditor(new DefaultCellEditor(jdbBox));
jdbTable1.setCustomColumns(new ColumnDescriptor(new int {0}, tblcolumn);
Now the problem is when user clicks on add button in navtoolbar the 1st column is highlighted, but the dropdown box of the jdbcombobox is not activated, I mean when user starts typing, the combobox doesn’t show the dropdown box nor it does capture any key event. When user clicks on the dropdown box it starts capturing the key events.
I tried firePopupmenuvisible() method, it does not help.
We badly need to rectify this problem.
Can anyone give any suggestions? Thanks in advance.
 
 

Re:JdbComboBox in JdbTable

i think, you need to get the Celleditor from the JdbTable.
Somethink like this:
TableColumn tableColumn = jdbTable1.getColumnModel().getColumn(i);
TableCellEditor cellEditor = tableColumn.getCellEditor();
If the column has a picklist, the editor is a JdbComboBox.
Hope this helps
Olaf Raether
On 12 Apr 2004 09:11:09 -0800, "Vani S" < XXXX@XXXXX.COM >
wrote:
Quote
Hi all,

My JdbTable has 7 columns. I would like to replace 1st column to the custom created column so that the picklist will have custom keyselectionlistener

I have created a jdbComboBox, set its keyselectionlistener to the custom listener.

jdbBox = new JdbComboBox();
jdbBox.setKeySelectionListner(new CustomKeySelection());

TableColumn tblColumn = new TableColumn(0);

tblColumn.setCellEditor(new DefaultCellEditor(jdbBox));

jdbTable1.setCustomColumns(new ColumnDescriptor(new int {0}, tblcolumn);

Now the problem is when user clicks on add button in navtoolbar the 1st column is highlighted, but the dropdown box of the jdbcombobox is not activated, I mean when user starts typing, the combobox doesn’t show the dropdown box nor it does capture any key event. When user clicks on the dropdown box it starts capturing the key events.

I tried firePopupmenuvisible() method, it does not help.

We badly need to rectify this problem.

Can anyone give any suggestions? Thanks in advance.

 

Re:JdbComboBox in JdbTable

Thanks a lot for your reply.
Whenever I did this jdbTable1.getColumnModel().getColumn(1);
I got exceptions. so I tried this method. column8.setItemEditor(tosomeJdbcomboBox_with_desired_search_feature);
and when user clicks on the 'add' button in navtoolbar and when they tab into the combobox i capture the action event and fire the popmenuvisible event.
I kind of works.. let me test it thoroughly and see.
Vanitha.
Olaf Raether < XXXX@XXXXX.COM >wrote:
Quote
i think, you need to get the Celleditor from the JdbTable.
Somethink like this:

TableColumn tableColumn = jdbTable1.getColumnModel().getColumn(i);
TableCellEditor cellEditor = tableColumn.getCellEditor();

If the column has a picklist, the editor is a JdbComboBox.

Hope this helps

Olaf Raether


On 12 Apr 2004 09:11:09 -0800, "Vani S" < XXXX@XXXXX.COM >
wrote:

>Hi all,
>
>My JdbTable has 7 columns. I would like to replace 1st column to the custom created column so that the picklist will have custom keyselectionlistener
>
>I have created a jdbComboBox, set its keyselectionlistener to the custom listener.
>
>jdbBox = new JdbComboBox();
>jdbBox.setKeySelectionListner(new CustomKeySelection());
>
>TableColumn tblColumn = new TableColumn(0);
>
>tblColumn.setCellEditor(new DefaultCellEditor(jdbBox));
>
>jdbTable1.setCustomColumns(new ColumnDescriptor(new int {0}, tblcolumn);
>
>Now the problem is when user clicks on add button in navtoolbar the 1st column is highlighted, but the dropdown box of the jdbcombobox is not activated, I mean when user starts typing, the combobox doesn’t show the dropdown box nor it does capture any key event. When user clicks on the dropdown box it starts capturing the key events.
>
>I tried firePopupmenuvisible() method, it does not help.
>
>We badly need to rectify this problem.
>
>Can anyone give any suggestions? Thanks in advance.
>

 

{smallsort}