은 패널과 jqgrid를 함께 업데이트 할 수 있습니까? jqgrid를 사용 중이고 페이지 새로 고침을 제어하려고합니다. 그래서 업데이트 패널을 추가했지만 작동하지 않습니다.Updatepanel 및 jqgrid
0
A
답변
1
UpdatePanels가 지원됩니다. UpdatePanel 안의 jqGrid 인스턴스를 시작점으로 포함하는 Master -> Detail 예제를 온라인으로 사용할 수 있습니다 : MasterDetail jqgrid inside an update panel
1
이와 같이 부분적인 포스트 백 이후에 jqgrid를 다시 인스턴스화해야합니다.
<script type="text/javascript">
//Calls the function to load the for the first time
LoadGrid();
**var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(InitializeRequest);
prm.add_endRequest(EndRequest);
function InitializeRequest(sender, args) {
}
// fires after the partial update of UpdatePanel
function EndRequest(sender, args) {
//Calls the function again to load the grid after partial postback
LoadGrid();
}**
function LoadGrid() {
jQuery("#jqGrid").jqGrid({
url: '/GridHandler.ashx',
datatype: "json",
colNames: ['Id', 'Village Name', 'Village Area'],
colModel: [
{ name: 'Id', index: 'Id', width: 30, sorttype: 'int', sortable: true },
{ name: 'VillageName', index: 'VillageName', width: 170, sorttype: 'text', sortable: true },
{
name: 'VillageArea', index: 'VillageArea', width: 70, align: "right", sorttype: 'int',
sortable: true, formatter: 'integer', formatoptions: { thousandsSeparator: "," }
},
],
//pager: "#pager",
rowNum: 1000,
height: 441,
width: 288,
loadonce: true,
sortname: 'Id',
viewrecords: true,
sortorder: "asc",
caption: "List of Villages",
shrinkToFit: 'false',
onSelectRow: function() {
//Gets the Id of selected row
var sel_id = $('#jqGrid').jqGrid('getGridParam', 'selrow');
var selectedVillage = $('#jqGrid').jqGrid('getCell', sel_id, 'VillageName');
$.ajax({
type: "POST",
async: false,
url: "HomeModified.aspx/GridRowSelect",
data: "{'village':'" + selectedVillage + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (result) {
GenerateMap();
},
error: function (result) {
alert("There is an error in generating map");
}
});
function GenerateMap() {
document.getElementById("<%=hiddenButton.ClientID %>").click();
$('#jqGrid').jqGrid('setGridParam', { url: '/GridHandler.ashx', datatype: 'json' }).trigger('reloadGrid', [{ current: true }]);
}
}
});
}
</script>
관련 문제
- 1. UpdatePanel 및 UpdatePanelAnimationExtender 문제
- 2. UpdatePanel 및 ModalPopup Extender를
- 3. 버튼, UpdatePanel 및 MasterPage
- 4. updatepanel 및 하이퍼 링크
- 5. 제어 재사용 및 UpdatePanel
- 6. ASP.NET GridView 및 UpdatePanel
- 7. UpdatePanel, 타이머 및 TexBox 문제
- 8. history.go (-1) 및 UpdatePanel 문제
- 9. dropdownlist updateprogress 및 updatepanel 문제
- 10. updatepanel 및 javascript 포함 파일
- 11. Formview 및 MS-Ajax UpdatePanel
- 12. jqGrid 및 CodeIgniter 문제
- 13. JQGrid 및 CakePHP
- 14. jqGrid 및 POST 동사
- 15. jqGrid 및 jQuery.get()
- 16. jQGrid 및 jquery 툴팁 도구
- 17. jqgrid 정렬 및 페이징 문제
- 18. JQGrid 값 및 텍스트 열
- 19. jqGrid 3.8.2 및 508 준수
- 20. 있는 jqGrid 및 동적 그룹화
- 21. jqGrid 및 Google Chart API
- 22. JQGrid 캡션 및 열 이름을
- 23. ASP.Net MVC 부분보기 및 jqGrid
- 24. jqgrid 편집, 저장 및 숨기기
- 25. UpdatePanel -이 동적으로 UpdatePanel 문제를 만든
- 26. jqgrid 및 flexigrid에 대한 자습서 및 리소스
- 27. jqGrid?
- 28. UpdatePanel Question
- 29. 하위 UpdatePanel 및 부모 UpdateProgress 문제
- 30. .NET UpdatePanel 및 FaceBook/Twitter 버튼
업데이트 링크를 제공 할 수 있습니까?이 링크는 더 이상 작동하지 않습니다. –