Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / igGrid disable / hide check box in a column for particular row

igGrid disable / hide check box in a column for particular row

New Discussion
Michael Seidel
Michael Seidel asked on Mar 31, 2017 5:45 PM

Attached running project with two grids ( igGridDuo.html ) . Please show how to disable check box for the row in the top grid with value ProductNumber == ‘BE-2908’ and how to hide check box in the bottom grid for the row with the same Product Number BE-2908 Thanks.

Attachments:
Sign In to post a reply

Replies

  • 0
    Divya Jain
    Divya Jain answered on Mar 30, 2017 3:16 PM

    Hello mcseidel,

    Thank you for proving sample application.

    To hide the checkboxes only for particular ‘ProductNumber’ for both the grid, you can use the
    rowRendered
    event. This event fired after data rows are rendered.

    You can use rows method to get all rows, get the cell using
    cellById
    and then use the below syntax to hide that checkbox.

    $currentRow.find('.ui-icon.ui-icon-check.ui-igcheckbox-small-on').parent().parent().hide();

    I have modified your sample application for your reference.

    Please find the attached sample and let me know if you need further assistance.

    • 0
      Michael Seidel
      Michael Seidel answered on Mar 30, 2017 9:05 PM

      Hi Divya Jain,
      The solution has some issues – If you choose that row and then clock the hidden checkbox, it does pops up again and you can click it and change value,
      Can you resolve this and also I need this check box hidden on the bottom grid but actually disabled on the top grid. Can you shoe how it can be done ( Both hide on the bottom grid and disable on the top grid)
      Thanks

      • 0
        Michael Seidel
        Michael Seidel answered on Mar 30, 2017 9:09 PM

        then clock –> then click

        Can you shoe how –> Can you show how

      • 0
        Divya Jain
        Divya Jain answered on Mar 31, 2017 5:45 PM

        Hello Mcseidel,

        It is because when you click that cell you entered into edit cell mode and checkbox again shows up.you have to apply same logic in this mode too.

        To stop showing checkbox in edit mode you have to use ‘editCellStarting’ event and cancel it based on your logic.

        Your code in updating feature would be something like this:

        features: [{                       

        name: “Updating”,            

        editCellStarting: function(evt, ui){

                                   if (ui.columnKey ==”inStock” && ui.rowID == 4) {

                                       return false;

                                   }                          

                               },

        Regarding your requirement of displaying checkbox for top grid and hide in the bottom grid, I would recommend you to not use ‘rowsRendered’ and ‘editCellStarting’ event in the top grid .This way these events will not apply their logic of hiding checkbox in the top grid.

        In addition, use it for the bottom grid only.

        Please let me know if you need further assistance.

         

        Attachments:
  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Michael Seidel
Favorites
0
Replies
4
Created On
Mar 31, 2017
Last Post
9 years, 6 months ago

Suggested Discussions

Created by

Created on

Mar 31, 2017 5:45 PM

Last activity on

Feb 19, 2026 1:23 PM