2013-04-01 3 views
0

상단에있는 빈 행에 정보를 입력하여 행을 추가 할 수있는 UltraGrid이 있습니다. 나는 (회색 라인의 끝에서)이 같은 끝에있는 버튼이 표시되지 않도록 행을 수정할 :이 행 만 수정하는 경우UltraGrid 새 행 열 수정

enter image description here

내가 찾을 수 없습니다 . 어떤 아이디어?

+1

이 답변을 고려해 볼 수 있을지 모르겠으므로 댓글로 게시합니다. 너는 말해. TemplateAddRow를 사용자 정의하기 위해 설계된 InitializeTemplateAddRow라는 이벤트가 있습니다 (이것은 해당 행의 이름입니다). 셀에 Hidden 속성이 있음에도 불구하고 전체 열을 숨기지 않고 TemplateAddRow의 특정 셀을 숨길 수는 없었지만 'e.TemplateAddRow.Cells [ "Key"]. Activation = Activation.Disabled; ' – Steve

+0

@Steve 완벽하게 작동합니다. 수락 할 수 있도록 답으로 넣을 수 있습니까? – phadaphunk

답변

2

TemplateAddRow (이 행의 이름)을 사용자 정의하기 위해 설계된 InitializeTemplateAddRow이라는 이벤트가 있습니다.

: 셀이 나는 또한 전체 열을 숨김없이 TemplateAddRow의 특정 셀을 숨길 수 없었던 Hidden 속성을 가지고 있지만 쉽게 이벤트 핸들러 내부 코드와 특정 셀을 비활성화 할 수 있다는 사실에도 불구하고
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