I have a fixed add row on the top of the grid. In the initializerow event, I would like to know whether I am in the fixed add row or a regular row in the grid, so I can disable cell activation on a cellbutton column. Checking isTemplateAddRow always returns false, and checking the index property (for index > 0) doesn't seem to work either. Is there a way to do this?
Thanks,
Bob
Inside the InitializeRow event, you can add code similar to the following:
if ( !e.Row.IsAddRow ) { e.Row.Cells["Code"].Activation = Activation.Disabled; }
Hope this helps.
Chris
Thanks. Unfortunately I failed to mention in my initial post that I had already tried what you suggested and it doesn't work. It seems like the logical thing to do, but maybe it doesn't work with FixedAddRowOnTop.