UltraGrid PerformAction question

Posted by rogerholmes on 08-Feb-2011 09:48

In my UltraGrid, I wish to enable/disable certain cells for update on a given row, depending on the value entered in another cell on that row: this I have achieved by placing code in the AfterCellUpdate event as follows:

ultragrid1:ActiveRow:Cells:Item["MySecondField"]:Activation = if CanEdit then  Infragistics.Win.UltraWinGrid.Activation:AllowEdit else Infragistics.Win.UltraWinGrid.Activation:NoEdit.

So far, so good. But of course it only triggers when I change the value in the first cell, where I really want every cell in the relevant columns in my grid to be enabled/disabled when the form launches. I think that the correct approach may be to do a PerformAction, but I don't know (or where) how to loop through each row, or even if this is the correct approach?? Any pointers would be greatly appreciated.

Roger

All Replies

Posted by danielStafford on 08-Feb-2011 14:29

Have you looked at the InitializeRow event of the UltraGrid?

This will allow you to set your properties prior to the row being rendered.

Posted by jquerijero on 16-Feb-2011 09:34

Daniel is correct. Use InitializeRow.

Posted by rogerholmes on 17-Feb-2011 04:17

Brilliant, thanks.

Roger

This thread is closed