Archive for the ‘Uncategorized’ Category

WPF Datagrid IsReadOnly

Saturday, April 3rd, 2010

I have datagrids (from the WPF toolkit) that are read only. Nevertheless, once in a while certain dataset (ADO.NET) columns were producing the following error:
“A TwoWay or OneWayToSource binding cannot work on the read-only property …”
even if the corresponding binding used the OneTime or OneWay mode.
This was happening for each expression column in my dataset tables.

What I learned:
1. There is a bug in the WPF toolkit (don’t know whether it’s removed in VS 2010), that sets the binding as TwoWay even if it is explicitly defined as OneWay/OneTime.
2. To avoid the problem one simply needs to specify IsReadOnly=”True” for all expression columns.

PS. Same error occurs if the column is created using calculations in the SELECT statement.

Windows Presentation Foundation

Thursday, March 4th, 2010

I have completed my long WPF project. Well, it was quite an experience. I guess, now I can modestly call myself a WPF Architect. :) I’ll try to summarize this experience and soon come up with a few blog posts about WPF problems I ran across.

The most annoying feature of Visual Studio

Sunday, February 28th, 2010

When I perform a search in my project files (entire project), the Visual Studio first searches in the open documents, then opens one more document with the search string, and stops! Why on Earth it is doing it? When I start the search again, it searches all open files again (including the last open file), opens one more file and stops.

But even more annoying is the fact that, in the debugging mode, VS just keeps cycling through the open files even if I asked it to search in the entire project.

After several years I cannot get used to this feature… or should I say “bug”?