0
グルーピング行を含むグリッドビューのページがあります。 2番目のグリッドビューでajax経由で情報を更新すると、プラス、マイナスのボタンをクリックすると情報が更新されます。 プラスマイナスをクリックせずに2番目のグリッド内のデータを更新する方法はありますか?ボタングルーピング行のあるページ
グリッドビューを別のグリッドビューで表示して閉じるコードです。 JS、負荷の 経由
$('.glyphicon-plus').click(function (event) {
if ($(this).hasClass("glyphicon-plus"))
$(this).closest("tr").after("<tr><td></td><td colspan = '999'>" + $(this).next().html() + "</td></tr>");
else
$(this).closest("tr").next().remove();
$(this).toggleClass('glyphicon-plus glyphicon-minus');});
コードGridViewの
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" Style="display: none" Visible="true"><ContentTemplate><asp:GridView ID="grdId" runat="server" AutoGenerateColumns="false" CssClass = "ChildGrid" Width="100%" OnRowDataBound="grdId_RowDataBound" HeaderStyle-HorizontalAlign="Center"><Columns></Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
Ajaxの方法
var thisCell=this.value;var id=this.id; $.ajax({type: \"POST\",url: \"myPage.aspx/myMethod\",data: '{value:\"'+comment+'\",id:\"'+id+'\"}',
contentType: \"application/json; charset=utf-8\",
dataType: \"json\",success: function(response) {}});