HI,

 

         I got struck in one more problem wtth  the data grid header for flex 1.5. Actually I want the headertext as multiline as I have to display the no. of columns in the small area. I tried adding the \n character and played with the htmlText also for this but nothing worked. Is there any way out. As well as the lines between the column names and under this was not removable. I tried to play with the css which did not work for the datagrids.

Could you plz. suggest me something abt this prob?

 

                 <?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">

<mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml" height="445" width="447" backgroundColor="#FFFFFF" creationComplete="populate();" backgroundDisabledColor="#FFFFFF">

 

  <mx:Script>

<![CDATA[

            public var myComboBoxArray:Array = ["Business Unit", "Administrator", "Lender Channel"];

            public var contents:Array = ["Link","ProgramGuides","BusinessGuidelines"];

            public var myLinkArray:Array = ["the Bank Website","Google","National Mortgage news","the Bank Website","Google","Yahoo"];

            public var myPgArray:Array = ["Conventional Loan Program","Jumbo Loan Program","Government Loans"];

            public var myBgArray:Array = ["Quick Refrence Guide","Loan Submission Requirement","Channel Master User Guide"];

            public var newContents:Array = new Array();

            public var dummy:Array = new Array();

            public var dummy1:Array = new Array();

            public var dummy2:Array = new Array();

            var tempselect:String;

            var sel:Number;

            [Bindable]

                        var temp:String;

                        var a:String;

                        public var columnName:String="";

            function populate(){

                        for (var index in contents){

                                                var tempitem:String;

                                                tempitem=contents[index];

                                                myDataGrid.dataProvider.addItem({yr:tempitem,totalPayment:tempitem,intRate:tempitem,endBalance:tempitem,ptsTotalPayment:tempitem,ptsIntRate:tempitem,ptsEndBalance:tempitem});//addItem

                                    }

                                    /*function genData()

                                    {

            var rowCount = 30;//Number(rows.text);

            var dp = [];

            for (var i=0;i<rowCount;i++) {

                dp.push({data1:"$" + i + ".00"});

            }

            myDataGrid.dataProvider = dp;

            }*/

            }

           

                        ]]>

</mx:Script>

 

<mx:DataGrid id="myDataGrid" width="98%"  height="85%" x="5" y="75" dataProvider="{dummy}" rowHeight="15" fontSize="9" editable="false" backgroundColor="#FFFFFF" borderColor="#FFFFFF" borderThickness="0" hGridLineColor="#FFFFFF" vGridLineColor="#FFFFFF" verticalAlign="middle" color="#000000" dragEnabled="false" enabled="true" showHeaders="true" backgroundDisabledColor="#FFFFFF" headerHeight="40" borderCapColor="#FFFFFF" fillColors="[#000000]" fontFamily="Verdana" fontStyle="normal" fontWeight="normal" headerColor="#FFFFFF" hGridLines="false" highlightColor="#FFFFFF" scrollTrackColor="#FFFFFF" selectionColor="#FFFFFF" selectionDisabledColor="#000000" symbolBackgroundColor="#000000" textDecoration="none" textAlign="left" textDisabledColor="#000000" themeColor="#FFFFFF" alternatingRowColors="[#FFFFFF]" vScrollPolicy="off" hScrollPolicy="off" backgroundAlpha="0.0" >

     <mx:columns>

            <mx:Array>

                <mx:DataGridColumn columnName="name" headerText="Name"/>

                <mx:DataGridColumn columnName="yr" headerText="Year"/>

                <mx:DataGridColumn columnName="totalPayment" headerText="" headerRenderer="{GridHeaderRender}"/>

                <mx:DataGridColumn columnName="intRate" headerText="Interest Rate"/>

                                                <mx:DataGridColumn columnName="endBalance" headerText="Ending Balance"/>

                                                <mx:DataGridColumn columnName="ptsTotalPayment" headerText="Total Payment"/>

                <mx:DataGridColumn columnName="ptsIntRate" headerText="Interest Rate"/>

                                                <mx:DataGridColumn columnName="ptsEndBalance" headerText="Ending Balance"/>

                                               

            </mx:Array>

     </mx:columns>

</mx:DataGrid>            

 

</mx:Canvas>

</mx:Application>

 

GridHeaderRender.as

 

import mx.controls.Label;

class GridHeaderRender extends mx.controls.Label{

   var lbl : MovieClip;

   var listOwner : MovieClip; //Reference to the parent DataGrid.

 

   function GridHeaderRender(){

   }

   public function createChildren():Void {

      lbl = createClassObject(Label, 'label', 1, {toolTip: 'User names here.'});

      lbl.text = "Total&#13;nPayment";

   }

 

   public function getPreferredHeight():Number {

      return listOwner.rowHeight;

   }

 

   public function layoutChildren():Void {

      lbl.setSize(80, listOwner.rowHeight);

   }

 

   function setValue(str:String, item:Object, sel:Boolean) : Void {

   }

}

 

 

 

Akash,

 

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___
Disclaimer

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, please immediately notify the [EMAIL PROTECTED] and destroy the original message. The recipient should check this email and any attachments for the presence of viruses. Ness has taken every reasonable precaution to minimize this risk, and accepts no liability for any damage caused by any virus transmitted in this email. Ness reserves the rights to monitor and review the content of all messages sent to or from this E-mail address, and store them on the Ness E-mail system.

Reply via email to