Author Topic: Enable row selection with checkbox Id selection  (Read 8316 times)

kshipra

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 94
    • View Profile
Enable row selection with checkbox Id selection
« on: January 10, 2019, 08:12:45 am »
{
                 title: "Id",
                 width: 220,
                 dataIndx: "Id",
                 type: 'checkbox',
                 cbId: 'state',
                 useLabel: true
             },
              {
                  dataIndx: 'state',
                  dataType: 'bool',
                  cb: { header: true },
                  hidden: true,
                  editable: function (ui) {
                      //to make checkboxes editable selectively.
                      return true;
                  }
              },

checkbox column has disabled checkboxes. They are not getting enabled. Need help

The grid is readonly grid. I want to enable row selection and cell selection for copying so for row selection trying to implement checkbox column.

In version 3.4 row was selected when selected on number cell. It is not getting selected anymore. Can you support this functionality in grid V5.6
https://paramquery.com/pro/demos33/selection_cell

kshipra

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 94
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #1 on: January 10, 2019, 12:54:16 pm »
   colModel:
            [
                { title: "ID", width: 100, dataType: "integer", dataIndx: "id", type:'checkbox', cbId: 'state', editable: false },
                //hidden column to store checkbox states.
                {
                    dataIndx: 'state',
                    cb: {header: true, select: true, all: true},
                    dataType: 'bool',
                    hidden: true
                },
                { title: "Company", width: 220, dataType: "string", dataIndx: "company", editable: false },
                { title: "Revenues ($ millions)", width: 180, dataType: "float", format: "#.00", dataIndx: "revenues", editable: false },
                { title: "Profits ($ millions)", width: 170, dataType: "float", format: "#.00", dataIndx: "profits", editable: false }
            ]

https://paramquery.com/pro/demos/selection_checkbox

I think there is a bug. For read only grid, row selection should enable copying rows or range of cells but it is not working.

when i removed editable: false from grid option and moved it to each column editable:false then row selection is working. Isn't it same thing as grid.editable = false.

I liked implementation in 3.4 of selecting the row when number cell was clicked. 
Now we have to add more code to add state column backend and front end  to get row selection working.  The hidden column of state is getting displayed in column selector. If it is hidden it should not show in column selector. how do i get rid of hidden column from column selector?



I would like to have support in latest version for 3.4 implementation of row selection, perhaps with some option please?


Also when whole row is selected using checkbox, it is not getting copied using ctrl C ?
« Last Edit: January 10, 2019, 01:14:11 pm by kshipra »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5290
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #2 on: January 10, 2019, 03:57:42 pm »
[ Only Pro members may read this post. ]

kshipra

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 94
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #3 on: January 23, 2019, 03:52:10 am »
https://paramquery.com/pro/demos33/selection_cell

In this version by default cell and row selections are supported. My users need that ability to select cells or row by default.
This functionality is changed in upgraded version of 5.6.

Can you support this capability?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5290
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #4 on: January 23, 2019, 06:07:46 pm »
[ Only Pro members may read this post. ]

kshipra

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 94
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #5 on: January 23, 2019, 10:34:38 pm »
 We have users that work heavily in excel and we are trying to give them same functionality on web. This is basic functionality of excel that should not have been broken in upgraded versions. You are breaking user base applications and not supporting us. I have to answer to my users as to why this functionality is not working anymore. I told them I am working with pqgrid team on this.
« Last Edit: January 23, 2019, 10:46:46 pm by kshipra »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5290
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #6 on: January 23, 2019, 11:29:55 pm »
[ Only Pro members may read this post. ]

kshipra

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 94
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #7 on: January 23, 2019, 11:39:57 pm »
By default  simultaneous support of cell and row selections as in excel. An user should not be made to choose an option if he/she wants to have row selection or cell selection enabled.

It is working properly in this version of grid
https://paramquery.com/pro/demos33/selection_cell

Here user has to choose which selection he wants to have
https://paramquery.com/pro/demos52/selection_multiple

« Last Edit: January 23, 2019, 11:41:49 pm by kshipra »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5290
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #8 on: January 24, 2019, 03:06:57 pm »
[ Only Pro members may read this post. ]
« Last Edit: January 24, 2019, 07:11:35 pm by paramquery »

kshipra

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 94
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #9 on: January 24, 2019, 10:45:34 pm »
I tried the code provided. I found 2 issues with it:

1. It is not selecting multiple rows with shift and ctrl keys
2. I have functionality of copying data from selected rows.
$grid.pqGrid("SelectRow").getSelection()

This is not working. It is not returning any data.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5290
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #10 on: January 24, 2019, 11:30:59 pm »
[ Only Pro members may read this post. ]
« Last Edit: January 24, 2019, 11:34:40 pm by paramquery »

kshipra

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 94
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #11 on: January 25, 2019, 01:02:20 am »
var sel = $grid.pqGrid("Selection");
var arr = sel.getSelection();

getSelection gives me whole big array with multiple rows data in it.
I need to have array for each selected row. I do not have fixed columns, they can choose columns so for me to figure out how many rows are selected is hard.

How can I find that out?

I feel this is kind of hack or quick fix.
Can you support this capability in upcoming releases of the grid ?  That would be really great if you can do that.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5290
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #12 on: January 25, 2019, 10:44:34 am »
[ Only Pro members may read this post. ]

kshipra

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 94
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #13 on: January 25, 2019, 12:46:21 pm »
Thank you for your current help. Which release should I expect this support to be available?
Currently I have to  modify all of my screens to support these changes.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5290
    • View Profile
Re: Enable row selection with checkbox Id selection
« Reply #14 on: January 28, 2019, 10:28:13 am »
[ Only Pro members may read this post. ]