开发者

TextInput as ItemRenderer in DataGrid :Scroll Issue

I use textInput as ItemRenderer for all columns of a datagrid.I need to set editability of first row as false.I did it on creationComplete of the itemRenderer.Also tried overriding upDateDislayList. It works fine for the first row.But some other rows also get their editability changed to false.Also on scroll many rows get their editability changed.Please help.

  override public function set data(value:Object):void
    { 
        super.data = value; 
      if(listData.owner.name == "headCountGrid")
      {
      if(data != null && qbpHttpServ.rowDataHcGridArr != null)
          { 
             if(data["column1Data"] == qbpHttpServ.rowDataHcGridArr[0]["column1Data"])
          {
          this.editable = false;
          }
          }
     }
    }
    override protected function updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void{
     super.updateDisplayList(unsca开发者_如何转开发ledWidth,unscaledHeight);
     var g:Graphics = graphics;
     g.clear();
    }


Do you know that items in lists are reused? Make sure they are controlled entirely by set data() function. Pass editability flag with data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜