Question: Have a WPF Datagrid binded to a observablecollection, that it is getting populated from the database, which can be editable or non editable based on a value of a column value. 

Now, would like to add a new row in the datagrid through a context menu click which is editable, although already existing rows would be non-editable (i.e., disabled).

Well this can be achievable using a data trigger on the column value and defining a converter on the binded value i.e., selectedItem to the row. Now, problem is when I add new row, my command param passed is the selectedItem i.e.,

Menu Item Code:

```
MenuItem Header="Add" Command="{Binding AddClickCommand}"
                          CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContextMenu}}, Path=PlacementTarget.SelectedItem}"

```

So, this is the existing row (i.e., row 1) on which I clicked to add new row(row 2), so, I get the context of the existing row (i.e., row 1).

Can anybody help me get the context of the new row added i.e., row 2 through which I can set the certain flags to enable that row as editable!

Answer: 
I have solved the issue, actually mysql search(select) queries are case insenstive by default.

Thanks for your feed back.
When you add `ignorecase()` then hibernate tries to convert the value to lower case and do the comparision like this:

```
lower(this_.channelCode)<>'JAVA'

```

So this should work without any issues.