Hey I just tried the
code and I have a little problem with it.
I rewrote the SetEnableValues method to:
if(this.dataGridSelection[e.Row,4].ToString() == "Y")
e.EnableValue = false;
e.EnableValue = true;
with this I check if column 5 is 'Y'.
This is what happens:
1. I select a row(#1) which is colored grey and is not editable due to your code.
2. I want to add a new row to the grid by using the last empty row(#lastRow+1) (The one that comes up if you set AllowNew = true).
3. To do that I click on the row and SetEnableValues gets called.
4. Here e.Row still is 1. And since in row one colmumn 5 is 'Y' e.EnableValue gets set to false.
I hope you can see the problem and I hope you might be able to help me...