Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Conversation

@yeikel16
Copy link

@yeikel16 yeikel16 commented Nov 26, 2024

In some cases I need the row checkbox to be disabled to prevent user interaction.

 PlutoColumn(
     enableColumnDrag: false,
     enableContextMenu: false,
     enableRowChecked: true,
     disableRowCheckboxWhen: (row) {
          final status = row.cells['status']?.value.toString();

          return status == '4' || status == '2';
     },
     ...
 )

I have tried to implement renderer function in PlutoColumn with my own checkbox, but it still shows PlutoScaledCheckbox widget. When I set enableRowChecked equal to false, the checkbox under the title "Checkbox All" is not available.

@doonfrs
Copy link
Owner

doonfrs commented Dec 10, 2024

Thank you for your efforts.
Could you please remove the .fvm files and the gitignore and let's only upload the files related to the PR.
This will make it easier to review.

@muammerakilli
Copy link

muammerakilli commented Dec 10, 2024

  PlutoColumn(
        field: 'a023',
        title: 'EKSTRA MES.',
        enableSorting: false,
        enableFilterMenuItem: false,
        enableContextMenu: false,
        enableDropToResize: false,
        type: PlutoColumnType.number(format: '#,###.##'),
        titleTextAlign: PlutoColumnTextAlign.center,
        checkReadOnly: checkReadOnly,
      )
      
  bool checkReadOnly(PlutoRow row, PlutoCell cell) {
    return row.cells['kilitle']!.value == 1;
  }
  

I use the checkReadOnly property to make checkboxes read-only on a cell basis. The disableRowCheckWhen property you mentioned seems to completely disable the checkboxes. Do these two methods essentially achieve the same result, or is there a significant difference between them?

@yeikel16
Copy link
Author

yeikel16 commented Dec 11, 2024

  PlutoColumn(
        field: 'a023',
        title: 'EKSTRA MES.',
        enableSorting: false,
        enableFilterMenuItem: false,
        enableContextMenu: false,
        enableDropToResize: false,
        type: PlutoColumnType.number(format: '#,###.##'),
        titleTextAlign: PlutoColumnTextAlign.center,
        checkReadOnly: checkReadOnly,
      )
      
  bool checkReadOnly(PlutoRow row, PlutoCell cell) {
    return row.cells['kilitle']!.value == 1;
  }
  

I use the checkReadOnly property to make checkboxes read-only on a cell basis. The disableRowCheckWhen property you mentioned seems to completely disable the checkboxes. Do these two methods essentially achieve the same result, or is there a significant difference between them?

In my case I need to show the checkbox disabled ("gray color and does not allow interaction with it") the checkReadOnly method does not allow this behavior.

@yeikel16
Copy link
Author

Hey @doonfrs, I pushed the changes !!

@doonfrs doonfrs merged commit 894ede9 into doonfrs:master Dec 14, 2024
1 check failed
@doonfrs
Copy link
Owner

doonfrs commented Dec 14, 2024

@yeikel16 done, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants