Suchacoolguy
Suchacoolguy
CC#
Created by Suchacoolguy on 4/27/2025 in #help
✅ enable single-click cell editing in Avalonia DataGrid
hey, Thanks for the comment! It works perfectly now. :blushowo:
private void Table_OnCellPointerPressed(object? sender, DataGridCellPointerPressedEventArgs e)
{
if (e.Column is DataGridTextColumn col &&
col.Tag?.ToString() == "SplitLength")
{
var grid = this.FindControl<DataGrid>("Table");
if (grid == null) return;

grid.SelectedItem = e.Row.DataContext;

grid.CurrentColumn = e.Column;

e.Cell.Focus();

grid.BeginEdit();

e.PointerPressedEventArgs.Handled = true;
}
}
private void Table_OnCellPointerPressed(object? sender, DataGridCellPointerPressedEventArgs e)
{
if (e.Column is DataGridTextColumn col &&
col.Tag?.ToString() == "SplitLength")
{
var grid = this.FindControl<DataGrid>("Table");
if (grid == null) return;

grid.SelectedItem = e.Row.DataContext;

grid.CurrentColumn = e.Column;

e.Cell.Focus();

grid.BeginEdit();

e.PointerPressedEventArgs.Handled = true;
}
}
4 replies
CC#
Created by Suchacoolguy on 5/9/2024 in #help
Avalonia: how to get the data of a control where the sender belongs to?
but it doesn't get the grey rectangle when i specify the type Or name of it
14 replies
CC#
Created by Suchacoolguy on 5/9/2024 in #help
Avalonia: how to get the data of a control where the sender belongs to?
it's always null so i tried getting parent class without specifying the type. and it gets the border class which is the parent class right above it.
14 replies
CC#
Created by Suchacoolguy on 5/9/2024 in #help
Avalonia: how to get the data of a control where the sender belongs to?
but when i try, the rawMaterial variable in the event handler image always gets null...
14 replies
CC#
Created by Suchacoolguy on 5/9/2024 in #help
Avalonia: how to get the data of a control where the sender belongs to?
yes, and i need to select the grey rectangle class which the orange rectangle belonged to.
14 replies
CC#
Created by Suchacoolguy on 5/9/2024 in #help
Avalonia: how to get the data of a control where the sender belongs to?
No description
14 replies
CC#
Created by Suchacoolguy on 5/9/2024 in #help
Avalonia: how to get the data of a control where the sender belongs to?
Yes i am using Avalonia. but i don't understand what you mean by set a class. you mean oh okay. that's fine
14 replies
CC#
Created by Suchacoolguy on 4/15/2024 in #help
✅ how to create and insert images that represent program data into excel file
there is another program that takes my excel report as input. i thought about merging and deviding the cells to make it look like the image i attached, but i was worried that the other program might read it as a value if i do it and mark numbers(1, 2, 3, ... like the image shown) in the cells. that's why i tried to create images, but i will try using bar charts. thank you guys.
13 replies
CC#
Created by Suchacoolguy on 4/15/2024 in #help
✅ how to create and insert images that represent program data into excel file
Thank you. I am glad that there is a free library that i can use, but i don't see the right solution for me in the documentation... They provide a method to insert an existing image file, but what i find it challenging is to create images where the length and number of bars correspond to the data in my program. 😢
13 replies
CC#
Created by Suchacoolguy on 4/15/2024 in #help
✅ how to create and insert images that represent program data into excel file
I will look through it, thank you 🙂
13 replies