There is an event called InitializeTemplateAddRow
that is designed to customize the TemplateAddRow
(this is the name of that row).
Despite the fact that a cell has a Hidden
property I was not able to hide a particular cell of the TemplateAddRow without also hiding the whole column, but you could easily disable a particular cell with this code inside the event handler:
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Private Sub UltraGrid1_InitializeTemplateAddRow(ByVal sender As Object, _
ByVal e As Infragistics.Win.UltraWinGrid.InitializeTemplateAddRowEventArgs) _
Handles UltraGrid1.InitializeTemplateAddRow
' Initialize the template add-row. You can set the default values for the cells
' in the add-row. When the user adds a new row through the template add-row, the
' new row will be initialized with these default values.
' e.TemplateAddRow.Cells(0).Value = -1
' or totally disable the cells that that you don't want to use (e.g buttons like cells)
e.TemplateAddRow.Cells["Key"].Activation = Activation.Disabled
End Sub