So I want to commit changes on cell end edit and after an hour of searching
I find I have to do this weird code with a guard bool around it because it's
recursive.
private void gridCust_CellEditEnding(object sender,
DataGridCellEditEndingEventArgs e)
{
if (!isManualEdit)
{
isManualEdit = true;
gridCust.CommitEdit(DataGridEditingUnit.Row, true);
isManualEdit = false;
isEditing = false;
}
}
I want the Delete KeyUp to prompt delete the selected rows. However, when I
hit the Delete key in a cell in edit mode it fires my delete prompt. So I
put a guard bool 'isEditing' between Beginning Edit and CellEditEnding
events so I can manually skip Delete processing while in cell edit mode.
I want double-clicks anywhere on a row to launch some edit processing of the
bound item. A double-click on an editable cell makes it enter edit mode
before my double-click code runs. So now a double-click is always swallowed
because I go into cell edit mode.
The WPF DataGrid is the most incomprehensible, time-wasting, frustrating and
quirk riddled control I have ever had the misfortune to encounter since .NET
was invented. These are just behavioural quirks, don't mention the styling
horrors. Last year it took me almost 3 weeks of hobby time programming to
figure out how to manually change the background colour of cells, and then
it still had a bug I found later. I find I am continuously "fighting" the
binding to get simple effects I want that are absolutely trivial in the
WinForms DataGridView control. I've spent over an hour this afternoon trying
to find a simple example of how to validate that a column value is not null,
but all the samples are different, some have triggers, some have validators,
they are all different, dense and indigestible. My simplest demands of the
DataGrid usually result in dozens (or hundreds) of lines of cryptic binding
and converter code that I have to find in web searches and then paste and
tweak to get working.
Several times this year I have given up on using a DataGrid in WPF apps and
resorted to embedding a DataGridView in a host to get products finished on
time. I estimate that creating a moderately well-featured grid working in
WPF takes 10 to 50 times longer that it does in WinForms. It could possibly
send me broke.
No response necessary. I'm just angry and I don't have a shoulder to cry on.
Greg
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf