or
<telerik:GridButtonColumn UniqueName="HistoryColumn" HeaderStyle-Width="18px" ButtonType="ImageButton" CommandName="History" Text="Get History" ImageUrl="~\Images\history.png">
</telerik:GridButtonColumn>Protected Sub RadGrid1_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommandIf e.CommandName = "History" ThenDim categoryId As String = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)"UniqueID").ToStringDim url As String = "link&UniqueID=" & categoryIdEnd IfEnd Subvar radTbLine = $find('radTbLine' + lineNum);
radTbLine.set_textBoxValue(arrPrevLines[y]);radTbLine1_text').value = 'test';?
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
|
<%@ Page Title="Stars Pluses Minuses" Language="C#" MasterPageFile="~/Staff/Staff.master" AutoEventWireup="true" CodeFile="StarsPlusMinus.aspx.cs" Inherits="Staff.Reporting.AR.StarsPlusMinus" %><asp:Content ID="Content1" ContentPlaceHolderID="head_staff" Runat="Server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="main_staff" Runat="Server"> <asp:Panel ID="SelectionPanel" runat="server" CssClass="SelectionPanel"> <telerik:RadComboBox ID="FormComboBox" runat="server" Label="Form: " Width="150px" CssClass="PupilChooserCombo" AutoPostBack="True" OnDataBound="FormComboBox_OnDataBound" DataSourceID="FormDataSource" DataTextField="DESCRIPTION" DataValueField="CODE"> </telerik:RadComboBox> <telerik:RadComboBox ID="PeriodComboBox" runat="server" Label="Period: " Width="150px" CssClass="PupilChooserCombo" AutoPostBack="True" DataSourceID="PeriodDataSource" DataTextField="PERIOD_NAME" DataValueField="PERIOD_ID" OnDataBound="PeriodComboBox_DataBound"> </telerik:RadComboBox> </asp:Panel> <telerik:RadGrid ID="PupilGrid" runat="server" AllowAutomaticUpdates="True" AutoGenerateColumns="False" CellSpacing="0" DataSourceID="GridDataSource" GridLines="None"> <ExportSettings> <Pdf> <PageHeader> <LeftCell Text=""></LeftCell> <MiddleCell Text=""></MiddleCell> <RightCell Text=""></RightCell> </PageHeader> <PageFooter> <LeftCell Text=""></LeftCell> <MiddleCell Text=""></MiddleCell> <RightCell Text=""></RightCell> </PageFooter> </Pdf> </ExportSettings> <ValidationSettings EnableModelValidation="False" EnableValidation="False" /> <MasterTableView ClientDataKeyNames="LINE_ID" CommandItemDisplay="TopAndBottom" DataKeyNames="LINE_ID" DataSourceID="GridDataSource" EditMode="Batch" ShowHeadersWhenNoRecords="True"> <CommandItemSettings ExportToPdfText="Export to PDF" ShowAddNewRecordButton="False" ShowCancelChangesButton="True" ShowRefreshButton="False" ShowSaveChangesButton="True"></CommandItemSettings> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column" Created="True"> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="INFORMAL_NAME" FilterControlAltText="Filter INFORMAL_NAME column" HeaderText="INFORMAL_NAME" ReadOnly="True" SortExpression="INFORMAL_NAME" UniqueName="INFORMAL_NAME"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> </telerik:GridBoundColumn> <telerik:GridBoundColumn ReadOnly="True" DataField="ACADEMIC_HOUSE_DESCRIPTION" FilterControlAltText="Filter ACADEMIC_HOUSE_DESCRIPTION column" HeaderText="ACADEMIC_HOUSE_DESCRIPTION" SortExpression="ACADEMIC_HOUSE_DESCRIPTION" UniqueName="ACADEMIC_HOUSE_DESCRIPTION"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> </telerik:GridBoundColumn> <telerik:GridBoundColumn ReadOnly="True" DataField="FORM_DESC" FilterControlAltText="Filter FORM_DESC column" HeaderText="FORM_DESC" SortExpression="FORM_DESC" UniqueName="FORM_DESC"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="STARS" DataType="System.Decimal" FilterControlAltText="Filter STARS column" HeaderText="STARS" SortExpression="STARS" UniqueName="STARS"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PLUSES" DataType="System.Decimal" FilterControlAltText="Filter PLUSES column" HeaderText="PLUSES" SortExpression="PLUSES" UniqueName="PLUSES"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="MINUSES" DataType="System.Decimal" FilterControlAltText="Filter MINUSES column" HeaderText="MINUSES" ReadOnly="True" SortExpression="MINUSES" UniqueName="MINUSES"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LINE_ID" DataType="System.Int32" FilterControlAltText="Filter LINE_ID column" HeaderText="LINE_ID" ReadOnly="True" SortExpression="LINE_ID" UniqueName="LINE_ID"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="HEADER_ID" DataType="System.Int32" FilterControlAltText="Filter HEADER_ID column" HeaderText="HEADER_ID" SortExpression="HEADER_ID" UniqueName="HEADER_ID"> <ColumnValidationSettings> <ModelErrorMessage Text="" /> </ColumnValidationSettings> </telerik:GridBoundColumn> </Columns> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn> </EditFormSettings> <BatchEditingSettings EditType="Cell"></BatchEditingSettings> <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle> </MasterTableView> <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle> <FilterMenu EnableImageSprites="False"></FilterMenu> </telerik:RadGrid> <asp:SqlDataSource ID="FormDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:PassMainConnectionString %>" SelectCommand="usps_SA_GetForms" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:ProfileParameter Name="ACADEMIC_YEAR" PropertyName="CurrentAcademicYear" Type="Int32" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="PeriodDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:PassMainConnectionString %>" SelectCommand="usps_SA_GetAssessmentPeriods" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:ProfileParameter Name="ACADEMIC_YEAR" PropertyName="CurrentAcademicYear" Type="Int32" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="GridDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:PassMainConnectionString %>" SelectCommand="usps_SA_GetPupilsForSPMGrid" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:Parameter Name="SCHOOL" Type="String" DefaultValue="SA"/> <asp:ControlParameter ControlID="PeriodComboBox" Name="PERIOD_ID" PropertyName="SelectedValue" Type="Int32" /> <asp:ControlParameter ControlID="FormComboBox" Name="FORM_CODE" PropertyName="SelectedValue" Type="String" /> <asp:ProfileParameter Name="ACADEMIC_YEAR" PropertyName="CurrentAcademicYear" Type="Int32" /> </SelectParameters> </asp:SqlDataSource></asp:Content>using System;using System.Linq;using NLog;using Telerik.Web.UI;namespace Staff.Reporting.AR{ public partial class StarsPlusMinus : System.Web.UI.Page { private readonly Logger _logger = LogManager.GetCurrentClassLogger(); protected void Page_Error(object sender, EventArgs e) { Exception ex = Server.GetLastError(); _logger.Fatal(ex); Server.ClearError(); //store exception to display some details to the user Session[Profile.DomainUsername + "LastError"] = ex; Response.Redirect("/Staff/StaffError.aspx", true); } protected void Page_Load(object sender, EventArgs e) { } protected void PeriodComboBox_DataBound(object sender, EventArgs e) { if (IsPostBack) return; //always select the current period on first visit var item = PeriodComboBox.Items.FirstOrDefault(i => i.Text.EndsWith("(*)")); if (item != null) item.Selected = true; } protected void FormComboBox_OnDataBound(object sender, EventArgs e) { if (IsPostBack) return; FormComboBox.Items.Insert(0, new RadComboBoxItem("Choose ...", "XX") { Selected = true }); } }}<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" ControlsToSkip="None" DecoratedControls="All" Skin="MyCustomSkin" /><asp:Content ContentPlaceHolderID="phContent" runat="server"><br><br><br> <br> <script type="text/javascript"><br><br> function openPOW() {<br><br> var win2 = $find('ctl00_phContent_winPOW')<br> win2.show();<br> <br> }<br><div><br></div></script><br><br><br> <asp:ScriptManager runat="server"></asp:ScriptManager><br> <telerik:RadWindow Behaviors="Maximize,Minimize,Close" Modal="true" AutoSize="true" ID="winPOW" runat="server" Skin="Sitefinity"><br> <ContentTemplate><br> <iframe style="width:750px;height:450px;" src="../orders/PredictiveOrderDeliveryDates.aspx" id="myframePOW"></iframe><br> <br> <br> </ContentTemplate><br> </telerik:RadWindow><br> <br><input type="button" id="opPOW" onclick="openPOW()" /><br></asp:Content><br><br><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"><asp:Content ContentPlaceHolderID="phContent" runat="server"></font><br style="font-size: 14.399999618530273px;"><br style="font-size: 14.399999618530273px;"><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> </font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> <script type="text/javascript"></font><br style="font-size: 14.399999618530273px;"><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> function openPOW() {</font><br style="font-size: 14.399999618530273px;"><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> var win = $('ctl00_phContent_winPOW');</font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> win.show();</font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> </font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> }</font><br style="font-size: 14.399999618530273px;"><div style="font-size: 14.399999618530273px;"><br></div><font style="font-size: 14.399999618530273px;"></script></font><br style="font-size: 14.399999618530273px;"><br style="font-size: 14.399999618530273px;"><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> <asp:ScriptManager runat="server"></asp:ScriptManager></font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> <telerik:RadWindow Behaviors="Maximize,Minimize,Close" Modal="true" AutoSize="true" ID="winPOW" runat="server" Skin="Sitefinity"></font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> <ContentTemplate></font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> <iframe style="width:750px;height:450px;" src="../orders/PredictiveOrderDeliveryDates.aspx" id="myframePOW"></iframe></font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> </font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> </font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> </ContentTemplate></font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> </telerik:RadWindow></font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> </font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"><input type="button" id="opPOW" onclick="openPOW()" /></font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"></asp:Content></font><br style="font-size: 14.399999618530273px;"><br><br><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> Dim lnkPredictiveOrderWizard As New LinkButton</font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> With lnkPredictiveOrderWizard</font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> .Text = "Use Predictive Wizard"</font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> .ToolTip = "Use a wizard to create order"</font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> .CssClass = "menubar_wizard"</font><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> .ID = "lnkPredictiveOrderWizard"</font><br style="font-size: 14.399999618530273px;"><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> AddHandler .Click, AddressOf PredictiveWizard</font><br style="font-size: 14.399999618530273px;"><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> End With</font><br style="font-size: 14.399999618530273px;"><br style="font-size: 14.399999618530273px;"><font style="font-size: 14.399999618530273px;"> _master.Menubar.Add(lnkPredictiveOrderWizard)</font><br><br><br><br> Public Sub PredictiveWizard(ByVal sender As Object, ByVal e As EventArgs)<br> Dim jscript As String = "javascript:openPOW();"<br><br>Page.ClientScript.RegisterStartupScript(Me.GetType(), "key", jscript, True)<br>end sub