Category: C# Blogs

TextChanged vs. SelectionChange events in WPF

Benjamin Perkins C#

I made the mistake of using the SelectionChange event on a textbox while implementing some filtering on a DataGrid. What happened, when using SelectionChanged, was that each time the textbox received focus I was executing the filter. Even initially when there was nothing to filter. My logic was checking if the contents of the textbox […]

Read More →

Adding images to a Tree View in WPF using C#

Benjamin Perkins C#

Like I’ve said before, once you find what your looking for, it is wasy to find examples about how to use and implement it. I had this again while trying to add images to a treeview. The term I was looking for, while trying to find a solution was ValueConverter. In this solution I will […]

Read More →

WPF DataGrid rendering is very slow

Benjamin Perkins C#

I was developing a WPF application that contained a DataGrid like so many times in the past. However, this time it was taking 20-30 seconds for the DataGrid to render. I checked the query execution speed. I was building the DataTable dynamically, but I checked the speed of that too and it was fast as […]

Read More →

NHibernate could not execute query, ORA-00904 invalid identifier

NHibernate Benjamin Perkins

This is a pretty easy one to solve. This happens because the column attribute in the mapping file does not exist on the database being accessed. <property  name=”SpelledWrong”               column=”SPELLDWRONG”               type=”string” />     More than likely there is a spelling mistake or the column doesn’t exist on the table being mapped.

Read More →