我有一个UltraGrid
您可以通过在顶部的空白行中填写信息来添加一行。我想修改该行,以便在末尾看不到这样的按钮(在灰线的末尾):
我找不到只在哪里修改这一行。任何的想法 ?
我有一个UltraGrid
您可以通过在顶部的空白行中填写信息来添加一行。我想修改该行,以便在末尾看不到这样的按钮(在灰线的末尾):
我找不到只在哪里修改这一行。任何的想法 ?
有一个名为的事件InitializeTemplateAddRow
旨在自定义TemplateAddRow
(这是该行的名称)。
尽管单元格具有Hidden
属性,但我无法隐藏 TemplateAddRow 的特定单元格而不隐藏整个列,但是您可以使用事件处理程序中的此代码轻松禁用特定单元格:
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