Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
sulletf #1
DataGrid fontWeight style behave strange
Hi!
See the below example and update column 1 from "undefined" to "bold" then to
"normal" : only the header is set to "normal" fontWeight. If you click on
"clear" for the dataGrid, then column1 has its fontWeight set to "normal" !
Is it only strange to me ?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="init()">
<mx:Script>
<![CDATA[
private function init(): void {
dgRBG.selectedValue=String(dg.getStyle('fontWeight '));
dgc1RBG.selectedValue=String(dgc1.getStyle('fontWe ight'));
dgc2RBG.selectedValue=String(dgc2.getStyle('fontWe ight'));
dgc3RBG.selectedValue=String(dgc3.getStyle('fontWe ight'));
}
private function clearFontWeightDG(): void {
dg.clearStyle('fontWeight');
callLater( init );
}
private function clearFontWeight1(): void {
dgc1.clearStyle('fontWeight');
callLater( init );
}
private function clearFontWeight2(): void {
dgc2.clearStyle('fontWeight');
callLater( init );
}
private function clearFontWeight3(): void {
dgc3.clearStyle('fontWeight');
callLater( init );
}
]]>
</mx:Script>
<mx:XMLList id="employees">
<employee>
<name>Christina Coenraets</name>
<phone>555-219-2270</phone>
<email>ccoenraets@fictitious.com</email>
<active>true</active>
</employee>
<employee>
<name>Joanne Wall</name>
<phone>555-219-2012</phone>
<email>jwall@fictitious.com</email>
<active>true</active>
</employee>
<employee>
<name>Maurice Smith</name>
<phone>555-219-2012</phone>
<email>maurice@fictitious.com</email>
<active>false</active>
</employee>
<employee>
<name>Mary Jones</name>
<phone>555-219-2000</phone>
<email>mjones@fictitious.com</email>
<active>true</active>
</employee>
</mx:XMLList>
<mx:DataGrid id="dg" rowCount="5" dataProvider="{employees}">
<mx:columns>
<mx:DataGridColumn id="dgc1" dataField="name" headerText="Name" />
<mx:DataGridColumn id="dgc2" dataField="phone" headerText="Phone"/>
<mx:DataGridColumn id="dgc3" dataField="email" headerText="Email"/>
</mx:columns>
</mx:DataGrid>
<mx:Form>
<mx:FormItem label="datagrid" direction="horizontal">
<mx:RadioButtonGroup id="dgRBG" itemClick="dg.setStyle('fontWeight',
dgRBG.selectedValue);" />
<mx:RadioButton groupName="dgRBG" label="normal" value="normal" />
<mx:RadioButton groupName="dgRBG" label="bold" value="bold" />
<mx:RadioButton groupName="dgRBG" label="undefined" value="undefined" />
<mx:Button label="clear" click="clearFontWeightDG()" />
</mx:FormItem>
<mx:FormItem label="column 1" direction="horizontal">
<mx:RadioButtonGroup id="dgc1RBG" itemClick="dgc1.setStyle('fontWeight',
dgc1RBG.selectedValue);" />
<mx:RadioButton groupName="dgc1RBG" label="normal" value="normal" />
<mx:RadioButton groupName="dgc1RBG" label="bold" value="bold" />
<mx:RadioButton groupName="dgc1RBG" label="undefined" value="undefined" />
<mx:Button label="clear" click="clearFontWeight1()" />
</mx:FormItem>
<mx:FormItem label="column 2" direction="horizontal">
<mx:RadioButtonGroup id="dgc2RBG" itemClick="dgc2.setStyle('fontWeight',
dgc2RBG.selectedValue);" />
<mx:RadioButton groupName="dgc2RBG" label="normal" value="normal" />
<mx:RadioButton groupName="dgc2RBG" label="bold" value="bold" />
<mx:RadioButton groupName="dgc2RBG" label="undefined" value="undefined" />
<mx:Button label="clear" click="clearFontWeight2()" />
</mx:FormItem>
<mx:FormItem label="column 3" direction="horizontal">
<mx:RadioButtonGroup id="dgc3RBG" itemClick="dgc3.setStyle('fontWeight',
dgc3RBG.selectedValue);" />
<mx:RadioButton groupName="dgc3RBG" label="normal" value="normal" />
<mx:RadioButton groupName="dgc3RBG" label="bold" value="bold" />
<mx:RadioButton groupName="dgc3RBG" label="undefined" value="undefined" />
<mx:Button label="clear" click="clearFontWeight3()" />
</mx:FormItem>
</mx:Form>
</mx:Application>
sulletf Guest
-
Datagrid within a Datagrid, treeview style....
Hey all, As the subject suggests, that's what I'm trying to accomplish. I'd trying to design something akin to this: ->First_Name | Last_Name |... -
How can I save the style of a datagrid so that it appears on the automatic format to use iin another datagrid?
How can I save the style of a datagrid so that it appears on the automatic format to use iin another datagrid? -
Datagrid CssClass being overridden by TD style
Since I added a style for TD elements to my style sheet I have been unable to control the look of datagrids using the CssClass properties. Maybe... -
Overriding a style for the HyperlinkColumn in my datagrid: Please help me.
I have a style sheet for my site. It has various classes in it. It has <A: styles defined for all anchor tags. I have a datagrid in ASP.NET with... -
Set style or width at column level of datagrid
I have a datagrid that is using some custom styles very nicely by using the following code: <asp:DataGrid id="DataGrid1" runat="server"...



Reply With Quote

