4 Replies Latest reply on Jan 27, 2009 7:14 AM by Mush15

    Relative column width for the columns in datagrid

    Geetha Narayan
      I have to set relative column widths for all the columns of a particular datagrid whose id is 'dg1'

      I created a function inside the script tag,
      function setRelativeColWidths(){
      dg1.getColumnAt(0).width =dg1.width*.10;
      dg1.getColumnAt(1).width =dg1.width*.15;
      dg1.getColumnAt(2).width =dg1.width*.50;
      And I call this function in the creationComplete of the same datagrid, like this creationComplete="setRelativeColWidths()"

      I get an error like "call to a possibly undefined method getColumnAt through a reference with static type mx.controls:DataGrid"

      Does anyone have any idea on this? Can someone help me out?

      Thanks in advance.