check box selection in data grid is wrong
Posted: Fri Mar 07, 2014 6:00 pm
Hello,
I have a strange problem with toggling of checkboxes in a data grid but only in a specific view. This is different from what I posted previously (different from this one: 'check box selection in data grid and on a separate card').
In the attached stack each text line is assigned to a category; Short, Medium or Long.
You can select its checkbox and also view the entire text line in 1-line view by clicking on the line.
Toggling the checkboxes in All Lines view and My Categories view and their corresponding 1-line views is working properly. But not in My Categories view and its 1-line view.
Follow these steps to see how it works and how it does not work:
1. In the Categories select Long and Short
2. Click on All Lines button
3. Select for example the checkboxes for these lines: 4, 6, 8, 12, 13, 14, 17
4. When you click on line 4 in All Lines view you'll go to 1-line view. In that view you can toggle the checkbox selection and the corresponding checkbox in All Line view will be toggled and it's working properly. You can see the Index and the Line nr in All Line view are the same.
5. Similarly the toggling of the checkbox between My Selection view and its 1-line view works OK. Here the Index and the Line nr will be different and this is how it should be since Line nr is counted from the top of the grid display.
6. But when you click on button My Categories the toggling of the checkbox does not work properly. In this display the Index and the Line nr are the same and I think it's wrong.
I figured out the faulty pattern of the checkbox selections in My Categories. Follow these steps assuming that you selected these lines: 4, 6, 8, 12, 13, 14, 17
1.in My Categories view click on line nr 13 (8th from top) to view it in 1-line view - it will show Index nr 8 (wrong)
2. still in 1-line view select the checkbox Toggle Selection
3. go back to My Categories and line nr 8 (4th from the top) will have its checkbox selected! To get this checkbox unselected click on line nr 13 again and unselect the checkbox there.
So it's clear that the index numbers and line numbers are messed up in My Categories view, but NOT in All Lines and My Selection views, which is very strange since the code in the Row Behavior of the data grid and the code in the Line field of Row Template is the same for all views.
Where is the fault in the code?
I'll appreciate any help.
keram
I have a strange problem with toggling of checkboxes in a data grid but only in a specific view. This is different from what I posted previously (different from this one: 'check box selection in data grid and on a separate card').
In the attached stack each text line is assigned to a category; Short, Medium or Long.
You can select its checkbox and also view the entire text line in 1-line view by clicking on the line.
Toggling the checkboxes in All Lines view and My Categories view and their corresponding 1-line views is working properly. But not in My Categories view and its 1-line view.
Follow these steps to see how it works and how it does not work:
1. In the Categories select Long and Short
2. Click on All Lines button
3. Select for example the checkboxes for these lines: 4, 6, 8, 12, 13, 14, 17
4. When you click on line 4 in All Lines view you'll go to 1-line view. In that view you can toggle the checkbox selection and the corresponding checkbox in All Line view will be toggled and it's working properly. You can see the Index and the Line nr in All Line view are the same.
5. Similarly the toggling of the checkbox between My Selection view and its 1-line view works OK. Here the Index and the Line nr will be different and this is how it should be since Line nr is counted from the top of the grid display.
6. But when you click on button My Categories the toggling of the checkbox does not work properly. In this display the Index and the Line nr are the same and I think it's wrong.
I figured out the faulty pattern of the checkbox selections in My Categories. Follow these steps assuming that you selected these lines: 4, 6, 8, 12, 13, 14, 17
1.in My Categories view click on line nr 13 (8th from top) to view it in 1-line view - it will show Index nr 8 (wrong)
2. still in 1-line view select the checkbox Toggle Selection
3. go back to My Categories and line nr 8 (4th from the top) will have its checkbox selected! To get this checkbox unselected click on line nr 13 again and unselect the checkbox there.
So it's clear that the index numbers and line numbers are messed up in My Categories view, but NOT in All Lines and My Selection views, which is very strange since the code in the Row Behavior of the data grid and the code in the Line field of Row Template is the same for all views.
Where is the fault in the code?
I'll appreciate any help.
keram