Possible bug TTIWDBAdvWebGrid OnCheckClick event

Hello,


     I have a 'TTIWDBAdvWebGrid' with more than one page of records where on its 'OnCheckClickEvent' I do something like:

---
  if TTIWDbgrid.RowSelect[RowIndex] then
    something
  else
    something else;
---

 If I check or uncheck rows in the first page everything works ok, i.e., if I check some row  the ' TTIWDbgrid.RowSelect[RowIndex' results 'true' and when I uncheck some row the test results 'false'. But if I go to any other page of that dbgrid and check an unchecked  row ' TTIWDbgrid.RowSelect[RowIndex' results 'false'. Why is it behaving differently in pages greater than 1? 

  Thanks for any help.

  Joao Lira.

Hi,


Have you tried using the RowOffset value to get the absolute RowIndex value instead of the relative value?

Example:
TTIWDbgrid.RowSelect[RowIndex + TTIWDbgrid.RowOffset];

Hello, Holvoet,



   It worked flawless! 

   Thanks!
Hello,

Some questions and one issue:

1) The property 'RowSelect[index]' can be used to know whether a row is selected or not. If I set 'ColumnHeaderCheckBox' to 'true' how can I know whether the 'column header' was checked or unchecked in the 'OnColumnHeaderClick' event, for example?

2) When I have more than one page and I check or uncheck the column header checkbox in the first page all works great, but if I do the same in a page greater than '1' if I check the column header checkbox it checks all rows as expected BUT it doesn't hold the selection in the column checkbox itself, and the column checkbox for that page stop working since them, i.e., I can't uncheck or check again the column header checkbox anymore. Is there some property setting to fix this situation?

3) Is it possible to use the column header checkbox to check or uncheck ALL rows in ALL pages automatically when clicked in the column header checkbox of  ANY page?

Thank you for your attention.

Just to let you know the above situations are all when using a 'TTIWDbAdvWebGrid'.'

  1. There's currently no specific event available for the ColumnHeaderCheckBox. The same event "On(Async)CheckClick" will be triggered as when a regular checkbox is clicked.
    You can then iterate the RowSelect property to check which rows are checked or unchecked.

    2) I have not been able to reproduce this issue. If you are using async paging or async row selection can you disable that and use regular synchronous paging and row selection instead?

    3) Unfortunately this is currently not supported. 
    We'll consider adding this feature in a future version.
Hello,

1) What I need is to know whether the 'ColumnHeaderCheckBox' is checked or unchecked. How to do it? Even to do the number 3) as you suggested.

2) I am not using Async row selection. 

Thanks!

 

Sorry, where you read "Even to do the number 3) as you suggested", please read "Even to do the number 1)..."

  1. It's currently not supported to retrieve the state of the ColumnHeaderCheckBox.
    However, this is a good suggestion and we'll consider adding this in a future version.

    2) Can you please provide the following information so I can further investigate this?
    - The version of Delphi and IntraWeb you are using
    - The name and version of the browser you are using
    - A ready to run sample project that demonstrates the issue (projects can be mailed as attachment to mailto:help@tmssoftware.com
Hello,

1) I figured out that when 'RowIndex' is "-1" it means that the user checked / unchecked the 'Column HeaderCheckBox'. But, unfortunately there is no way for the programmer to know the property state. I have seen this feature associated to the possibility of checking or unchecking ALL checkbox of ALL pages, not only the current page. The current behavior doesn't make much sense, I guess. I'm glad that you consider add this feature in a (not too far, I hope...) future.

2) Because neither the user can check ALL checkmarks of ALL pages nor the 'ColumnHeaderCheckBox' state can be known I stopped using this feature until some improvement. I am using Delphi 10.1 Berlin Update 2, Intraweb 14.1.6 and the problem occured in Chome latest version, Firefox latest version and IE 11 with the latest update. What happens is very simple:
- Page 1, all work as expected, when the user click 'ColumnHeaderCheckBox' all checkbox of that page are checkd /unchecked and 'ColumnHeaderCheckBox' holds the last state (checked or unchecked). If you click again the state shifts as expected and so on;
- Page > 1, the user can click 'ColumnHeaderCheckBox' and all checkbox will become checked, BUT the 'ColumnHeaderCheckBox' doesn't hold the 'checked' state, becoming unchecked immediately. if you click again nothing happens, the checkboxes remains checked and only get unchecked if the user uncheck then mannualy.

Thank you.

Joao Lira.