Ignite UI 13.2
We are experiencing some inconsistencies with the igSelection API. It isn't honoring our API calls and displays this abnormal behavior:
mode: rowmultiple: truerequireSelection: true - (Setting this value to false causes an error - which I believe it shouldn't. Check into this for me please.)enableCheckboxes: true
Scenario 1
1. Select the first record on page 1.2. Invoke this method in the API: igSelection("deselectRow", 0);3. Select the first record on page 1. (This record should now be selected by the system)
Result: No UI updates. Upon inspecting the event handler, the API thinks the first record was just deselected. The API call did not correctly deselect this record. Even the event args reflect the new state as "OFF", which is incorrect.
Scenario 2
1. Select a row on page 1.2. Click on page 2 using the UI.3. Invoke this method in the API: igPaging("pageIndex", 0);
Result: Rows are NOT marked with the appropriate selection styles.
Scenario 3
1. Select the first record on page 1.2. Click on page 2 using the UI.3. Click on page 1 using the UI.4. Noticed that the first record is correctly highlighted.5. Click on that first record to deselect it.
Result: Row is still bolded but no longer active. This trend continues on every other record you select.
(Thoughts?)
Hello Daniel,
Please let me know if you need any further assistance on the matter.
First let me apologize for late response. The RequireSelection property determines if RowSelectors will throw an error if Selection is not enabled for the grid (when initializing). If set to false and selection is not enabled grid will render fine.
However, when checkboxes are enabled checking them calls methods from the igGridSelection widget and this results in error since it is not available. This is expected behavior.
I suggest that you disable the RowSelectors checkboxes in case you do not use the Selection feature.
Please let me know if you have further questions on the issue.
For the selection exception, I think I have a misunderstanding as to what RequireSelection is used for. I can replicate the issue by removing this line from your declaration:{ name: "Selection", mode: "row", multipleSelection: true, activation: true,}
If require selection has been explicitly denied, why would we register the feature on the grid? If we don't, then we see the attached error. My initial thought when I set this property to false was: "Ok cool, we don't care for the CSS styles that the selection feature introduces so by setting this to false, I don't have to load the selection feature." WRONG! It apparently is still required. What's the insight here so we know moving forward?
Click the image for full size...
I apologize that I didn't notice checkboxes were not rendered, it is because the property should be written with capital letters as follows;
enableCheckBoxes: true,
However it seems that this rookie mistake broke the grid selection functionality and the way I described that the grid behaves is not the same when I got the checkboxes rendered. Also tit seems that changing the pageIndex is not an interaction that will make the selection state get lost (as will happen if you change the pageSize for example from the UI)
Please see my comments now:
The method properly deselects the row and then clicking on the row makes it selected again. Works fine.
I experienced the same result - rows that have been selected currently are not selected. I will further investigate that, however I believe it has a reason for this why changing the pageIndex through the API or UI has a different impact.
As mentioned in my last post clicking on the selectedRow will NOT make it deselected. This is expected.
I have also not been able to see any error occur when requireSelection is set to false. Please see the modified sample and check. Please confirm if you see the same behavior as I described above. If this is so then Scenario 1) and 3) are expected for sure and I will take the time to investigate further Scenario 2. I will then update you with my findings.
Looking forward to hearing from you.
First issue I see with your example is the check boxes aren't rendering for the row selectors. Until that shows up I can't get the iggridrowselectorscheckboxstatechanged event to fire.
IE 11