jquery Plugin Easyui Setting the checkbox for a DataGrid to a disabled state method _jquery

Source: Internet
Author: User

The example in this article describes the jquery plug-in Easyui method for setting the checkbox for the DataGrid to a disabled state. Share to everyone for your reference, specific as follows:

The method is simple, we only need to deal with the event after the data is loaded successfully. The specific code looks like this:


the event onloadsuccess:function (data) {
  ///Simulated test load succeeded with a date ID greater than 20 checked and disabled checkbox for
  (var i = 0; i < Data.rows.length; i++) {
    if (data.rows[i]. Id >) {
      dgobj.datagrid (' Checkrow ', i);
      Disable checkbox
      $ (". datagrid-row[datagrid-row-index=" + i + "] input[type= ' checkbox '") [0].disabled = true;
    }
  }
}

Description

The Dgobj is a table object, such as:

$ (' #tableId ')

More interested readers of jquery-related content can view the site topics: "jquery Extended Tips," "jquery common Plug-ins and Usage summary", "jquery drag-and-drop effects and tips summary", "jquery table (table) Operation Tips Summary", " A summary of Ajax usage in jquery, a summary of common classic effects in jquery, a summary of jquery animation and special effects usage, and a summary of jquery selector usage

I hope this article will help you with the jquery program design.

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.