Sharepoint WebPart를 만들었으며 그리드가 포함 된 사용자 지정 ToolPart를 제공했습니다 (정확히 말하면 Telerik RadGrid는 관련성이 없음). 나는 그리드를 채워, 그리드에 추가 할 GridButtonColumn 객체를 만들었습니다Sharepoint Toolpart 이벤트가 실행되지 않음
protected override void CreateChildControls()
{
GridButtonColumn c = new GridButtonColumn();
c.ConfirmText = "Really Delete?";
c.ConfirmDialogType = GridConfirmDialogType.RadWindow;
c.ConfirmTitle = "Delete";
c.ButtonType = GridButtonColumnType.LinkButton;
c.Text = "Delete";
c.UniqueName = "DeleteColumn";
grid.Columns.Add(c);
// ...
grid.DeleteCommand += new GridCommandEventHandler(Grid_DeleteCommand);
}
그리드는 제대로 렌더링 - 데이터 및 삭제 버튼 존재로 채워.
이제 삭제 버튼 중 하나를 클릭하면 Grid_DeleteCommand()
이벤트가 발생하지 않습니다.
Button b = new Button();
b.Text = "Hello World";
b.Click += new EventHandler(Button_Click);
내가 셰어 (의 설치에 디버깅 할 수없는거야 아니면 내가 할 수있는,하지만 프로세스 hasn에 부착 : 나는 그리드 이외의 임의의 버튼을 추가 할 때, 그것의 클릭 이벤트가 트리거됩니다 아직 그렇게 할 수 없기 때문에), 그 두 가지 사건의 방법은 단순히 Google로 리디렉션하는 것입니다. 그게 내가 확인하는 방법입니다 이벤트 화재의 경우 :
나는 둘 사이에 볼 수있는 유일한 차이점은 '삭제'버튼을, 그것이 가진 반면, Grid 컨트롤의 안에 중첩되어 있다는 점이다string AbsoluteUri ="http://www.google.com";
Page.Response.Redirect(AbsoluteUri);
'Hello World'버튼에는 중첩이 없습니다.
그리드에서 버튼을 클릭하면 어떻게하면 Grid_DeleteCommand
을 발사 할 수 있습니까?