Visible Columns of dataGrid
Hi,
How to calculate width of the datagrid columns which are visible and invisible.
I have a datagrid which has visibe and invisible column and have given fixed width 80.
When the visbile columns are displayed on the screen , the width is seen neven since invisivle columns are also incuded in the layout.
Is there anything like IncludeInLayout for datagricolumns in flex?
Thanks and Regards,
Shweta
Adobe Newsbot hopes that the following resources helps you.
NewsBot is experimental and any feedback (reply to this post) on
its utility will be appreciated:
mx.controls.AdvancedDataGrid (Flex 3):
... DataGrid control to add data visualization features to
your Adobe Flex application. .... [read-only] Returns the x
position of the mouse, in the content
Link:
http://livedocs.adobe.com/flex/3/langref/mx/controls/AdvancedDataGrid.html
[#SDK-14808] Editable [Advanced]DataGrid incorreclty enters
edit:
Editable [Advanced]DataGrid incorreclty enters edit mode when
focus ... Even if the right-mouse click was on a different cell,
the previous cell will begin
Link:
http://bugs.adobe.com/jira/browse/SDK-14808
Flex 3 - Image control:
For example, place your mouse pointer over the image in this
example to enlarge .... When a user changes the currently selected
item in the data grid, Flex
Link:
http://livedocs.adobe.com/flex/3/html/controls_16.html
Flex 3:Feature Introductions: Advanced DataGrid - Adobe Labs:
Jun 11, 2007 ... Flex 3:Feature Introductions: Advanced
DataGrid. From Adobe Labs ... on the individual cells to select
them via the mouse instead.
Link:
http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Advanced_DataGrid
Flex Fun - Advanced DataGrid Topics:
Flex Fun - Advanced DataGrid Topics. This tutorial is going
to build on an earlier ..... I will touch on just a small number of
them in this tutorial.
Link:
http://blog.paranoidferret.com/index.php/2007/08/29/flex-fun-advanced-datagrid-topics/
Disclaimer: This response is generated automatically by the
Adobe NewsBot based on Adobe
Community
Engine.
Similar Messages
-
How to hide blank columns in datagrid?
Hi,
I have a datagrid nicely populated with data.
But I have some colums which are blank (the columns have a
Header but the rest of its rows are blank).
I want to hide these columns so that users can't see them.
Note that the blank columns are not fixed. Sometimes it can
be that a column is blank but at other times it can be filled.
So I cannot use... "<... visible=false>
I need to loop thru the columns and then hide the blank
columns.
Anyone has an idea how to code for this loop.
ThxWell..from what i know, the datagrid supports the syntax to
allow for you to specify the columns explicitly through the
DataGridColumn. Done like this
<mx:datagrid>
<mx:columns>
<mxdatagridcolumn datafield = "Column 1 name" ..>
<mxdatagridcolumn datafield = "" ..>
<mxdatagridcolumn datafield = "" ..>
</mx:columns>
</mx:datagrid>
why dont you specify the columns you want using this. that
way, if there is no data in the colums, that column just wont show.
Hope i am understanding you right when you say hide blank
columns -
How to validate a whole column of DataGrid
I want to validate a whole column of DataGrid using
Validator.
How to do that?Thanks. It works! Prima!
It's a little bit difficult for me to write and understand the English terms correctly, cause I am German.
I did not recognize, that I had to go to the Library Module!
Here I repeat Rikk's way in German:
Im Bibliothek-Modul
Rasteransicht
Bilder selektieren
Im Menufeld Ad-hoc Entwicklung:
Freistellungsfaktor einstellen: 16:9 -
E-recruitment - Table does not contain visible columns
Guys,
I am currently working on the e-recruitment. I had came across this
Table does not contain visible columns
in the all the tab in Application Entry, Preselection, Selection, Offer face... Is it a configuration or is it a portal error?Hello,
This is a simple configuration issue I guess if you are using EhP4. There are no table entries for the respective processes in table V_T77RCF_CDCYLST. Just go and configure for each process in User Interfaces > Administrator and Recruiter > Settings for Candidate Selection > Assign Columns for Candidate Shortlists the columns you would like to be displayed in each process based on the business requirement.
Regards, -
Hi,
I'm trying to build an applet to edit mysql tables. I used a Jtable inside a JscrollPane but I would like to display only 3 or 4 columns at a time (I can have up to 40 !) and then let the user scrolls to the others with the horizontal scrollbar.
My problem is that all the columns are always displayed (width reduced to fit) in the scrollpane. How can I reduce the number of visible columns ?
Thanks,
Olivier
Edited by: user1721669 on 16 sept. 2012 11:06Random guess. Don't set any size (especially, preferredSize) on the JTable if it's within a JSCrollPane.
For better help (anything less random), please post an SSCCE (http://sscce.org).
Best regards,
J. -
greets, long time without doubts
my question is:
i have 2 DataGrids the first one has one fixed column , the second one has 4 fixed columns
i use a button to convert the rows of the DataGrid 1 in columns, then if i delete a row in the DataGrid 1 it must delete the corresponding column in the DataGrid 2
how i can delete the columns of DataGrid 2 in that way???If you want to delete the content of the column, you must work on the DataGrid's dataProvider.
If you want to remove the column, you can use :
var columnsCollection :ArrayCollection = new ArrayCollection( yourDataGrid.columns );
columnsCollection.removeItemAt( columnsCollection.getItemIndex( youDataGridColumn ) );
yourDataGrid.columns = columnsCollection.toArray(); -
Alv doesn't contain any visible columns
hi.
i am with an ALV in web dynpro and when i execute the programme the alv say to me that there aren't any visible columns.
I want it empty but with the columns
thanksHi Jose,
Did u map the output context and the ALV Data node in the interface controller ?
Ranganathan. -
How to hide column of DataGrid
I am making a web part in which I am using System.Web.UI.WebControls.DataGrid control.
It's AutoGenerateColumns property is set to TRUE.
I am trying to hide a column at run time. I have written the following code on this controls ItemCreated event but it only works if I e.Item.Cells[0] and it doesn't work for any other value for e.g. e.Item.Cells[1] and e.Item.Cells[6].
There are 9 columns in my DataGrid control.
Code
protected void grd1_ItemCreated(object sender, DataGridItemEventArgs e)
{ e.Item.Cells[0].Visible = false; //works fine
e.Item.Cells[1].Visible = false; //gives error e.Item.Cells[2].Visible = false; //gives error
Error
Specified argument was out of the range of valid values.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
How to hide a particular column?Hi Frank,
You can try something similar to the below in 'RowCreated' event Instead
protected void gridView_RowCreated(object sender, GridViewRowEventArgs e)
e.Row.Cells[1].visible =false;
OR I would say hiding column is not something that is to be done at row level, so you can hide columns outside any of the grid view event after binding.
e.g.
gridview1.columns[1].visible=false;
I am using DataGrid control in which there is no RowCreated event.
I have tried second approach but it also doesn't work. -
Rearrange column in Datagrid in Flex
Hi, i am retrieving data from database using arraycollection to fill in the datagrid with dynamic column header, and the columns are arranger alphabatically depend on the column header title, for my case i want to rearrange the columns depend on specific order, i created another function to rearrange the columns, and its working fine for the first page load but when i change the dropdown entries i get all the columns rearranged but without data only the first column contain data which is [EngName]
the following is my code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" layout="vertical" width="70%" backgroundAlpha="1" backgroundColor="white" xmlns:local="*">
<mx:WebService id="wsExec" wsdl="http://wfsvc-test/ExecSummaryReport.asmx?WSDL" useProxy="false" showBusyCursor="true">
<mx:operation name="GetExecSummary2" result="handleExecSummaryResult(event)" fault="handleFault(event)"/>
</mx:WebService>
<mx:WebService id="wsAdmin" wsdl="http://wfsvc-test/Admin.asmx?wsdl" useProxy="false" showBusyCursor="true">
<mx:operation name="SelectDirectorates" result="handleDir(event)" fault="handleFault(event)"/>
<mx:operation name="SelectSections" result="handleSec(event)" fault="handleFault(event)"/>
</mx:WebService>
<mx:Script>
<![CDATA[
import mx.controls.dataGridClasses.DataGridColumn;
import mx.messaging.AbstractConsumer;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
[Bindable]
private var gridData:ArrayCollection;
[Bindable]
private var dirData:ArrayCollection;
[Bindable]
private var secData:ArrayCollection;
private function init():void
wsAdmin.SelectDirectorates();
var today:Date = new Date();
today.setDate(1);
dtFrom.selectedDate =today;
dtTo.selectedDate = new Date();
private function handleExecSummaryResult(event:ResultEvent):void
for each(var objTbl:Object in event.result.Tables)
gridData = objTbl.Rows as ArrayCollection;
dg.dataProvider = gridData;
var columns:Array = dg.columns.sort(orderColumns);
dg.columns = columns;
dg.visible = true;
private function orderColumns(a:DataGridColumn, b:DataGridColumn):int{
if (a.headerText == "EngName" || b.headerText == "EngName"){
return -1;
}else if (a.headerText < b.headerText){
return -1;
}else if (a.headerText > b.headerText){
return 1;
} else {
return 0;
private function handleDir(event:ResultEvent):void
var dirArr:Array = new Array();
var defaultItem:Object = new Object();
defaultItem['data'] = '00';
defaultItem['label'] = '-- Select Directorate --';
dirArr.push(defaultItem);
for each(var objTbl:Object in event.result.Tables)
for each(var objRow:Object in objTbl.Rows)
var obj:Object = new Object();
obj['label'] = objRow['EngDir'];
obj['data'] = objRow['DirCode'];
dirArr.push(obj);
dirData = new ArrayCollection(dirArr);
private function handleSec(event:ResultEvent):void
var secArr:Array = new Array();
var defaultItem:Object = new Object();
defaultItem['data'] = '00';
defaultItem['label'] = '-- Select Section --';
secArr.push(defaultItem);
for each(var objTbl:Object in event.result.Tables)
for each(var objRow:Object in objTbl.Rows)
var obj:Object = new Object();
obj['label'] = objRow['EngSec'];
obj['data'] = objRow['SecCode'];
secArr.push(obj);
secData = new ArrayCollection(secArr);
private function handleFault(event:FaultEvent):void
Alert.show(event+'');
]]>
</mx:Script>
<mx:Label width="100%" textAlign="center" text="Executive Summary Report" fontSize="24"/>
<mx:HBox width="100%">
<mx:HBox width="100%" horizontalAlign="right" verticalAlign="middle" >
</mx:HBox>
</mx:HBox>
<mx:HBox width="100%">
<mx:Label text="Search: From"/>
<mx:DateField id="dtFrom" name="n1" formatString="DD/MM/YYYY"/>
<mx:Label text=" To "/>
<mx:DateField id="dtTo" name="n1" formatString="DD/MM/YYYY"/>
<mx:Label text=" Directorate:"/>
<mx:ComboBox id="ddlDir" dataProvider="{dirData}" width="170">
<mx:change>
<![CDATA[
wsAdmin.SelectSections(ddlDir.selectedItem['data'].toString());
]]>
</mx:change>
</mx:ComboBox>
<mx:Label text=" Section:"/>
<mx:ComboBox id="ddlSec" dataProvider="{secData}" width="170"/>
<mx:Label text="Status: "/>
<mx:CheckBox id="chkCompleted" label="Completed" selected="true">
<mx:click>
<![CDATA[
chkCompleted.selected = true;
chkInProgress.selected = false;
]]>
</mx:click>
</mx:CheckBox>
<mx:CheckBox id="chkInProgress" label="In Progress">
<mx:click>
<![CDATA[
chkCompleted.selected = false;
chkInProgress.selected = true;
]]>
</mx:click>
</mx:CheckBox>
<mx:Button label="Show Report">
<mx:click>
<![CDATA[
if(ddlDir.selectedIndex<1 || ddlSec.selectedIndex<1)
Alert.show('Please select a Directorate & Section');
}else
wsExec.GetExecSummary2(ddlDir.selectedItem['data'],ddlSec.selectedItem['data'],chkInProgr ess.selected,dtFrom.selectedDate,dtTo.selectedDate);
]]>
</mx:click>
</mx:Button>
</mx:HBox>
<mx:DataGrid id="dg" width="100%" rowCount="12" visible="false"/>
</mx:Application>I'm suspicous about how it can return -1 for both A.headerText and
b.headerText == "EngName" -
Adding Dynamic column to datagrid at the begining of datagrid
Hello friends,
There is one datagrid which is static. and i m adding one dynamic column. it is get added to the end of the static datagrid
but I want to add dynamic column at the begning of the datagrid can anybody help me on this.
Thanking you,
Regards,
gajananThanks to everybody.
finally i got the things to work using following code.
private function SwapGridColumns (DG:DataGrid, Col1:Number, Col2:Number):void
var i:Number; // Counter
var DP:ArrayCollection =ArrayCollection( DG.dataProvider); //DataProvider
var Widths:Array = new Array (); // the widths of the columns
var Columns:Array = new Array (); // the column names
var Visibility:Array = new Array (); // visibility of columns
var HRenderer:Array = new Array (); // Header Renderer of columns
var IRenderer:Array = new Array();
var datastore:Array = new Array ();
var Editable:Array = new Array();
var DFields:Array=new Array();
var Sortable:Array = new Array();
for (i = 0; i<DG.columns.length; i++)
if (i == Col1)
Columns.push(DG.columns[Col2].headerText);
Widths.push(DG.columns[Col2].width);
Visibility.push(DG.columns[Col2].visible);
HRenderer.push(DG.columns[Col2].headerRenderer);
IRenderer.push(DG.columns[Col2].itemRenderer);
Editable.push(DG.columns[Col2].editable);
Sortable.push(DG.columns[Col2].sortable);
DFields.push(DG.columns[Col2].dataField);
else if (i == Col2)
Columns.push(DG.columns[Col1].headerText);
Widths.push(DG.columns[Col1].width);
Visibility.push(DG.columns[Col1].visible);
HRenderer.push(DG.columns[Col1].headerRenderer);
IRenderer.push(DG.columns[Col1].itemRenderer);
Editable.push(DG.columns[Col1].editable);
Sortable.push(DG.columns[Col1].sortable);
DFields.push(DG.columns[Col1].dataField);
else
Columns.push(DG.columns[i].headerText);
Widths.push(DG.columns[i].width);
HRenderer.push(DG.columns[i].headerRenderer);
IRenderer.push(DG.columns[i].itemRenderer);
Editable.push(DG.columns[i].editable);
Sortable.push(DG.columns[i].sortable);
DFields.push(DG.columns[i].dataField);
// Reset the widths
var col:Array
for (i = 0; i < Columns.length; i++)
var DGC:DataGridColumn = new DataGridColumn(Columns[i]);
DGC.width = Widths[i];
DGC.visible = Visibility[i];
DGC.headerRenderer = HRenderer[i];
DGC.itemRenderer = IRenderer[i];
DGC.dataField=DFields[i];
DGC.sortable=Sortable[i];
DGC.editable=Editable[i];
datastore.push(DGC);
DG.columns=datastore;
// Load DP
DG.dataProvider = DP;
Regards,
gajanan -
Filter issues with hidden/visible columns on a table
OK, 1st post to this forum:
This is based on:
http://labs.adobe.com/technologies/spry/samples/data_region/SpryPagedViewSample.html
I have a contact list that has contact info on it (office
phone, home phone, cell phone, etc). There are several hundred
entries in the .xml file. As a default, I am putting the contacts
in a table that has the office phone and email address visible, and
the other info hidden. I have a "ShowDetail" checkbox that will
allow the hidden columns to be visible and vice versa by using the
addClassName and removeClassName.
The issue I have, is that when you start typing in an contact
name when the checkbox is checked, the table flashes the correct
info up with the columns visible, but then the HTML is rendered and
the Hidden class is reassigned to the columns.
Is there anyway to run the javascript function that toggles
the class after the HTML is rendered based on the checked status of
the checkbox? Thanks for any help!Thanks for the reponse. However here is the syntax I need to edit
SELECT u.user# as "UID",
lower(u.name) as owner,
lower(t.name) as table_name,
col.col# as column_id,
lower(col.name) as column_name,
decode(col.type#,
1, 'varchar2',
2, decode(col.scale,
null, decode(col.precision#, null, 'number', 'float'),
'number'),
8, 'long',
9, 'varchar',
12, 'date',
23, 'raw',
24, 'long raw',
69, 'rowid',
96,'char',
105, 'mlslabel',
106, 'mlslabel',
'undefined') as data_type, /* these decodes come from the view */
/* definition for DBA_TAB_COLUMNS */
/* in CATALOG.SQL for version 7.3 */
/* the next two decodes are derived from the actual queries performed by Storage */
/* when Manager retrieving column information. */
decode(nvl(col.precision#, 0),
0, col.length,
nvl(col.precision#,0)) as data_length,
to_number(decode(nvl(col.precision#, 0),
0, null,
decode(col.type#,
2, nvl(col.scale,-127/*MAXSB1MINAL*/),
0) ) ) as scale,
decode(col.null$, 1, 'n', null) as nulls,
'y' as in_primary_key
FROM sys.col$ col,
sys.obj$ t,
sys.user$ u
WHERE u.user# = t.owner# /* user$ will be the driving table because no index on user# */
AND t.obj# = col.obj#
AND u.name = 'POWERSELLER' /* We only care about PowerSeller tables/columns; */
AND t.type# in (2, 4) /* Tables and views only */
AND EXISTS (SELECT 1
FROM sys.ccol$ ns_ccol,
sys.cdef$ ns_cdef,
sys.obj$ ns_t,
sys.user$ ns_u
WHERE ns_u.user# = ns_t.owner#
AND ns_t.obj# = ns_cdef.obj#
AND ns_cdef.con# = ns_ccol.con#
AND ns_u.name = 'POWERSELLER'
AND ns_cdef.type# = 2 /* primary key constraint */
AND ns_cdef.enabled is not null
AND ns_ccol.obj# = t.obj# /* using ns_ccol instead of ns_t */
/* does 70% as many logical reads */
AND ns_ccol.col# = col.col#
) -
Hi,
I have a datagrid with a dataprovider.
And,I am trying to set the number of columns and column
headerText values of that Datagrid based on the values from an
array.
Any suggestions on how we can do this or does anybody has
already worked on this?
Those suggestions would of very great help to me.Assume that your colum information is contained in the Array
columnInfo which is not your dataProvider. Assume "dg" is the ID of
your DataGrid control.
var columns:Array = new Array(); // this will hold the
DataGridColumns
for(var c:int=0; c < columnInfo.length; c++) {
var col:DataGridColumn = new DataGridColumn();
col.headerText = columnInfo[c].headerText; // or whatever
holds the header text
col.dataField = columnInfo[c].dataField; // or what holds the
name of the field in the dataProvider
columns.push(col);
dg.columns = columns; // columns now added to the
DataGrid. -
Click event for single column in DataGrid
I can add an event listener to a DataGrid of type
ListEvent.ITEM_CLICK, which is triggered when the user clicks any
part of an entire row in a DataGrid. I want to trigger a click
event for just one column. I only want to run a function when the
user clicks in just the first column of the DataGrid, and not run
trigger the event if they click in any other column. Any help would
be much appreciated.Accessing the event.target returns the entire DataGrid, not
the DataGridColum. Any way to get just the DataGrid column? -
I have a DataGrid that shows product information. And one
column is a 'Price' and the client wants JUST that 'Price' column
to be aligned to the right.
Is this possible? if yes, then any example?
Thanks,You can also set the lockedColumnCount property in the mx:DataGrid as well:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:DataGrid id="dg3" lockedColumnCount="1" horizontalScrollPolicy="auto" width="300">
<mx:dataProvider>
<mx:ArrayCollection>
<mx:Object c1="1" c2="one" c3="ONE" c4="OnE" c5="The quick brown" />
<mx:Object c1="2" c2="two" c3="TWO" c4="tWo" c5="Fox jumps over" />
<mx:Object c1="3" c2="three" c3="THREE" c4="ThReE" c5="The lazy dog" />
</mx:ArrayCollection>
</mx:dataProvider>
</mx:DataGrid>
</mx:Application>
Peter -
ResourceGantt Chart - showing the task column in datagrid or tooltip, help?
Hi all,
I managed to create a resource gantt chart, but now I would like to display the task in both datagrid, i.e. the left panel with columns and in the tooltip. How can I force the view of this task name or project? At the moment, only the resource name, start date, end date, % of completion show up. Any help please?
thanks
Edited by: mzeid on Mar 20, 2012 1:31 PMLuca,
I think this is what you want:
The expressions are as follows:
Scores Table
Medi Column: =AVERAGE(B2:G2)
Passing Column: =IF(H≥6, H, "")
Failing Column: =IF(H≤6, H, "")
Pie Chart Data Table:
Pass Column: =COUNTIF(Scores::H, ">=6")
Fail Column: =COUNTIF(Scores::H, "<6")
The Bar Chart is a 2D Stacked Bar Chart
Hope this is what you were looking for. Glad to explain further if necessary.
Jerry
Maybe you are looking for
-
Black screen after updating to windows 8.1
After updating to windows 8.1 on my HP Spectre ONE 23-e010 All-in-One Desktop PC my PC wont turn on properly all i get is beep and a black screen ... I have to press and hold power on for almost 15-20 mins for my PC to actually turn on and by reading
-
need help with how to reset bios and admin password to reformat hard drive in 8440p elitebook? removal of cmos, resetting laptop, using cccleaner, windows password recovery and hiren's was noneffective, any help is appreciated. thanks
-
why java is called java2 and another thing that i would like to know is why it was renamed to java from its previous name OAK Thanx Manish
-
Tricky cRIO web services deployment
Is there a way to build and deploy web services programmatically as a plug-in to a remote sbRIO? We have a working plug-in mechanism that uses source distributions for the plug-ins. It's not clear to me if web services can be included in a source
-
Hi Im having trouble exporting a 2.35 movie to quicktime. In my canvass it is displayed letterboxed. I cant seem to get any of the options to work properly. Is there something I should do (like change frame size) BEFORE exporting, so as to remove the