webgridview1 からセル データを取得し、それを使用して webgridview2 に情報を渡すセッション パラメータがあります。セッションは適切に更新されていますが、リロード ボタンを手動でクリックするまで、2 番目の webgridview は読み込まれません。
Public Sub WebDataGrid1_CellSelectionChanged(sender As Object, e As Infragistics.Web.UI.GridControls.SelectedCellEventArgs) Handles WebDataGrid1.CellSelectionChanged
Dim pressName = e.CurrentSelectedCells(0).Text
Session("PressName") = pressName
UpdatePanel1.Update()
End Sub
updatepanel を試しましたが、どちらも機能していません。
Response.Redirect で、グリッドビューがなくなった空のページが表示
される
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Width="400px"
AutoGenerateColumns="False" DataSourceID="SqlDataPressNames">
<Columns>
<ig:BoundDataField DataFieldName="RecordNumber" Hidden="True"
Key="RecordNumber">
<Header Text="RecordNumber" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="PressName" Key="PressName">
<Header Text="PressName" />
</ig:BoundDataField>
<ig:BoundCheckBoxField DataFieldName="PressActive" Key="PressActive" >
<Header Text="PressActive" />
</ig:BoundCheckBoxField>
</Columns>
<Behaviors>
<ig:Selection>
<AutoPostBackFlags CellSelectionChanged="True" />
</ig:Selection>
</Behaviors>
</ig:WebDataGrid>
<asp:SqlDataSource ID="SqlDataPressNames" runat="server"
ConnectionString="<%$ ConnectionStrings:masterConnectionString %>"
SelectCommand="SELECT [RecordNumber], [PressName], [PressActive] FROM [PressInfoNew] ORDER BY [PressName]">
</asp:SqlDataSource>
<ig:WebDataGrid ID="WebDataGrid2" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataPressInfo" Width="400px">
<Columns>
<ig:BoundDataField DataFieldName="PressName" Key="PressName">
<Header Text="PressName" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="MinWidth" Key="MinWidth">
<Header Text="MinWidth" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="MinHeight" Key="MinHeight">
<Header Text="MinHeight" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="MaxWidth" Key="MaxWidth">
<Header Text="MaxWidth" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="MaxHeight" Key="MaxHeight">
<Header Text="MaxHeight" />
</ig:BoundDataField>
</Columns>
</ig:WebDataGrid>
<asp:SqlDataSource ID="SqlDataPressInfo" runat="server"
ConnectionString="<%$ ConnectionStrings:masterConnectionString %>"
SelectCommand="SELECT [PressName], [MinWidth], [MinHeight], [MaxWidth], [MaxHeight] FROM [PressInfoNew] WHERE ([PressName] = @PressName) ORDER BY [PressName]">
<SelectParameters>
<asp:SessionParameter Name="PressName" SessionField="PressName" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>