No edit summary |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<message>Write the content here to display this box</message> | <message>Write the content here to display this box</message> | ||
[[ | [[Documentation:ViewModel|ViewModels]] create and maintain vCurrent_ and vSelected_ variables for each level of your ViewModel-nestings. | ||
The values maintained by the Framework reflect what the user has focused on/clicked last (vCurrent_), and when you allow multi-select in grids, the vSelected_ collection is maintained. | The values maintained by the Framework reflect what the user has focused on/clicked last (vCurrent_), and when you allow multi-select in grids, the vSelected_ collection is maintained. | ||
Line 6: | Line 6: | ||
The variables are strongly typed to match your [[Documentation:Nestings|nestings]] and get the postfix name from the nesting. | The variables are strongly typed to match your [[Documentation:Nestings|nestings]] and get the postfix name from the nesting. | ||
See this article for a fuller discussion on [[Cursored or Full Tree|how to cursor your ViewModel]]. | See this article for a fuller discussion on [[Documentation:Cursored or Full Tree|how to cursor your ViewModel]]. | ||
See also: [[ | See also: [[Documentation:How to use vCurrent and “self” correctly in viewmodels|How to use vCurrent and “self” correctly in viewmodels]] | ||
===== Auto select first row ===== | ===== Auto select first row ===== | ||
In WebUI DataGrids we AutoSelectFirstRow if the list has not set MultiSelect, | In WebUI DataGrids, we AutoSelectFirstRow if the list has not set MultiSelect. If you, however, do use MultiSelect, the default is to not AutoSelectFirstRow. This behavior can be controlled by explicitly setting Nesting.AutoSelectFirstRow to true or false. | ||
==== Update vSelected maintaince in Turnkey ==== | ==== Update vSelected maintaince in Turnkey ==== | ||
Line 26: | Line 26: | ||
</html> | </html> | ||
{{Edited|July|12| | {{Edited|July|12|2025}} | ||
[[Category:View Model]] |
Latest revision as of 05:33, 17 March 2025
ViewModels create and maintain vCurrent_ and vSelected_ variables for each level of your ViewModel-nestings.
The values maintained by the Framework reflect what the user has focused on/clicked last (vCurrent_), and when you allow multi-select in grids, the vSelected_ collection is maintained.
The variables are strongly typed to match your nestings and get the postfix name from the nesting.
See this article for a fuller discussion on how to cursor your ViewModel.
See also: How to use vCurrent and “self” correctly in viewmodels
Auto select first row
In WebUI DataGrids, we AutoSelectFirstRow if the list has not set MultiSelect. If you, however, do use MultiSelect, the default is to not AutoSelectFirstRow. This behavior can be controlled by explicitly setting Nesting.AutoSelectFirstRow to true or false.
Update vSelected maintaince in Turnkey
Complex issue with vSelected in Turnkey: when you have not checked the SelectedBox - you may want the vCurrent to be part of the vSelected - but then, you want it removed from vSelected if the only reason for being in vSelected was that it was vCurrent.
This issue is not complex in WPF because there is a natural difference between the focused and selected. UI controls automatically include the focused in the selected collection - but, on the web, we have the extra checkbox and we must know the reason for being in vSelected. Is it only because we were vCurrent before - and thus should we be removed from vSelected?