Create easyui DataGrid column Group (column groups) in JavaScript mode

Source: Internet
Author: User

The code is as follows:

[JavaScript]View PlainCopy
  1. <script type="Text/javascript" >
  2. var DataGrid;
  3. $ (function () {
  4. $ (' #datagrid '). DataGrid ({
  5. URL:' {: U ("Admin/article/indexjson")} ',
  6. Title:",
  7. Iconcls:' Icon-save ',
  8. Fit:true,
  9. //The page bar below
  10. Pagination:true,
  11. Pagesize:14,
  12. PAGELIST:[14,20,30,40,50],
  13. //Whether the horizontal scroll bar appears
  14. Fitcolumns:True,
  15. //Data Wrapping
  16. NoWrap:false,
  17. Border:false,
  18. //help you remember that you have chosen to do the cross-page delete
    1. IDfield:' id ',
    2. columns:[[{
    3. Title:",
    4. Field:' ck ',
    5. CheckBox:True,
    6. Width:10,
    7. Rowspan:2
    8. },{
    9. Title:' ID ',
    10. Field:' id ',
    11. WIDTH:50,
    12. Rowspan:2,
    13. Align:' center '
    14. },{
    15. Title:' article title ',
    16. Field:' title ',
    17. WIDTH:350,
    18. Rowspan:2
    19. },{
    20. Title:' Properties ',
    21. Align:' center ',
    22. Colspan:3
    23. },{
    24. Title:' Belong to column ',
    25. Field:' name ',
    26. width:150,
    27. Rowspan:2
    28. },{
    29. Title:' Special topic ',
    30. Field:' name ',
    31. width:150,
    32. Rowspan:2
    33. },{
      1. Title:' Release time ',
      2. Field:' time ',
      3. width:150,
      4. Align:' center ',
      5. Rowspan:2
      6. }
      7. ],[
      8. {
      9. Title:' recommended ',
      10. Field:' good ',
      11. WIDTH:50,
      12. Align:' center '
      13. },{
      14. Title:' hot ',
      15. Field:' hits ',
      16. WIDTH:50,
      17. Align:' center '
      18. },{
      19. Title:' figure ',
      20. Field:' pic ',
      21. WIDTH:50,
      22. Align:' center '
      23. },
      24. ]],toolbar:"#tb"
      25. });
      26. });
      27. function Dosearch (value) {
      28. //alert (' You input: ' + value ');
      29. $ (' #datagrid '). DataGrid (' Load ', {
      30. title:$ ('#tb '). Find (' [Name=search] '). Val ()
      31. });
        1. }
        2. function Doadd () {
        3. //alert (' You input: ' + value ');
        4. }
        5. function Dosave (value) {
        6. Alert (' you input: ' + value ');
        7. }
        8. function Dodel (value) {
        9. Alert (' you input: ' + value ');
        10. }
        11. function Dosearch (value) {
        12. Alert (' You input: ' + value ');
        13. //    }
        14. </script>

Create easyui DataGrid column Group (column groups) in JavaScript mode

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.