Results 1 to 4 of 4

Thread: columnModel?????

  1. #1

    Default columnModel?????

    ??????htm???code???????????
    ????????????????????????????

    var cm=new Ext.grid.ColumnModel([
    {
    header:'???',
    dataIndex:'Company',
    width:200,
    ????renderer:Ext.util.Format.htmlEncode
    },{
    header:'????',
    dataIndex:'tel',
    width:150
    }

  2. #2
    Sencha - Support Team yuki's Avatar
    Join Date
    Jun 2007
    Location
    Chigasaki, Japan
    Posts
    273

    Default ????

    ??????????????????????
    Ext Japan, LLC [Twitter: @extjapan]
    [Ext JS / Ext GWT????????][????????????][Ext JS???????????????]

  3. #3

    Default ????????

    ???????????
    columnModel?????????????????????????

    ????????????
    var cm=new Ext.grid.ColumnModel([
    {
    header:'data',
    dataIndex:'data',
    width:100
    },{
    header:'data1',
    dataIndex:'data1',
    width:100
    } .....
    ,{
    header:'data100',
    dataIndex:'data1',
    width:100
    } ???????100?????????????
    ???????? renderer:Ext.util.Format.htmlEncode
    ?????????????????????????

  4. #4
    Sencha - Support Team yuki's Avatar
    Join Date
    Jun 2007
    Location
    Chigasaki, Japan
    Posts
    273

    Default

    ColumnModel?new????renderer???????????
    Code:
      var columns = [
        {header:'data', dataIndex:'data', width:100},
        {header:'data1', dataIndex:'data1', width:100},
        ...
        ...
        ...
        {header:'data100', dataIndex:'data1', width:100}
      ];
    
      for(var i=0; i<columns.length; i++){
        columns[i].renderer = Ext.util.Format.htmlEncode;
      }
    
      var cm = new Ext.grid.ColumnModel(columns);
    new????????
    Code:
      var len = cm.getColumnCount();
      for(var i=0; i<len; i++){
        cm.setRenderer(i, Ext.util.Format.htmlEncode);
      }
    ???????????????
    Ext Japan, LLC [Twitter: @extjapan]
    [Ext JS / Ext GWT????????][????????????][Ext JS???????????????]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •