Localization of headertext in a datagrid
Hi All,
I'm trying to get the headertext of a datagrid to display in the correct language after i've changed the language.
Every other label updates except the headertext. How can i force the headertext to update?
<mx:Canvas width="100%" height="100%">
<mx:DataGrid id="userList" left="10" right="10" top="10" dataProvider="{usersAC}" itemClick="itemSelected(event)">
<mx:columns>
<mx:DataGridColumn dataField="userName" headerText="{resourceManager.getString('Messages', 'title.loginname')}"/>
<mx:DataGridColumn dataField="firstName" headerText="{resourceManager.getString('Messages', 'title.firstname')}"/>
<mx:DataGridColumn dataField="lastName" headerText="{resourceManager.getString('Messages', 'title.lastname')}"/>
</mx:columns>
</mx:DataGrid>
</mx:Canvas>
thanks
Call invalidate properties on the grid
Similar Messages
-
Flex evaluate string for dynamic datagrid headerText
Hello: I m new to Flex and am creating headerText for a datagrid (dgTop250). How do I get the variable headerStr to evaluate correctly in the last line of the function? With the code below I get the entire string as the column header in the datagrid, not the evaluated expression that I need. Variable headerStr is evaluating correctly, I just need it to get evaluated in the headerText statement.. I know the eval function isn't available in AS3.
public function get250(event:ResultEvent):void {
(var i:int = 0; i <= dgTop250.columnCount; i++) {
var colName:String=dgTop250.columns[i].dataField;
var headerStr:String="top250.lastResult.IMS001HQ2.SGM.getItemAt(i)."+colName+".label";
(dgTop250.columns[i] as DataGridColumn).headerText = headerStr;
As an example, this is what I'm getting as the header: top250.lastResult.IMS001HQ2.SGM.getItemAt(i).STOCK.label
This is what I need: Stock Number
"Stock Number" is the label for STOCK.
thanksI would think you need to remove the quotes to get it evaluated properly
Change this ..
var headerStr:String="top250.lastResult.IMS001HQ2.SGM.getItemAt(i)."+colName+".label";
to
var headerStr:String=top250.lastResult.IMS001HQ2.SGM.getItemAt(i).[colName].label;
maybe ??? -
Dynamic names for Datagrid column headers?
How can I put data from my ws into the headerText for a
DataGrid?
I was hoping to find a defined property something like
"HeaderTextFunction" built into the DataGrid but I didn't see
anything like that. Do you have to use the Advanced DataGrid for
something like this?
I also can't make out whether I should import the WS value
into an XMLList or just parse it directly into a function, or what
the syntax of this should be vis a vis e4x etc."Developer504" <[email protected]> wrote in
message
news:gfc8pi$17p$[email protected]..
>
quote:
Originally posted by:
thebouv
> First element of the header list returned by
myheaders..header
>
> Like I said, it'll depend on how your XML is set up the
exact syntax of
> the
> e4x you'll use. If you have a more specific example I
could help you
> further.
> If not, good luck!
>
>
> This is the structure of my XML file:
>
> <bankCodes>
> <banks bank1="Bank A" bank2="Bank B" bank3="Bank C"
bank4="Bank D"
> bank5="Bank E" bank6="Bank F"/>
> </bankCodes>
>
> There is only one record.
>
> So what I wanted to do was put a different one of these
on each column
> header.
yourXML.attributes(0), yourXML.attributes(1), etc. -
Two Datagrids, Multiple Provider Issue
What Im trying to do is when when DataGrid1 has an item
selected it fills out a series of text boxes and another DataGrid.
All the data is in XML, so when I click on one element, to access
the proper element i go data_grid1.selectedItem.state
But for the second DataGrid the data that goes into there is:
<people>
<person email=...>
</people>
and the dataPovider i use is data_grid1.selectedItem.people,
I get
Multiple initializers for property 'dataProvider'. (note:
'dataProvider' is the default property of
'mx.controls.DataGrid')
In
this
example I tried doing what he did and his examples compile with
no problems but I dont know how to do that for myself, what am I
doing wrong?
<?xml version="1.0" encoding="UTF-8"?>
<mx:Application xmlns:flexlib="
http://code.google.com/p/flexlib/"
xmlns="*" xmlns:mx="
http://www.adobe.com/2006/mxml"
height="100%" width="100%" applicationComplete="getXML()">
<mx:Script>
<![CDATA[
import mx.rpc.http.HTTPService;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
public function getXML():void
var serv:HTTPService = new HTTPService();
serv.contentType="application/xml";
serv.url="contacts.xml";
//serv.useProxy=false;
serv.resultFormat="xml";
serv.addEventListener("result",gotResult);
serv.addEventListener("fault",gotFault);
serv.send();
private function gotFault(event:FaultEvent):void
Alert.show(event.fault.message);
[Bindable]
var myXML:XML;
private function gotResult(event:ResultEvent):void
myXML = new XML(event.result);
//avListing.dataProvider = myXML.contact;
public function searchAndReplace(holder:String):String
var searchfor:String="\t";
var replacement:String="";
var temparray:Array= holder.split(searchfor);
var holder:String = temparray.join(replacement);
searchfor="\r";
temparray= holder.split(searchfor);
holder = temparray.join(replacement);
return (holder);
]]>
</mx:Script>
<mx:Binding source="myXML.contact" destination
="avListing.dataProvider"/>
<mx:Binding source="avListing.selectedItem.people as XML"
destination="grid_contacts.dataProvider"/>
<mx:HBox width="100%" height="100%">
<mx:DataGrid id="avListing" width="25%" height="100%">
<mx:columns>
<mx:DataGridColumn dataField="state"
headerText="State"/>
</mx:columns>
</mx:DataGrid>
<mx:TextArea id="box_State"
text="{avListing.selectedItem.state}" width="100" height="20"/>
<mx:TextArea id="box_Address"
text="{searchAndReplace(avListing.selectedItem.address)}"
width="250" height="100"/>
<mx:DataGrid id="grid_contacts" width="300"
height="100">
<mx:DataGridColumn dataField="person"
headerText="Person"/>
</mx:DataGrid>
</mx:HBox>
</mx:Application>I had done that before, even though the ids are different I
get that error. The reason I was using the Binding was that I was
following this example:
http://blog.paranoidferret.com/index.php/2007/07/27/flex-friday-feature-datagrid-component /
They have two datagrids in there yet it works. Now is this
happening just because I am using Flex 2.01 SDK instead of using
the builder? I've noticed that there is a difference between the
two when it comes to getting things to work. -
Change ItemRendere Properties in DATAGRID
Hi,
I created a DATAGRID with some Itemrenderers in it.
I am trying to change the properties of itemrendere on
rollOver of DATAGRID.
code:
Code:
<mx:DataGrid id="dataGrid" dataProvider="{targetProfiles}"
itemRollOver="onItemRollOver(event)"
itemRollOut="hideMenu(event)">
<mx:columns>
<mx:DataGridColumn id="nameCol" dataField="Name"
headerText="Name"
itemRenderer="components.itemrenderer.labelName">
</mx:DataGridColumn>
<mx:DataGridColumn id="description"
dataField="Description"
headerText="Description" />
</mx:DataGrid>
code for ITem Renderer
Code:
<?xml version="1.0"?>
<!-- dpcontrols/adg/myComponents/ChartRenderer.mxml -->
<mx:VBox height="65" width="100%" xmlns:mx="
http://www.adobe.com/2006/mxml"
verticalAlign="middle">
<mx:HBox paddingLeft="20" paddingTop="5"
verticalAlign="bottom">
<mx:Label text="{data.Name}"/>
</mx:HBox>
<mx:HBox horizontalAlign="right"
verticalAlign="bottom">
<mx:Button id="options" text="Options"
visible="false"/>
</mx:HBox>
</mx:VBox>
Now what am trying to do is.. On rollOver and rollOut of
particular row in datagrid i want to make that Button in Itemrender
visible true/false(on selected row).
Any idea how to identify the itemRenderer on rollOver of
grid????
Thanks & Regards
PratapHi,
Try handling rollOver event of the item renderer instead of listening on the DataGrid.
Hope this helps. -
DataTipFunction for datagrid not working
I have a datagrid with two columns. I need a datatip
displayed for the first column. The code I have is:
<mx:DataGrid dataProvider="{MyDP}" id="MyDataGrid_dg" >
<mx:columns>
<mx:DataGridColumn showDataTips="true"
dataTipFunction="gridDataTip" dataField="label"
headerText="Test"/>
<mx:DataGridColumn dataField="label"
headerText="Test"/>
</mx:DataGrid>
and dataTipFunction is a function in the script block. Any
ideas of what else I need?This is my function... I never see the trace statement
public function gridDataTip (item:Object) : String {
trace("gridDataTip");
return "test";
} -
How to set the width of DataGridColumn dynamically?
What I want to do is, load data from a text file and put into a DataGrid component, the fields of ech record in the text have fixed length, and are seperated by a space, like this:
personal.txt
50 Uvwxyz Male 123456789
60 Hijklmn Male 67890123456789
30 Abcdefg Male 123456789012345
40 Opqrst Female 987654321012345678
the configuration file is column.xml:
<dgcolumn>
<personal>
<len>20</len>
<title>Name</title>
</personal>
<personal>
<len>3</len>
<title>Age</title>
</personal>
<personal>
<len>6</len>
<title>Sex</title>
</personal>
<personal>
<len>20</len>
<title>IdNumber</title>
</personal>
</dgcolumn>
First I load the column.xml into an arrColumn, then read the personal.txt and seperate the record by the width( "len" in the xml file ), and put the seperated fields into another arrField, set the arrayFld as the dataProvider of a DataGrid, thus, the title can be showed as the headerText of the DataGrid and the data can be loaded correctly.
private function handleComplete( event:Event ):void
var arrField:Array = new Array();
var arrFile:Array = loader.data.split(/\n/);
for( var i:int = 0; i < arrColumn.length; i ++ )
arrField[i] = convIcom( arrFile[i] );
adgFile.dataProvider = arrField;
trace( "The data has successfully loaded" );
private function convIcom( strRecord:String ):Object
var key:String = null;
var dataField:String = null;
var offset:int = 0;
var obj:Object = new Object();
if( strRecord.length > 0 )
for( var i:int = 0; i < arrColumn.length; i ++ )
dataField = strRecord.substr( offset, arrColumn[i].len );
key = arrColumn[i].title;
obj[key] = dataField;
offset += arrColumn[i].len + 1;
return obj;
<mx:DataGrid x="10" y="100" width="400" id="dgFile" />
The problem is, the width of the DataGridColumn is average, how to set the column width by the length of each field? I can calculate the rate of each field ( field / fields ), but I don't know how to change the property of the DataGridColumn.width.
Thanks for helping.In the above post, I pasted an old version of personal.txt, so I paste it again:
personal.txt
Uvwxyz 50 Male 123456789
Hijklmn 60 Male 67890123456789
Opqrst 40 Female 987654321012345678
Abcdefg 30 Male 123456789012345
And I have another question, when the data is loaded into the DataGrid, the fields of each record are ordered in alphabetical order ( the "Age" column will appear firstly, then "IdNumber", "Name", "Sex" ), not as the order in column.xml, how to make it keep the sequence of the xml file?
Thanks again. -
Hide the Header Text of a Data Grid
I would be appreciative to anyone that could shed light on
how to hide the HeaderText of a Datagrid. Basically, i want the
data without the row header.
thanks,
-erikThat's perfect, setting the HeaderHeight to '0' worked!
thanks for your help.
btw, 'dimival'... i set the headerText to an empty string
but there was still a small space where the header was so the
header wasn't completely gone.
-erik -
How to fix a DataGrid headercolumn's headerText causing sizing problems
Hello,
I have a datagrid with filter textboxes underneath the header columns.
My problem is that some of the headerText is rather large (in 2 of my columns), and causes it to wrap and stretch the header's height, which ultimately causes the columns to match up strangely and not in uniform.
Here is a screenshot of the problem:
http://img685.imageshack.us/img685/2283/gridcolumnsizeproblem.png
How can I make all column headings uniform in size, with my filtering text boxes? I do not see a height property. I have tried to add extra spaces in the smaller column headings but that does nothing as I think FLEX parses that out. Can I specifically size these so they match the longer ones?
Keep in mind, this DataGrid uses a custom renderer.
Here is my grid definition/MXML:
<dataGridFilters:FilterDatagrid id="dg" width="100%" height="100%" rowCount="5" dataProvider="{deviceDataColl}" click="dg_clickHandler(event)" >
<dataGridFilters:columns>
<dataGridFilters:DataGridFilterColumn dataField="name" headerText="Name" width="150"/>
<!--<dataGridFilters:DataGridFilterColumn dataField="deviceType" headerText="Device Type" textAlign="right"/>-->
<dataGridFilters:DataGridFilterColumn dataField="tHeat" headerText="Heat Point" width="75" textAlign="right"/>
<dataGridFilters:DataGridFilterColumn dataField="tCool" headerText="Cool Point" width="75" textAlign="right"/>
<dataGridFilters:DataGridFilterColumn dataField="tIndoor" headerText="Indoor Temp" width="80" textAlign="right"/>
<dataGridFilters:DataGridFilterColumn dataField="tOutdoor" headerText="Outdoor Temp" width="90" textAlign="right"/>
<dataGridFilters:DataGridFilterColumn dataField="insideHumidity" headerText="Indoor Humidity" width="100" textAlign="right"/>
<dataGridFilters:DataGridFilterColumn dataField="currentFState" headerText="Fan State" width="75" textAlign="right"/>
<dataGridFilters:DataGridFilterColumn dataField="currentFMode" headerText="Fan Mode" width="75" textAlign="right"/>
<dataGridFilters:DataGridFilterColumn dataField="currentTState" headerText="State" width="75" textAlign="right"/>
<dataGridFilters:DataGridFilterColumn dataField="currentTMode" headerText="Mode" width="75" textAlign="right"/>
<dataGridFilters:DataGridFilterColumn dataField="nextSchedCPTDate" headerWordWrap="false" headerText="Next Scheduled Control Point Transition Date" width="100" textAlign="right"/>
<!--<dataGridFilters:DataGridFilterColumn dataField="nextSchedCPTTime" headerText="Next Scheduled Control Point Transition Time" width="100" textAlign="right"/>-->
<dataGridFilters:DataGridFilterColumn dataField="nextSchedCPTTemp" headerWordWrap="false" headerText="Next Scheduled Control Point Transition Temp" width="100" textAlign="right"/>
<dataGridFilters:DataGridFilterColumn dataField="groupOne" headerText="Group 1" width="75" textAlign="right"/>
<dataGridFilters:DataGridFilterColumn dataField="groupTwo" headerText="Group 2" width="75" textAlign="right"/>
</dataGridFilters:columns>
</dataGridFilters:FilterDatagrid>
Any help is greatly appreciated!
Thank you,
DevtronRootsounds,
Here is my headerRenderer class:
package filters.header
import mx.controls.dataGridClasses.DataGridHeader;
import mx.core.mx_internal;
use namespace mx_internal;
public class DataGridFilterHeader extends DataGridHeader
public function DataGridFilterHeader()
super();
*re-position the sort icon
override protected function placeSortArrow():void
super.placeSortArrow();
if(sortArrow)
var hh:Number = cachedHeaderHeight;
sortArrow.y = (hh - sortArrow.measuredHeight - 8) > 0 ? 10: 0;
if(sortArrow.visible)
var n:int = headerItems.length;
for (var i:int = 0; i < n; i++)
if(visibleColumns[i].colNum == dataGrid.sortIndex)
headerItems[i].setActualSize(visibleColumns[i].width - sortArrow.measuredWidth + 5, headerItems[i].height);
Here is my dataGrid extender:
package filters
import filters.header.DataGridFilterHeader;
import flash.events.Event;
import mx.collections.ICollectionView;
import mx.controls.DataGrid;
import mx.controls.dataGridClasses.DataGridColumn;
import mx.core.mx_internal;
use namespace mx_internal;
public class FilterDatagrid extends DataGrid
public function FilterDatagrid()
super();
headerClass = DataGridFilterHeader;
addEventListener("filterEvent",onFilterChange);
override public function set dataProvider(value:Object):void
if(dataProvider)
resetFiltres();
super.dataProvider = value;
resetFiltres(filterFunction);
private function onFilterChange(event:Event):void
if(dataProvider)
(dataProvider as ICollectionView).refresh();
selectedIndex = 0;
private function resetFiltres(inFilterFunction:Function = null):void
if(dataProvider)
(dataProvider as ICollectionView).filterFunction = inFilterFunction;
(dataProvider as ICollectionView).refresh();
if(inFilterFunction == null)
var iLen:int= columnCount;
for(var i:int=0;i<iLen;i++)
var dgc:DataGridColumn = columns[i] as DataGridColumn;
if(dgc is DataGridFilterColumn)
DataGridFilterColumn(dgc).filterText = "";
selectedIndex = 0;
private function filterFunction(inObject:Object):Boolean
var iLen:int= columnCount;
for(var i:int=0;i<iLen;i++)
var dgc:DataGridColumn = columns[i] as DataGridColumn;
var dField:String = dgc.dataField;
if(dgc is DataGridFilterColumn == false)
continue;
var srchStr:String = DataGridFilterColumn(dgc).filterText;
if(srchStr == "")
continue;
var dataStr:String = dgc.itemToLabel(inObject);
var regex:RegExp = new RegExp("^"+srchStr, "i");
// if search string exists and
// does not match the data in the row
if(regex.exec(dataStr)==null)
return false;
return true;
If all this wrapper class stuff "Extends" the DataGrid, why wouldnt "headerHeight" be available as an attribute in my MXML/grid? When I try to set it explicitly in my dataGrid MXML, the compiler says "Cannot resolve attribute 'headerHeight'". I guess this doesnt really "extend" it? Im confused. -
How to set headerText in DataGrids through ActionScript
Any help or suggestions with this appreciated. I'm populating
a datagrid control in Flex 2 with dynamically data. The number of
columns and column names aren't fixed. The column data itself is
just raw values; no field names or other elements to identify what
the column header should be.
So when the data provider updates I need to be able to
tweak/add the headerText for the columns. How do I access this
setting through actionscript? I see many examples for defining
<mx.DataGridcolumn> and properties, but I can't really do it
that statically in advance; I don't know the column count or type
of columns until runtime.
Is it possible to access the headerText property with
something like dataGridID.column[0].DataGridColumn.headerText = ""?
This is what I'm looking for, the ability to iterate through and
set the headerText, but I haven't found the magic incantation.
Thanks!You can access the columns through the dataGrid.columns array
property.
Get a reference to that array from the DG into a variable,
modify the column elements as desired through that var, then
re-assign the var to the dg.columns property. So you are close:
var aColumns:Array = dataGridID.columns;
var dgc:DataGridColumn = aColumns[1];
dgc.headerText = "this is column 1";
dataGridID.columns = aColumns; //this step is required!
Tracy
Tracy -
Hey LightSwitch Team,
I have a LightSwitch Web Application, that is already localized (en-EN and de-DE). Now I have the requirement to localize the names of the User Permissions into the Administration Screen (this is built-in functionality). How can I achieved
this?
Another Task is to translate the Titles of the DataGrid into the Users Screen and Roles Screen (Administration Menu), because they are in english language, instead of german (i.e. 'User and Groups', instead of 'Benuter und Gruppen' or 'Users
and Groups in this Role', instead of 'Benutzer und Gruppen dieser Rolle').
In addition of this the User Permissions are in the english language too. How can I translate all of them?
Note: Another texts are already localized (e.g. 'Rolle von Gruppe geerbt').
Many thanks. Any help would be greatly appreciated.Hi AndySta,
Welcome to lightswitch forum.
According to your description above, if you want to localize your lightswitch application, you need add a localized resource file, add a Resources File, and then name it Client.de-DE.resx, then call a resource from code. Check out
https://msdn.microsoft.com/en-us/library/xx130603.aspx
for further information.
Best regards,
Angie
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
DataGrid n000bie - headerText and data woes...
Hi,
So, I haven't worked with the DataGrid before until now; what I'm trying to do is grab the data from the first line of xmlDP, '<team>', and utilize those attributes as the column headerText(i.e.: 1. Chk, 2. Nam0rz, 3. Average, etc...). I can get that going, but I can't insert my data after I alter the col.headerText. via addColumn. See the comments in the code below for more of a description, but seeing how the DataGrid is a new paradigm for me, I know I'm doing this all wrong.
If anyone can help me wrangle this code together in order to get the desired outcome, or explain how to better construct the below code in order to achieve the desired outcome, I would greatly appreciate it.
import fl.data.DataProvider;
import fl.controls.dataGridClasses.DataGridColumn;
import fl.data.DataProvider;
import fl.controls.DataGrid;
import fl.data.DataProvider;
var loader:URLLoader = new URLLoader;
var aDg:DataGrid = new DataGrid();
var xmlDP:XML = <team col0="1. Chk" col1="2. Nam0rz" col2="3. Average" col3="4. DATA" col4="5. DATA2">
<player checkBox="" name="Player G" avg="0.493" data="BLAH 7" data2="BLAH 17"/>
<player checkBox="" name="Player H" avg="0.414" data="BLAH 8" data2="BLAH 88"/>
<player checkBox="" name="Player I" avg="0.517" data="BLAH 9" data2="BLAH 19"/>
<player checkBox="" name="Player J" avg="0.693" data="BLAH 10" data2="BLAH 20"/>
<player checkBox="" name="Player K" avg="0.714" data="BLAH 11" data2="BLAH 21"/>
<player checkBox="" name="Player L" avg="0.817" data="BLAH 12" data2="BLAH 22"/>
</team>;
createDataGrid();
function createDataGrid():void
aDg.move(400, 40);
aDg.width = 500;
aDg.rowCount = aDg.length;
var i:int;
var attrArray:Array = [];
var nodeArray:Array = [];
for each (var att:XML in xmlDP.@*)
aDg.rowCount = i;
attrArray.push(xmlDP.@*[i]);
trace("attrArray = "+ attrArray[i]);
var col:DataGridColumn = new DataGridColumn(attrArray[i]);
//if I comment out the next line, I get all the data I want, but lose the headerText I want.
//If I don't comment it out, I get the headerText I want, but lose the data I want.
//aDg.addColumn(col);
col.headerText = String(attrArray[i]);
i++;
var myString:String;
var myDP:DataProvider = new DataProvider(xmlDP);
aDg.dataProvider = myDP;
addChild(aDg);
Thanks muchleh,
ChiplehHi again kglad,
Thanks for the response. I was trying specifically not to use ["checkBox", "name", "avg", "data", "data2"] and instead use the values of the attributes of <team>. Regardless, I've scrapped that idea for now, as that seems to go against the paradigm of the dataGrid(like I mentioned, I'm n00b to this component).
The thing that's really got me stumped right now is this: When using the code below, the columns are constantly shifting when I compile(i.e.: the "name" column(or any other column for that matter) is never in the same place, they shift all over. Is there something you need to enable in the DataGrid to get consistent column placement results? What I'm expecting to see per my xml is:
checkBox | name | avg | data | data2
but instead I'll see:
data2 | name | avg | data | checkBox
or:
data | name | checkBox | data2 | avg
etc. The columns are never consistent.
import fl.data.DataProvider;
import fl.controls.dataGridClasses.DataGridColumn;
import fl.data.DataProvider;
import fl.controls.DataGrid;
import fl.data.DataProvider;
var loader:URLLoader = new URLLoader;
var aDg:DataGrid = new DataGrid();
var xmlDP:XML = <team>
<player checkBox="" name="Player G" avg="0.493" data="BLAH 7" data2="BLAH 17"/>
<player checkBox="" name="Player H" avg="0.414" data="BLAH 8" data2="BLAH 88"/>
<player checkBox="" name="Player I" avg="0.517" data="BLAH 9" data2="BLAH 19"/>
<player checkBox="" name="Player J" avg="0.693" data="BLAH 10" data2="BLAH 20"/>
<player checkBox="" name="Player K" avg="0.714" data="BLAH 11" data2="BLAH 21"/>
<player checkBox="" name="Player L" avg="0.817" data="BLAH 12" data2="BLAH 22"/>
</team>;
addDataGrid();
function addDataGrid():void
var teamXML:XML = new XML(loader.data);
aDg.setSize(500, 100);
aDg.move(400, 40);
aDg.rowCount = aDg.length;
var myDP:DataProvider = new DataProvider(xmlDP);
aDg.dataProvider = myDP;
aDg.rowCount = aDg.length;
addChild(aDg);
aDg.name = "aDg"; -
Hello!
I got many letters in headerText of DataGridColumn. Can anyone help me with this problem?
1) Maybe someone know how works rotating()? This problem was discussed here http://tech.groups.yahoo.com/group/flexcoders/message/62230. But this method doesn't work.
2) Or is it possible to enter several strings to headerText with '\n' between them? 'cause we can always make headerHeight as big as we need to.
Here is a code of mine
<fx:Style>
@font-face {
src:url("assets/verdanab.ttf");
fontFamily: "MyFont";
fontWeight: bold;
.myStyle1{
fontFamily:"MyFont";
fontSize:12pt;
</fx:Style>
<mx:DataGrid id="myGrid2" x="91" y="526" height="100" dataProvider="{initDG2}" editable="true"
variableRowHeight="true" maxHeight="150" headerHeight="60">
<mx:columns>
<mx:DataGridColumn dataField="Field1" width="150" headerText="Very long text"/>
<mx:DataGridColumn dataField="Field2" headerText="Very long text">
<mx:headerRenderer>
<fx:Component>
<mx:VBox horizontalAlign="center">
<mx:Text text="{this.headerText.data}" styleName=".myStyle1" rotation="90"/>
</mx:VBox>
</fx:Component>
</mx:headerRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
Sorry for my bad English. And thanks in advance.Answer to second question is here http://www.actionscript.org/forums/showthread.php3?t=203048
-
Flexicious datagrid localization & support...
Hi,
I know this isn't the right place to post question for third party components, but I haven't found any support forum / faq on the official website (and found that a Flexicious member is registered here).
My question is about localizing the Flexicious datagrid : what can localized be and how ?
And by the way, is there other means to have support from the Flexicious team (the lack of support forum on the official website is not a good indication of effective and quick support...) ?
Thanks,
RicoRico, our product is completely customizable/localizable. If you have an active subscription, reach out to our support at support at flexicoius dt com and they will help you out.
-
How to resize the spark datagrid collumns based on the headertext?
Hi friends,
I am using spark datagrid for displaying the tablur data in my application, when i setting the dataprovider property of the datagrid, it displays the content exactally what i expeceted.
but the widht of the collumns are based on the content of the dataprovider, i am not able to see the full collumn name in the datagrid's header. I want to display the full collumn name to the users without setting the collumn width explicitly because the data are dynamically returned from the server. could you pls give me some ideas to acheive this...?
Thanks in advance.Hi Karthikeyan Subramain,
You can make use of typicalItem proberty to set the column width.
Here is the link for sample code which uses typicalItem:
http://butterfliesandbugs.wordpress.com/2011/03/08/its-a-best-practice-to-size-a-spark-dat agrids-columns-with-a-typicalitem/
Hope this will help you
Thanks and Best regards,
Pooja Kuber | [email protected] | www.infocepts.com
Maybe you are looking for
-
Certain ondemand channels via Vision box using up ...
His anyone else experienced this possible flaw with the ondemand service on the BT Vision system. I have found that programs watched via iplayer and any channel4 related content seem to deduct usage from my monthly broadband allowance. I have only re
-
Using iFS as a repository for file upload attachments
We are creating an auction website where auction owners are allowed to post any number of attachments (*.doc, *.pdf, etc...) to describe the product being auctioned. What is the best way to go about managing these file attachments? The difficulty lie
-
Apple TV Activation Failed???
I recently purchased an Apple TV (2 months ago) and it was working fine but now all of a sudden under General Settings, About, it says activation failed and it will not allow me to view Hulu Tv etc. Also, an error message comes up saying I need to ve
-
Cannot run a jsp a second time in WebLogic Portal 10.3
I have an index.jsp that has bunch of links that build pdfs. here's the code from the jsp that builds the links <netui:anchor action="openDocumentForView" target="new">view <netui:parameter value="${container.index}" name="id"/> <netui:parameter
-
I am starting a new thread because the old one was marked as resolved and it isn't. My Windows XP desktop is no longer seeing my BB Storm Media Card. I am getting the error: "Device Memory and Media Card are not available because the Mass Storage is