How to make a grid column a linked column?
Is there any way to make a grid column a linked column?
I have a cardcode column in a grid, which I want to link with BP master link object. If I try to do it the same way I do for matrix, it gives me 'specific cast not valid' error; whereas the same property works fine with matrix.
help will be appreciated...
Binita
You need to do the following:
string colUid = "yourUid";
oGrid.Columns.Item(colUid).Type = BoGridColumnType.gct_EditText;
EditTextColumn col = (EditTextColumn)oGrid.Columns.Item(colUid)
col.LinkedObjectType = "2"; //2 = Buisness Partner (The id behind the BoLinkeObjectType as a string)
Similar Messages
-
WPF: how to make the grid column edtiable base on cell content?
our WPF application uses DataGrid.
One grid column we need base on cell has value or not to decide if make the cell editable.
If cell is empty, not editable. If cell is not empty, make it editable.
The cell is bind to a class. We try to make property to bind to the
DataGridTextColumn
IsReadOnly property
public bool IsSampleIdFieldReadOnly { get { return string.IsNullOrEmpty(_sampleId); } }
DataGridTextColumn MinWidth="120"
Binding="{Binding SampleId}"
IsReadOnly="{Binding IsSampleIdFieldReadOnly}"
Header="Sample ID" />
However all cells in the column are editable.
how to achieve that? Thx!
JaneCI guess that will apply to the whole column rather than specific cells and you need a cellstyle.
You could try something like:
<DataGridTextColumn Binding="{Binding SampleId}" Header="Sample Id">
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Style.Triggers>
<DataTrigger Binding="{Binding IsSampleIdFieldReadOnly}" Value="true">
<Setter Property="IsReadOnly" Value="true" />
</DataTrigger>
</Style.Triggers>
I'm afraid I don't have enough time to test it as I'm off out drinking shortly.
Hope that helps.
Recent Technet articles:
Property List Editing ;
Dynamic XAML -
How to make every break column on the top of the rows in the same subgroup
hi, guys:
I was wondering if anyone could help me on this problem: I need to set up a break column on a classic report (I ma required to use classic report only), and it works, but I do not know how to make every break column on the top of the rows in the same subgroup. The break column only stays on the left to the rest columns as it is the first column. Anyone could help me on this problem? Here is the query:
select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
(select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
(select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
(select sof.name||' '||sof.phone1||' '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv
where rox.offender_id=so.offender_id
and sllv.offender_id(+)=so.offender_id
and sl.location_id(+)=sllv.location_id
and rox.status not in ('Merged')
and rox.reg_type_id=1
and upper(rox.status)='ACTIVE'
and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
and ((so.first_name is not null and upper(so.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
and ((so.last_name is not null and upper(so.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
and ((sl.address1||sl.address2 is not null and upper(sl.address1|| sl.address2) like '%'||upper(:P5_TF_ADDRESS)||'%')or (:P5_TF_ADDRESS is null))
and ((sl.city is not null and upper(sl.city) like '%'||upper(:P5_TF_CITY)||'%')or (:P5_TF_CITY is null))
and ((sl.county is not null and sl.county =:P5_SL_COUNTY)or (:P5_SL_COUNTY is null))
and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
and ((sl.zip is not null and sl.zip =:P5_TF_ZIP_CODE)
or (:P5_TF_ZIP_CODE is null))
union
select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
(select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
(select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
(select sof.name||' '||sof.phone1||' '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv
where rox.offender_id=so.offender_id
and sllv.offender_id(+)=so.offender_id
and sl.location_id(+)=sllv.location_id
and rox.status not in ('Merged')
and rox.reg_type_id=1
and upper(rox.status)='ACTIVE'
and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
and ((so.first_name is not null and upper(so.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
and ((so.last_name is not null and upper(so.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
and ((sl.physical_address1 is not null and upper(sl.physical_address1) like '%'||upper(:P5_TF_ADDRESS)||'%') or (:P5_TF_ADDRESS is null))
and ((sl.physical_city is not null and upper(sl.physical_city) like '%'||upper(:P5_TF_CITY)||'%') or (:P5_TF_CITY is null))
and ((sl.physical_county is not null and sl.physical_county =:P5_SL_COUNTY) or (:P5_SL_COUNTY is null))
and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.physical_state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
and ((sl.physical_zip is not null and sl.physical_zip =:P5_TF_ZIP_CODE) or (:P5_TF_ZIP_CODE is null))
union
select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
(select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
(select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
(select sof.name||' '||sof.phone1||' '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv, sor_alias sa
where rox.offender_id=so.offender_id
and sa.offender_id=so.offender_id
and sllv.offender_id(+)=so.offender_id
and sl.location_id(+)=sllv.location_id
and rox.status not in ('Merged')
and rox.reg_type_id=1
and upper(rox.status)='ACTIVE'
and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
and ((sa.first_name is not null and upper(sa.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
and ((sa.last_name is not null and upper(sa.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
and ((sl.address1||sl.address2 is not null and upper(sl.address1|| sl.address2) like '%'||upper(:P5_TF_ADDRESS)||'%')or (:P5_TF_ADDRESS is null))
and ((sl.city is not null and upper(sl.city) like '%'||upper(:P5_TF_CITY)||'%')or (:P5_TF_CITY is null))
and ((sl.county is not null and sl.county =:P5_SL_COUNTY)or (:P5_SL_COUNTY is null))
and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
and ((sl.zip is not null and sl.zip =:P5_TF_ZIP_CODE)or (:P5_TF_ZIP_CODE is null))
union
select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
(select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
(select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
(select sof.name||' '||sof.phone1||' '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv, sor_alias sa
where rox.offender_id=so.offender_id
and sa.offender_id=so.offender_id
and sllv.offender_id(+)=so.offender_id
and sl.location_id(+)=sllv.location_id
and rox.status not in ('Merged')
and rox.reg_type_id=1
and upper(rox.status)='ACTIVE'
and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
and ((sa.first_name is not null and upper(sa.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
and ((sa.last_name is not null and upper(sa.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
and ((sl.physical_address1 is not null and upper(sl.physical_address1) like '%'||upper(:P5_TF_ADDRESS)||'%') or (:P5_TF_ADDRESS is null))
and ((sl.physical_city is not null and upper(sl.physical_city) like '%'||upper(:P5_TF_CITY)||'%') or (:P5_TF_CITY is null))
and ((sl.physical_county is not null and sl.physical_county =:P5_SL_COUNTY) or (:P5_SL_COUNTY is null))
and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.physical_state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
and ((sl.physical_zip is not null and sl.physical_zip =:P5_TF_ZIP_CODE) or (:P5_TF_ZIP_CODE is null))I set up "Jurisdiction" to be displayed as the first column in report attributes and set up the first column to be break column, under the "When displaying a break column use this format, use #COLUMN_VALUE# subs", I fill in "Jurisdiction".lxiscas wrote:
Hi, fac586:
I am sorry for not being able to provide project online oracle to ask the question as some of the data needs to be approved to release.You don't need to use the actual data. Create simple test cases using data from Oracle's sample schemas: SCOTT, OE, HR etc.
I actually want something like this:
Jurisdiction: Bartlesville Police Department, 918-338-4001, http://www.cityofbartlesville.org/departments/police/
Smith , Carl Sherman ......
Smith , Tommy Nesby .....
Jurisdiction: Canadian County Sheriff's Office, 405-262-4787, Fax - 405-422-2430
Smith , Gabriel Ray ...
Smith , Michael Bert ...I omit the sensitive data with ...
but right now it shows as this way:
Jurisdiction: Bartlesville Police Department, 918-338-4001, http://www.cityofbartlesville.org/departments/police/ Smith , Carl Sherman ......
Smith , Tommy Nesby .....
Jurisdiction: Canadian County Sheriff's Office, 405-262-4787, Fax - 405-422-2430 Smith , Gabriel Ray ...
Smith , Michael Bert ...Is that possible to show the data as the upper way?The best way to do this is using a report with a custom named column template as in this example. See the following threads for solutions to similar problems:
<li>{thread:id=2402836}
<li>{message:id=9816577} -
How to make a summary column appear only once (in the first page only) in SSRS 2008?
Hello Everyone,
How to make a summary column appear only once (in the first page only) in SSRS 2008?
Regards
Gautam S
RegardsHi,
Assuming you have test data like this ;
select 'abc'as [GROUP],'NN' name , 1 id
union all
select 'abc' as [GROUP] ,'PP' name , 1 id
union all
select 'abc'as [GROUP],'RR' name , 2 id
Step1 : take Tablix with row group as your group Name .
Step2 : right Click on Row Group Details -> Delete-> Delete Group Only
Step3 : In Count Cell use below expression ;
=CountDistinct(Fields!id.Value)
Follow this link;
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b6b45917-0a26-4d15-be46-2c6a2697d6e9/distinct-rows-sum?forum=sqlreportingservices#5ffdee06-c2c8-44ea-a3a5-b958488bb6b5
Thanks
Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. http://techequation.com -
How to make the vendor column have figure in GRIR line item with RE document type?
Dear Experts,
Could you tell me how to make the vendor column have figure in GRIR line item whose document type is RE?
Thanks!
Xinling ZhangHi ,
You are using FAGLL03 .
FAGLL03 report vendor code is blank
vendor number in new FAGLL03 tcode (offsetting account information)
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30b96fed-eb5d-2e10-1792-f3ff9f65df8a?QuickLink=index&…
Also check OSS note
Note 112312 - Line item: Display of offsetting a/c information
Note 1034354 - FAGLL03: Display of offsetting account information
Many Thanks -
Workflow, How to make the attached SAP shortcut linked to a webgui t-code ?
How to make the attached SAP shortcut linked to the webgui ? (Instead of the SAP Gui )
When I received a "workflow msg" in my outlook inbox, I clicked on the attached shortcut.
And a logon pop-up comes to me, in order that I logon to SAP in the SAPGui mode.
It enables me to make a decision in SAP.
I'd like that when the user receive the shortcut ( or a link ), it opens the webgui mode ?
How can I do that ?
Thx a lot,
Erwanthx
-
Our WPF application uses DataGrid.
One of request is that first column of DataGrid does not show row separator and also does not show Left column separator. So it looks like the first column does not belong to the DataGrid. However, when select a row, the cell of first column still get selected.
How do we make it? Thx!
JaneCHi Magnus,
Thanks for replying our question and provide your solution!
Your solution works by setting "HorizontalGridLinesBrush" and "VerticalGridLinesBrush" to {x:Null} in the DataGrid style and modify "CellStyle" in first column as following:
<DataGridTextColumn MinWidth="32"
Binding="{Binding CellName}"
CanUserReorder="False"
CanUserSort="False"
Header="Cell}"
IsReadOnly="true" >
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="IsEnabled" Value="False"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Border BorderThickness="0" BorderBrush="{x:Null}"
Background="{Binding Background, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Margin="-1">
<Grid Background="{TemplateBinding Background}" VerticalAlignment="Center" Height="42">
<ContentPresenter VerticalAlignment="Center"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
We found another way to achieve it by using DataGridRowHeader. The good way to use DataGridRowHeader is that we do not need to make the first column ReadOnly (click on first column does not select whole row anymore). Select RowHeader in a row will select
whole row. Move scroll bar horizontally, the row header still keep in visible area.
<Style TargetType="{x:Type DataGridRowHeader}" x:Key="dataGridRowHeaderStyle">
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Height" Value="42" />
<Setter Property="SeparatorBrush" Value="{x:Null}" />
<Setter Property="FontSize" Value="16" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridRowHeader}">
<Grid>
<Border x:Name="rowHeaderBorder"
BorderThickness="0"
Padding="3,0,3,0"
Background="{Binding Background, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
BorderBrush="{x:Null}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<DataGrid>
<DataGrid.RowHeaderStyle>
<Style TargetType="DataGridRowHeader" BasedOn="{StaticResource dataGridRowHeaderStyle}">
<Setter Property="Content" Value="{Binding CellName}" />
<Setter Property="Width" Value="35"/>
</Style>
</DataGrid.RowHeaderStyle>
</<DataGrid>
JaneC -
How to make window size same as linked file?
Hi
I understand how to make the link and have it open in a new
window upon click, but how do I make this map open in a window that
is exactly the same dimensions as the map png file itself, as
opposed to opening in the same size of the browser window.
http://www.enhancedwireless.net/Company/contact.shtml
and click on the MALAYSIAN driving directions.
Thanks
KBThat works fine and is quite acceptible, but it won't work
for the initial
default page - which is what the question is about.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"818g" <[email protected]> wrote in message
news:egm8m5$gd5$[email protected]..
> I'd do it with javascript. Highlight the link text in
Dw, type
> "javascript:;"
> in the link box, hit enter, open the Behaviors panel,
click on the Add
> behavior
> button (plus sign) and choose "Open Browser Window" from
the menu. In the
> Open
> Browser Window dialog box you can define the width anf
height of the
> window.
> -
How to make newly added columns appear In IR report
Hi.
I am using APEX 4.0.1. I've created an IR report and then, subsequently, needed to add several column sto the underlying SQL query.
When I save the changes, APEX tells me that it will add the new columns and that I need to run the IR report and either click "Reset" or use the Actions menu to make the new columns appear in the report. I did the latter and the new columns do appear just fine.
However, when I then tried to modify the column labels, I am unable to see these in the report "Attributes" section. And so, I can't access their labels.
How do I get the new columns to appear in the Attributes section of the iR report?
Thanks in advance for any help.
ElieHi, LittleFoot (sorry, I don't see your actual name).
Thanks very much for responding.
I've done exactly what you've described.
I added several new column sto the SQL query underlying the IR. I then re-ran the default Primary report, added the new columns via the Actions -> Select menus, and then saved the report.
When I then go into the IR Attributes page, the new columns are not there. I've closed/re-opened my browser. I don't know what the issue is.
I'm wondering ... would the fact that the underlying query is SELECTing from a view rather than a table make any difference? I wouldn't think it would.
Thank you for any help.
Elie -
How to make only one column non reorderble
I want to make only one column (Column 0) of my JTable non reorderble.
I also want to make the same column non resizable and I want to give it a specific size.
Please help me on this?I have implemented a RowHeaderTable class which displays 1, 2, 3, ... in the first column. The column is in the scrollpane's RowHeaderView, so it is not resizable nor reorderable. But its width can be set in your code. Maybe this is what you need.
Use the class the same way you use a JTable, except 3 added methods:
getScrollPane();
setMinRows(int r);
setRowHeaderWidth(int w);
Note: The table works perfectly in skinless L&F, such as the default java L&F. It looks ugly in Liquid L&F because I don't know how to steal column header's UI to use on a JList. If someone can help me on this one, I thank you in advance.
* RowHeaderTable.java
* Created on 2005-3-21
* Copyright (c) 2005 Jing Ding, All Rights Reserved.
* Permission to use, copy, modify, and distribute this software
* and its documentation for NON-COMMERCIAL purposes and without
* fee is hereby granted provided that this copyright notice
* appears in all copies.
* JING DING MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
* SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING
* BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. JING DING
* SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT
* OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
import java.awt.BorderLayout;
import java.awt.Component;
import javax.swing.AbstractListModel;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListCellRenderer;
import javax.swing.UIManager;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableModel;
* @author Jing Ding
public class RowHeaderTable extends JTable {
private int minRows = 10; // Minimum size of the row header.
private static final int DEFAULT_WIDTH = 30;
private JScrollPane jsp;
// The row header is a JList with the same appearance as the column header.
private JList rowHeader;
// Repaint row header whenever the table inserts or deletes rows.
private TableModelListener tmListener = new TableModelListener(){
public void tableChanged(TableModelEvent e){
if(e.getType() != TableModelEvent.UPDATE)
rowHeader.repaint();
/** Create a new instance of RowHeaderTable.
* @param model
public RowHeaderTable(TableModel model){
setModel(model);
initializeHeader();
jsp = new JScrollPane(this);
jsp.setRowHeaderView(rowHeader);
private void initializeHeader(){
rowHeader = new JList(new AbstractListModel(){
public int getSize(){ return Math.max(getModel().getRowCount(), minRows); }
public Object getElementAt(int index){ return "" + ++index; }
setRowHeaderWidth(DEFAULT_WIDTH);
rowHeader.setFixedCellHeight(getRowHeight());
rowHeader.setCellRenderer(new TableRowHeaderRenderer());
public void setRowHeaderWidth(int w){
rowHeader.setFixedCellWidth(w);
public void setMinRows(int m){ minRows = m; }
public void setModel(TableModel model){
super.setModel(model);
model.addTableModelListener(tmListener);
/**Use this method to get the scrollPane, instead of new JScrollPane(table).
* @return
public JScrollPane getScrollPane(){ return jsp; }
protected class TableRowHeaderRenderer implements ListCellRenderer{
TableCellRenderer colHeaderRenderer;
public TableRowHeaderRenderer(){
JTableHeader header = getTableHeader();
TableColumn aColumn = header.getColumnModel().getColumn(0);
colHeaderRenderer = aColumn.getHeaderRenderer();
if(colHeaderRenderer == null)
colHeaderRenderer = header.getDefaultRenderer();
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean hasFocus){
return colHeaderRenderer.getTableCellRendererComponent(
RowHeaderTable.this, value, isSelected, hasFocus, -1, -1);
public static void main(String[] args){
try {
UIManager.setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel");
}catch (Exception e){ e.printStackTrace(); }
String[] columnNames = {"First Name",
"Last Name",
"Sport",
"# of Years",
"Vegetarian"};
Object[][] data = {
{"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)},
{"Alison", "Huml", "Rowing", new Integer(3), new Boolean(true)},
{"Kathy", "Walrath", "Knitting", new Integer(2), new Boolean(false)},
{"Sharon", "Zakhour", "Speed reading", new Integer(20), new Boolean(true)},
{"Philip", "Milne", "Pool", new Integer(10), new Boolean(false)}
DefaultTableModel dtm = new DefaultTableModel(data, columnNames);
RowHeaderTable rht = new RowHeaderTable(dtm);
rht.setMinRows(0);
JFrame frame = new JFrame("RowHeaderTable Demo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(rht.getScrollPane(), BorderLayout.CENTER);
frame.pack();
frame.setVisible(true);
dtm.addRow(new Object[]{"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)});
dtm.addRow(new Object[]{"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)});
dtm.addRow(new Object[]{"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)});
} -
How to make a particular column bold in alv?
Dear Experts,
I have searched many threads on this. I have used control break events to get the subotals and totals. The requirement is to make the text and the figure of subtotal and total bold.
I am still not able to find the thread to make a particular column text in bold. And about colouring, I have used collect statement in my final structure so I am unable to use cellcolor type lvc_t_scol.
Is there any way to make the subtotals and totals in bold? If not able, I may go for coloring.
Regards
ManiHello mani,
Try this:
TYPES : BEGIN OF ty_outtab,
celltab TYPE lvc_t_styl.
INCLUDE STRUCTURE mara.
TYPES END OF ty_outtab.
DATA : gt_outtab TYPE TABLE OF ty_outtab WITH HEADER LINE,
gs_layout TYPE lvc_s_layo,
ls_celltab TYPE lvc_s_styl,
lt_celltab TYPE lvc_t_styl.
SELECT * FROM MARA INTO CORRESPONDIG FIELDS OF TABLE gt_outtab UP TO 20 ROWS.
ls_celltab-style = '00000121'.
INSERT ls_celltab INTO lt_celltab INDEX 1.
READ TABLE gt_outtab INDEX 1.
gt_outtab-celltab = lt_celltab.
INSERT gt_outtab INDEX 1.
gs_layout-stylefname = 'CELLTAB'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_structure_name = 'MARA'
is_layout_lvc = gs_layout
TABLES
t_outtab = gt_outtab
EXCEPTIONS
program_error = 1
OTHERS = 2.
I hope you help. -
How to make a entire column editable in an ALV grid
Hi all,
I am trying to make a column editable in an ALV grid. For that I wrote the following code. In the below code I have set the 'edit' field of ls_fcat to 'X'. But Iam getting Runtime error. Can anyone help in resolving this problem or suggest any method to make a column editable in an ALV grid.
form prepare_fc changing go_fieldcat type lvc_t_fcat.
data: ls_fcat type lvc_s_fcat.
refresh: go_fieldcat.
clear: ls_fcat.
ls_fcat-reptext = ' Safety Stock Figures'.
ls_fcat-coltext = 'Safety Stock Figures'.
ls_fcat-fieldname = 'EISBE'.
ls_fcat-ref_table = 'IMAT'.
ls_fcat-edit = 'X'.
modify go_fieldcat from ls_fcat.
APPEND LS_FCAT TO GO_FIELDCAT.
endform.
Thanks & Regards,
Vishnu Priya.ls_fcat-edit = 'X'.
is correct only.
have a look into this code
struct_grid_lset TYPE lvc_s_layo,
i_grid_fcat TYPE lvc_t_fcat
DATA ls_fcat TYPE lvc_s_fcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'MONTH'.
ls_fcat-ref_table = 'TYPE'.
ls_fcat-ref_field = 'C'.
<b> ls_fcat-edit = 'X'.</b>
ls_fcat-coltext = text-030."Month
ls_fcat-seltext = text-030.
APPEND ls_fcat TO p_i_grid_fcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'YEAR'.
ls_fcat-ref_table = 'TYPE'.
ls_fcat-ref_field = 'C'.
ls_fcat-coltext = text-031."Year
ls_fcat-seltext = text-031.
APPEND ls_fcat TO p_i_grid_fcat.
CALL METHOD o_grid->set_table_for_first_display
EXPORTING
i_bypassing_buffer = space
is_variant = ws_f_grid_disvar
i_save = ws_c_grid_save
is_layout = struct_grid_lset
CHANGING
it_outtab = i_grid_outs[]
<b>it_fieldcatalog = i_grid_fcat[]</b>
it_sort = i_sort_fcat. " Period
Also Check this code.Another way using field symbols.
i_fieldcat TYPE lvc_t_fcat,
w_layout TYPE lvc_s_layo ,
w_variant TYPE disvariant.
FIELD-SYMBOLS : <lfs_fieldcat> TYPE lvc_s_fcat.
*Default display
LOOP AT p_fieldcat ASSIGNING <lfs_fieldcat>.
CASE <lfs_fieldcat>-fieldname.
WHEN 'GL_ACCT'.
<lfs_fieldcat>-coltext = text-050.
<lfs_fieldcat>-no_out = ' '.
<lfs_fieldcat>-scrtext_l = text-050.
<b> <lfs_fieldcat>-edit = 'X'.</b>
WHEN OTHERS.
ENDCASE.
ENDLOOP.
Hope this helps. -
How to make the combobox column in grid can be selectable
Hi,
I have a grid in a form and use a SQL query as the data source. Now I want to make a column(a field in a SQL query) to be displayed as combobox and user can select it. I tried to use below code to make the column displayed like a combobox, it seems that the colunn becomes a dropdown box but i can't select it. Also I can't find a way to add valid value and description into this combobox like what I do on a combobox in a form.
oGrid.Columns.Item("Approved").Type = SAPbouiCOM.BoGridColumnType.gct_ComboBox;
SAPbouiCOM.GridColumn col = oGrid.Columns.Item("Approved");
then ???
Any suggestion?
Thanks!
LanHi Lan
Try This For Matrix......
'For Adding Values
oColumn = oColumns.Add("Drink", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
oColumn.TitleObject.Caption = "Drink"
oColumn.Width = 100
'Add Valid Values
oColumn.ValidValues.Add("Cola", "")
oColumn.ValidValues.Add("7up", "")
oColumn.ValidValues.Add("Fanta", "")
oColumn.ValidValues.Add("Orange Juice", "")
oColumn.ValidValues.Add("Water", "")
oColumn.ValidValues.Add("Lemonade", "")
oColumn.ValidValues.Add("Ice Tea", "")
oColumn.ValidValues.Add("Coffee", "")
'For selected Value
Dim ocombo As SAPbouiCOM.ComboBox
Dim oform As SAPbouiCOM.Form
Dim omat As SAPbouiCOM.Matrix
oform = SBO_Application.Forms.Item("MOR1")
omat = oform.Items.Item("mat").Specific
ocombo = omat.Columns.Item("Drink").Cells.Item(1).Specific
ocombo.Select("Fanta", SAPbouiCOM.BoSearchKey.psk_ByValue)
Thanks
Shafi -
Make photo grid objects into links?
I would like to make the photos and captions in the photo grid into links. When I select a photo or a caption in the photo grid, the link inspector is grayed out and I can not click "enable hyperlink". Every thing works fine for images and text not in the photo grid. Is it possible to do this?
That is the way photo page works, photo grid thumbnails can not be hyperlinked because they are rendered by javascript widget. But you can put a full URL in thumbnail caption and it is hyperlink as discussed in this thread:
http://discussions.apple.com/thread.jspa?messageID=7358077�
However, when you click on the thumbnail to go to detail view, the caption is no longer a hyperlink; because caption in detail view is rendered by javascript widget.
That said, what you like to do is very possible but you need to have very good understanding how photo page widgets work and a lot of javascript. Here is one of my example:
http://widgets.cyclosaurus.com/Lytebox/Photos.html
All thumbnail image links in the page had been changed using javascript.
Send them a feedback: http://www.apple.com/feedback/iweb.html -
How to make a 2-column output in sapscript form
Hello Abap Professionals!
I have a sample standard text that has this content and layout:
Part I : This is an example only.This is an example only.This is an example only.
This is an example only.This is an example only.This is an example only.This is
an example only.This is an example only.This is an example only.This is an example
only.This is an example only.This is an example only.This is an example only.
Part II : This is an example only.This is an example only.This is an example only.
This is an example only.This is an example only.This is an example only.This is
an example only.This is an example only.This is an example only.This is an example
only.This is an example only.This is an example only.This is an example only.
The problem is....
HOW can I make it look like this in the MAIN Window of my Sapscript in Form (SE71)
see the picture below:
Link: [http://img122.imageshack.us/img122/9416/69640352uy2.jpg]
-Don't mind the font.. just the format. I want it to be in 2-column and I have to include the standard text in the Main Window of the Form.
Any help is highly appreciated,
THANKS in ADVANCE.Take two page windows of type MAIN in your page, arrange the page windows as two pages, call the text element from your driver program and write this way in you SAP script...
/E <text element>
/ Part I : This is an example only.This is an example only.This is an example only. This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.
/: NEW-WINDOW
/ Part II : This is an example only.This is an example only.This is an example only. This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.
P.S.: let the size of the main window be a bit bigger than it can accomodate the text. The command NEW-WINDOW lets the latter text to be written in the next MAIN window if no variable window is specified.
<REMOVED BY MODERATOR>
I.
Edited by: Alvaro Tejada Galindo on Jun 25, 2008 3:37 PM
Maybe you are looking for
-
MS Visual Studio 2005 + Oracle 10g = Cannot connect to ODBC error: 12154
Hi there! I've read so many threads of same kind of problems but always some key elements seems to be missing so I cannot solve my problem with the solutions in those threads. So, I'll do my own. Our environment is... We have Oracle 8 database with a
-
How can I use excel and word on the IPAD2
How can I use excel and word documents on my Ipad 2
-
i downloaded firefox update, had nothing but troubles since, computer crashing when i try to open, or cursor lag for a long time ie. i try to move to do something it has to think about for 30 seconds to having to pushing reset to get anthing hapening
-
Hi,can anyone help me out, i have three pcs in different rooms, and i have a Cisco work group router, and one of the rooms got an internet connection from a cable modem, and i need to conect the other two rooms so they could access the internet, how
-
Activities missing in worklist in web time sheet (ESS)
We have a problem concerning activity elements which are present in the worklist in CAT2, but are partially missing in the worklist in the web time sheet. We are using SAP enhancements CATS0001, CATS0009 og CATS0010. I have looked into the project st