Dear Sir,
I had use the aps page to display header information by radgrid and there is linkbutton for the one for the field, when user click the the linkbutton, the detail page related to the number , the radwindow will be prompt . In side the radwindow there are such header information and radgird to show information. All controls are read only in the readwindow.
This is the .aspx for the GridtemplateColumn of the link button
This the above .aspx code-behind to show the radwindow :
There is the function of RadWindow_Popup.
For the radwindow with the js to show on screen
Now, the problem is Label A - L can display the variables, radgrid cannot bind any data to the grid, it is ensured that the list and the datatable with record , please help
I had use the aps page to display header information by radgrid and there is linkbutton for the one for the field, when user click the the linkbutton, the detail page related to the number , the radwindow will be prompt . In side the radwindow there are such header information and radgird to show information. All controls are read only in the readwindow.
This is the .aspx for the GridtemplateColumn of the link button
<telerik:GridTemplateColumn HeaderText="Document No" UniqueName="grvDocument <ItemTemplate> <asp:LinkButton ID="LnkEACCAPV_DOCNO" runat="server" CommandArgument=" <%#Container.ItemIndex%>" CommandName="ViewDocNo" Text='<%# Bind("EACCAPV_DOCNO") %>'> </asp:LinkButton> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="135px" /> <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="135px" /></telerik:GridTemplateColumn>This the above .aspx code-behind to show the radwindow :
Public Class EPAJournalDetail_Popup
Inherits System.Web.UI.UserControlPrivate Sub rgdEJL_Generation_ItemCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs) Handles rgdEJL_Generation.ItemCommand If e.CommandName = "ViewJNLNo" Then Dim item As GridDataItem = DirectCast(e.Item, GridDataItem) Dim row As DataRowView = DirectCast(item.DataItem, DataRowView) Session("A") = item.GetDataKeyValue("A") Session("B") = item.GetDataKeyValue("B").ToString() Session("C") = item.GetDataKeyValue("C").ToString() Dim dt As DataTable = EEPA.GetJNL_HR(Session("A"), Session("B"), Session("C")) ''<--Dtatatable for radwindow's Header inforamtion If dt.Rows.Count > 0 Then ' Dim dr As DataRow = dt.Rows(0) Session("D") = dr("D") Session("E") = dr("E") Session("F") = dr("F") Session("G") = dr("G") Session("H") = dr("H") Session("I") = dr("I") Session("J") = dr("J") Session("K") = dr("K") Session("L") = dr("L") Session("DT_DETAIL") = EEPA.GetJNL_DETAIL(Session("A"), Session("B"), Session("C"), Session("F"), "N") '<--For radindow's radgrid databind End If RadWindow_Popup.ShowDialog(A,B,C,D,E,F,G,H,I,J ,K,L) End If end end sub
Public Class RadWindow_Popup
Inherits System.Web.UI.UserControl
Public Sub ShowDialog(A As String, B As String, C As String, D As String, E As String, _ F As String, G As String, H As String, I As String, _ J As String, K As String, L As String) Me.GetAjaxManager().ResponseScripts.Add("showDialog_" & Me.ClientID & "(""" & A & """,""" & _ B & """,""" & C & """,""" & _ D & """,""" & E & """,""" & _ F & """,""" & G & """,""" & _ H & """,""" & I & """,""" & _ J & """,""" & K & """,""" & L & """);") If IsNothing(lstJNL) = False Then lstJNL.Clear() 'Public customer list End If lstJNL = GetData(DirectCast(Session("DT_DETAIL"), DataTable)) 'Convert the Session to datatable rdgd.DataSource = lstJNL 'bind go the gridend sub Public Sub rdgd_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rdgd.NeedDataSource TryCast(sender, RadGrid).DataSource = lstJNL End SubFor the radwindow with the js to show on screen
<script type="text/javascript"> function showDialog_<%= ClientID %> (A, B, C, D, E, F, G, H, I, J,K, L) { document.getElementById('<%= lblA.ClientID %>').innerHTML =A; document.getElementById('<%= lblB.ClientID %>').innerHTML =B; document.getElementById('<%= lblC.ClientID %>').innerHTML =C; document.getElementById('<%= lblD.ClientID %>').innerHTML =D; document.getElementById('<%= lblE.ClientID %>').innerHTML =E; document.getElementById('<%= lblF.ClientID %>').innerHTML =F; document.getElementById('<%= lblG.ClientID %>').innerHTML =G; document.getElementById('<%= lblH.ClientID %>').innerHTML =H; document.getElementById('<%= lblI.ClientID %>').innerHTML =I; document.getElementById('<%= lblJ.ClientID %>').innerHTML =J; document.getElementById('<%= lblK.ClientID %>').innerHTML =K; document.getElementById('<%= lblL.ClientID %>').innerHTML =L; $find(" rdgd").get_masterTableView().rebind(); //Sometime got null reference error var wnd = $find("<%= RadWindow_Popup.ClientID %>"); wnd.show(); }