Easy UI DataGrid Setting frozen Columns

Source: Internet
Author: User

In order to freeze a column, you need to define the FrozenColumns property. The Frozencolumn property is the same as the Columns property.

 $ (' #tt '  ' Frozen Columns '  ' icon-save '  500 height:  250 ' Data/datagrid_data.json ' , frozencolumns:[[{field:  ' itemid ', title: ' Item ID ', Width:80}, {Fiel D:  ' ProductID ', title: ' Product ID ', Width:80 ',]], columns:[[{Field: ' ListPrice ', title: ' List price ', width:80,align: ' Right '  ' UnitCost ', Title: ' Unit cost ', width:80,align: ' Right '  ' attr1 ', title: ' Attribute ' , Width:100 ' status ', title: ' Status ', Width:60} ]]});

You do not need to write any  javascript  code, so you can create a data

<table id= "tt" title= "Frozen Columns" class= "Easyui-datagrid" style= "width:500px;height:250px"        url= "Data/datagrid_data.json"        singleselect= "true" iconcls= "Icon-save" >    <thead frozen= "true" >        <tr>            <th field= "itemid" width= ">item id</th> <th            field=" ProductID "Width=" ">product id</th>        </tr>    </thead>    <thead>        <tr>            <th Field= "ListPrice" width= "align=" "right" >list price</th> <th            field= "UnitCost" width= "align=" Right ">unit cost</th>            <th field=" attr1 "width=" >Attribute</th> <th field=            " Status "width=" align= "center" >Stauts</th>        </tr>    </thead></table>

Easy UI DataGrid Setting frozen Columns

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.