1

I am working with bootgrid. I want the row color to be highlighted based on the specific condition. How do i do it??

 <script type="text/javascript">         
          $(document).ready(function () {
          //Basic Example
            $("#data-table-command").bootgrid({

               css: {
                  icon: 'md icon',
                  iconColumns: 'md-view-module',
                  iconDown: 'md-expand-more',
                  iconRefresh: 'md-refresh',
                  iconUp: 'md-expand-less'
               },

        formatters: {
            "commands": function (column, row) {

                return "<a class=\"btn btn-success \"   data-row-id=\"" +     row.id + "\" href=/Ticket/ViewTicket?id=" + row.id + "> <span class=\"md md-  pageview\"></span> View </a>" + "" + "\&nbsp;" + "\&nbsp;" +
                    "<a class=\"btn btn-warning \"   data-row-id=\"" + row.id + "\" href=/Ticket/Close?id=" + row.id + "> <span class=\"md md-close\"></span> Close </a>" + "" + "\&nbsp;" + "\&nbsp;";

            }
        }
    });
});

4

1 回答 1

0

This feature is implemented in version 1.2.0 which is currently not released, because of lacking documentation, but will be very shortly.

Three ways to grab the new version:

  1. From NuGet via Install-Package jQuery.Bootgrid -Pre
  2. From NPM via npm install jquery-bootgrid@1.2.0-rc
  3. From the github branch fixes-and-features

For more information on how it works see issue 72 on github.

于 2015-05-01T00:42:45.637 回答