Avalonia.Controls.TreeDataGrid icon indicating copy to clipboard operation
Avalonia.Controls.TreeDataGrid copied to clipboard

fix the empty cell value edit crash

Open startewho opened this issue 1 year ago • 2 comments

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 avatar Mar 18 '24 03:03 startewho

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

startewho avatar Apr 04 '24 02:04 startewho

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?

MikeCodesDotNET avatar Apr 04 '24 06:04 MikeCodesDotNET