Checkbox in fixed columns and multi select

Originally Posted 17 February 2017, 4:51 am EST

  • Originally Posted 17 February 2017, 4:51 am EST

    Hi C1,

    see attached sample: the grid has a checkbox in the fixed columns. When selecting multiple rows and click a checkbox, the checkbox state is toggled only for the clicked cell of the range.

    In non fixed cols, all cells of the selection are checked/unchecked.

    Is there a chance that you change the grid to behave the same way in fixed cols?

    Best regards

    Wolfgang
    2017/02/FlexGridCheckBoxInFixed.zip
  • Reply

    Hello Wolfgang,

    We are discussing the issue with the concerned team {Tracking id: 240646}and will come back to you as soon as we have some information.

    Regards
    Ruchir Agarwal
  • Reply

    Hi,

    For toggling the state of all the checkboxes of selected range in fixed columns, you need to use C1FlexGrid's CellChecked event and change the state of all the checkboxes in selection range using SetCellCheck method, as follows:
     if (e.Col < c1FlexGrid1.Cols.Fixed)
    {
    CheckEnum checkState = c1FlexGrid1.GetCellCheck(e.Row, e.Col);
    for (int r = c1FlexGrid1.Selection.r1; r < c1FlexGrid1.Selection.r2 + 1; r++)
    {
    c1FlexGrid1.SetCellCheck(r, e.Col, checkState);
    }
    }


    I have modified your application and attached the same for your reference.

    Regards
    Ruchir Agarwal
    2017/05/FlexGridCheckBoxInFixed_modified.zip
  • Reply

    And here is the video.
    2017/05/video.zip
  • Reply

    Hi Ruchir,

    I see that it works for you, but it still does not work for me.

    Attached is a new version of my sample. The only difference to the previous sample: it now bundles my version of C1FlexGrid .249 dll. Maybe you have a newer build which contains a fix for this issue?

    Attached is also a video which shows that it does not work for me.

    Best regards

    Wolfgang
    2017/05/FlexGridCheckBoxInFixed.zip
  • Reply

    Hi Wolfgang,

    We could not observe the issue anymore using C1FlexGrid build version "4.0.20171.249". I have attached a video file showing the behavior of the application with build .249.

    Let me know if the application behavior is different at your end.

    Thanks
    Ruchir Agarwal
    2017/05/CheckBoxInFixedCols.gif
  • Reply

    Hi Ruchir,

    no, this is not fixed (I tested with build .249).

    Best regards

    Wolfgang
  • Reply

    Hi,

    We are pleased to inform you that the issue has been fixed in the latest release of C1_WinForms. You may download the same from the following links:
    http://prerelease.componentone.com/dotnet40/c1winforms/2017-t1/C1WinForms.4_4.0.20171.248.zip
    http://prerelease.componentone.com/dotnet20/c1winforms/2017-t1/C1WinForms.2_2.0.20171.248.zip

    Best Regards
    Ruchir Agarwal
  • Reply

    You didn't tell me about this workaround ;-)!

    Thanks, I applied it to our code and it works now.

    Do you think that this will be fixed/improved in C1FlexGrid itself?

    Best regards

    Wolfgang
  • Marked as Answer

    Reply

    Hi Ruchir,

    thanks for the feedback. So I will stick with the workaround code ;-).

    Best regards

    Wolfgang
  • Reply

    Hello WolfGang,

    We have received information from the Development team and as per them "This is designed behavior. With the C1FlexGridBase.SelectionMode == SelectionModeEnum.Default fixed cells cannot be selected, only editable cell or rectangular ranges with editable cells.
    With the C1FlexGridBase.SelectionMode == SelectionModeEnum.ListBox the whole row can be selected, so the row includes the fixed cells and with ListBox selection mode multiple checkboxes in selected fixed cells can be changed."

    Thanks,
    Ruchir Agarwal
  • Reply

    Hello Wolfgang,


    Glad to know that the workaround works for you.
    Regarding getting this fixed/integrated in C1FlexGrid, I am talking to the Developers and will update you with the information I receive from them.

    Regards
    Ruchir Agarwal
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels