Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cell selection and manipulation #90

Open
arthurits opened this issue Jan 3, 2025 · 1 comment
Open

Cell selection and manipulation #90

arthurits opened this issue Jan 3, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@arthurits
Copy link

First of all, thanks for this great control. 👍

Describe the solution you'd like
Not sure if there's an actual workaround, but it would be great to be able to:

  • Retrieve the XAML control whenever any cell's value is updated. This would make sense in order to somehow highlight the cell (control border of background) if the value entered is out of bounds.
  • Retrieve the row where the cell's value has been updated. Use-case example: user updates some cell's value and, depending on the value entered, other cells in the same row need to be automatically updated (or recalculated, or disabled)

For instance, take this table as an example:
image
The 1st and 2nd columns are ComboBox columns and all the remaining are Numeric columns.
Depending on the value selected by the user in the 1st column, some data cells are not needed (they are shown with 0 value). It would be nice to be able to provide some event in the TableView to access the row's controls and set the values from the view.
Also, the numeric cells have valid ranges, and after each user input, it would be nice to check the value and mark the cell if the value is out of bounds. IT would be nice to be able to do this from the view.

Describe alternatives you've considered
Some workaround can be achieved by checking the values in the ViewModel.
Also, the LostFocus event makes possible some handling, but the event's function arguments object sender and RoutedEventArgs e don't seem to provide information about the row that has been interacted with.

Just my two cents for your consideration for future versions of the control.

PS: just another two features come to mind: adding row headers and transposing the view (same binding to the list, but the control is drawn with the columns as rows and the rows —cases— as columns).

@arthurits arthurits added the enhancement New feature or request label Jan 3, 2025
@lostluna1
Copy link

I think you can use ViewModel, and instead of relying on UI to calculate them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants