Description:
I'm having trouble using binding in my TableViewTextColumn / TableViewNumberColumn. Apparently, the columns aren't inheriting the DataContext from the list that's set as the Item source.
I also notice, the TableViewNumberColumn isn't able to convert back double to int? but is able to convert int? to double since the data has been displayed properly, but when we setuo TwoWay mode, I receve a binding error on HotReolad report and the data wasn't update into the source.
Or am I doing something wrong in this process?
Steps to Reproduce:
-
New Blank Page
-
Create a viewmodel inheriting ObservableObeject (MVVMTookit)
-
Include a ObservableCollection and add the Tag [ObservableProperty] above the list / collection
-
Fill the list / Collection with any data
-
Bind this using x:Bind or Binding to the ItenSource ( all the same is happening in the both cases)
-
Use TableViewTextColumn / Number and try to bind the property / field inside of the list
-
You will notice the item will not have a suggestion to bind , you still can try by force use the name of the property (case sensitive, by the way) , but runing the application the data will be there.
-
if you like to test the int? to double converter, create a field with int? bind it to a collum and set Mode=TwoWay and the error will appear when you try to change the cell. In my Example I am using the property
public int? MinArea { get; set; } into the class CompoundInstrumentRanges I decide to use double to workaround this issue, but need to change the type of my property in UI sounds wrong
Expected behavior:
The expected behavior would be for the data grid components to inherit the data context from their parent. When the binding is called, I would have those fields that are within the list/observablecollection listed to be used.
Screenshots:
*My Page: with the binding context warning

VM definition:

List definition:
Class of List:
Binding Convert issue:
(No issue at the start)

(Errors after try to change the Min Area collum)
Environment:
- Package Version: 1.4.0
- WinAppSDK Version: 1.8.260317003
Description:
I'm having trouble using binding in my TableViewTextColumn / TableViewNumberColumn. Apparently, the columns aren't inheriting the DataContext from the list that's set as the Item source.
I also notice, the TableViewNumberColumn isn't able to convert back double to int? but is able to convert int? to double since the data has been displayed properly, but when we setuo TwoWay mode, I receve a binding error on HotReolad report and the data wasn't update into the source.
Or am I doing something wrong in this process?
Steps to Reproduce:
New Blank Page
Create a viewmodel inheriting ObservableObeject (MVVMTookit)
Include a ObservableCollection and add the Tag [ObservableProperty] above the list / collection
Fill the list / Collection with any data
Bind this using x:Bind or Binding to the ItenSource ( all the same is happening in the both cases)
Use TableViewTextColumn / Number and try to bind the property / field inside of the list
You will notice the item will not have a suggestion to bind , you still can try by force use the name of the property (case sensitive, by the way) , but runing the application the data will be there.
if you like to test the int? to double converter, create a field with int? bind it to a collum and set Mode=TwoWay and the error will appear when you try to change the cell. In my Example I am using the property
public int? MinArea { get; set; } into the class CompoundInstrumentRanges I decide to use double to workaround this issue, but need to change the type of my property in UI sounds wrong
Expected behavior:
The expected behavior would be for the data grid components to inherit the data context from their parent. When the binding is called, I would have those fields that are within the list/observablecollection listed to be used.
Screenshots:
*My Page: with the binding context warning

VM definition:

List definition:
Class of List:
Binding Convert issue:
(No issue at the start)

(Errors after try to change the Min Area collum)
Environment: