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

fix the empty cell value edit crash #276

Merged
merged 2 commits into from
Aug 13, 2024
Merged

Conversation

startewho
Copy link
Contributor

@startewho startewho commented Mar 18, 2024

when i set a TextColumn like this:

   new TextColumn<Country, int>("GDP", x => x.GDP,(x,n)=>{ }, new GridLength(3, GridUnitType.Star), new()

and i edit the GDP value by empty string,like backspace the value.and then enter

the app crash,the reason is that

System.FormatException: The input string '' was not in a correct format.
11:20:17:288	   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
11:20:17:288	   at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
11:20:17:288	   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
11:20:17:288	   at Avalonia.Controls.Models.TreeDataGrid.TextCell`1.set_Text(String value) in /_/src/Avalonia.Controls.TreeDataGrid/Models/TreeDataGrid/TextCell.cs:line 52

@startewho startewho changed the title fix the empty cell value crash fix the empty cell value edit crash Mar 18, 2024
@startewho
Copy link
Contributor Author

will the fix be merged soon, we have a product depend it.

@MikeCodesDotNET
Copy link
Member

will the fix be merged soon, we have a product depend it.

To be transparent, we only review and merge pull requests for this repository from paying customers, as outlined here.

If you're a customer, please contact us directly for the fastest support.

If not, given your product depends on Avalonia, you should consider one of our support agreements. This ensures timely fixes and helps us maintain the project. Would you like to explore becoming a customer?

@maxkatz6 maxkatz6 merged commit 38dce08 into AvaloniaUI:master Aug 13, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants