| <%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Master.Master" AutoEventWireup="true" CodeBehind="RadGridInLineTest2.aspx.cs" Inherits="TelerikTest.Pages.RadGridInLineTest2" %> |
| <%@ MasterType VirtualPath="~/Pages/Master.Master" %> |
| <%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" |
| Namespace="System.Web.UI.WebControls" TagPrefix="asp" %> |
| <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> |
| </asp:Content> |
| <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> |
| <asp:Panel ID="Panel2" runat="server" |
| style="z-index:1; position:absolute; top:100px; left: 0px;"> |
| <asp:UpdatePanel ID="UpdatePanel2" runat="server"> |
| <ContentTemplate> |
| <div> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="systemApplyOffsetRadGrid"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="systemApplyOffsetRadGrid" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> |
| <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" |
| style="z-index:1; position:absolute; top:9px; left:-30px;"> |
| <div> |
| <telerik:RadGrid ID="systemApplyOffsetRadGrid" runat="server" |
| GridLines="None" |
| PageSize="5" |
| Skin="WebBlue" |
| AllowAutomaticInserts="true" |
| AllowAutomaticUpdates="true" |
| AllowAutomaticDeletes="true" |
| DataSourceID="EntityDataSource1" |
| style="z-index: 1; left: 150px; top:50px; position: absolute"> |
| <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" TableLayout="Fixed" |
| CommandItemDisplay="Top" Name="Master" ShowHeader="true" Caption="Apply Offset" Width="100%" |
| CssClass="RadGrid" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"> |
| <Columns> |
| <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" |
| EditImageUrl="../Images/Edit.gif" HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center"> |
| </telerik:GridEditCommandColumn> |
| <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" |
| HeaderText="ID" ReadOnly="True" SortExpression="ID" |
| UniqueName="ID" HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center" |
| HeaderStyle-HorizontalAlign="Center"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Lookup_Value" |
| HeaderText="Lookup Value" SortExpression="Lookup_Value" |
| UniqueName="Lookup_Value" HeaderStyle-Width="150px" ColumnEditorID="GridTextBoxColumnEditor1"> |
| </telerik:GridBoundColumn> |
| <telerik:GridButtonColumn ConfirmText="Delete this Applied Offset?" |
| ImageUrl="../Images/Delete.gif" |
| ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" |
| CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" |
| HeaderStyle-Width="40px" ItemStyle-HorizontalAlign="Center"> |
| </telerik:GridButtonColumn> |
| </Columns> |
| <EditFormSettings ColumnNumber="2" CaptionDataField="Lookup_Value"> |
| <FormTableItemStyle Wrap="false" /> |
| <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="0" /> |
| <FormTableStyle CellSpacing="0" CellPadding="0" /> |
| <FormTableAlternatingItemStyle Wrap="false" /> |
| <EditColumn ButtonType="ImageButton" InsertText="Insert Value" UpdateText="Update Value" |
| UniqueName="EditCommandColumn1" CancelText="Cancel Edit"></EditColumn> |
| </EditFormSettings> |
| </MasterTableView> |
| <ClientSettings ClientEvents-OnRowDblClick="RowDblClick"></ClientSettings> |
| </telerik:RadGrid> |
| <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="75px"></telerik:GridTextBoxColumnEditor> |
| <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager> |
| <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=AllDataModels" |
| DefaultContainerName="AllDataModels" EntitySetName="lkup_ApplyOffset" EnableDelete="true" |
| EnableInsert="true" EnableUpdate="true"> |
| </asp:EntityDataSource> |
| <asp:CustomValidator ID="customValidator" runat="server" ErrorMessage="CustomValidator" |
| style="z-index:1; position:absolute; top:52px; left:500px; height: 61px; width: 283px;"></asp:CustomValidator> |
| </div> |
| </telerik:RadAjaxPanel> |
| </div> |
| </ContentTemplate> |
| </asp:UpdatePanel> |
| </asp:Panel> |
| <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
| <script type="text/javascript"> |
| function RowDblClick(sender, eventArgs) |
| { |
| sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical()); |
| } |
| </script> |
| </telerik:RadCodeBlock> |
| </asp:Content> |
| Private Sub printersGrid_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles printersGrid.ItemCreated |
| Debug.WriteLine("In ItemCreated") |
| Debug.Indent() |
| Debug.WriteLine("e.Item.ToString = " & e.Item.ToString) |
| Dim printerSettingsControl As PrinterSettingsControl |
| If TypeOf e.Item Is GridEditFormItem And e.Item.IsInEditMode Then |
| Dim clientSettings As ClientSidePrinterProperties |
| printerSettingsControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), PrinterSettingsControl) |
| If e.Item.OwnerTableView.IsItemInserted Then |
| Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl) |
| Else |
| clientSettings = DirectCast(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("Settings"), ClientSidePrinterProperties) |
| printerSettingsControl.Options = printerSettingsControl.Option.ShowUpdateCancelButtons |
| printerSettingsControl.IsRaw = ViewState("IsRaw") |
| printerSettingsControl.Locked = ViewState("locked") |
| printerSettingsControl.PopulateControls(clientSettings) |
| End If |
| End If |
| 'If TypeOf e.Item Is GridEditFormItem Then |
| ' Dim clientSettings As ClientSidePrinterProperties |
| ' If e.Item.IsInEditMode Then |
| ' clientSettings = DirectCast(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("Settings"), ClientSidePrinterProperties) |
| ' printerSettingsControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), PrinterSettingsControl) |
| ' printerSettingsControl.Options = printerSettingsControl.Option.ShowUpdateCancelButtons |
| ' printerSettingsControl.IsRaw = ViewState("IsRaw") |
| ' printerSettingsControl.Locked = ViewState("locked") |
| ' printerSettingsControl.PopulateControls(clientSettings) |
| ' ElseIf e.Item.OwnerTableView.IsItemInserted Then |
| ' Debug.WriteLine("IsItemInserted") |
| ' printerSettingsControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), PrinterSettingsControl) |
| ' If printerSettingsControl IsNot Nothing Then |
| ' Debug.WriteLine(printerSettingsControl.ToString) |
| ' End If |
| ' End If |
| 'End If |
| Debug.Unindent() |
| End Sub 'RadGrid1_ItemCreated |
| Private Sub printersGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles printersGrid.ItemDataBound |
| Debug.WriteLine("In ItemDataBound") |
| Debug.Indent() |
| Debug.WriteLine("e.Item.ToString = " & e.Item.ToString) |
| If TypeOf e.Item Is GridEditFormItem And e.Item.IsInEditMode Then |
| If e.Item.OwnerTableView.IsItemInserted Then |
| Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl) |
| Else |
| Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl) |
| End If |
| End If |
| Debug.Unindent() |
| End Sub 'RadGrid1_ItemDataBound |
| Private Sub printersGrid_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles printersGrid.ItemCommand |
| Debug.WriteLine("In ItemCommand") |
| Debug.Indent() |
| Debug.WriteLine("e.CommandName.ToString = " & e.CommandName.ToString) |
| If e.CommandName = RadGrid.InitInsertCommandName Then |
| e.Canceled = True |
| Dim newValues As New System.Collections.Specialized.ListDictionary |
| newValues("Settings") = ClientSidePrinterProperties.CreateDefault |
| e.Item.OwnerTableView.InsertItem(newValues) |
| End If |
| Debug.Unindent() |
| End Sub |
| <telerik:RadListBox ID="radFullList" runat="server" AllowTransfer="True" |
| AllowTransferOnDoubleClick="true" EnableDragAndDrop="true" TransferToID="radList" |
| DataKeyField="GUID" DataSortField="EmployeeName" DataSourceID="LinqDS4" |
| DataTextField="EmployeeName" DataValueField="EmployeeNumber" Height="200px" |
| Width="200px"> |
| <ButtonSettings ReorderButtons="Common"></ButtonSettings> |
| </telerik:RadListBox> |
| <telerik:radlistbox ID="radList" runat="server" Height="200px" Width="200px" |
| AllowReorder="true" AllowDelete="true" /> |
| <asp:LinqDataSource ID="LinqDS4" runat="server" |
| ContextTypeName="Modules.EmployeeManagement.EmployeeManagementDataContext" |
| TableName="tblEmployees" OrderBy="EmployeeName" > |
| </asp:LinqDataSource> |
| Dim sb As New StringBuilder() |
| Dim db = New Modules.EmployeeManagement.EmployeeManagementDataContext |
| Dim employee = (From t In db.tblEmployees Where t.GUID = Me.DataItemId Select t).Single |
| employee.EmployeeName= txtName.Text |
| ... |
| employee.UserGroup = radUserGroup.SelectedValue |
| For Each item As RadListBoxItem In radList.Items |
| sb.Append(item.Value.ToString & "|") |
| Next |
| employee.SupervisorNumber = Left(sb.ToString, 59) |
| db.SubmitChanges() |
| Response.Redirect(CreateHostViewCommand("EmployeeEditView", DataItemId.ToString, Nothing)) |
| <ul class="listbox-list"> |
| <li class="listbox-item"> |
| <telerik:RadListBox ID="radListDisciplines" runat="server" AllowTransfer="True" |
| AutoPostBackOnDelete="True" AutoPostBackOnTransfer="True" DataSourceID="sqlListDisciplines" |
| TransferToID="radListAssigned" DataTextField="DisciplineName" DataValueField="DisciplineId" Width="300px" DataKeyField="DisciplineId"> |
| </telerik:RadListBox> |
| </li> |
| <li class="listbox-item"> |
| <telerik:RadListBox ID="radListAssigned" runat="server" |
| DataSourceID="sqlReviewersDisciplines" |
| DataTextField="DisciplineName" DataValueField="DisciplineId" AllowDelete="True" |
| AutoPostBack="True" AutoPostBackOnDelete="True" AutoPostBackOnTransfer="True" |
| DataKeyField="DisciplineReviewerId" TransferToID="radListDisciplines" Width="300px"> |
| </telerik:RadListBox> |
| </li> |
| </ul> |
| <div style="clear:both;"></div> |
| <asp:SqlDataSource ID="sqlListDisciplines" runat="server" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>" |
| SelectCommand="Dej_DisciplineList" SelectCommandType="StoredProcedure"> |
| <SelectParameters> |
| <asp:ControlParameter ControlID="hidOrgId" Name="OrgId" PropertyName="Value" Type="Int32" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource ID="sqlReviewersDisciplines" runat="server" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>" |
| SelectCommand="Dej_ListDisciplineReviewerByReviewer" |
| SelectCommandType="StoredProcedure" |
| DeleteCommand="Dej_DisciplineReviewerDelete" |
| DeleteCommandType="StoredProcedure" |
| InsertCommand="Dej_DisciplineReviewerAdd" |
| InsertCommandType="StoredProcedure"> |
| <SelectParameters> |
| <asp:ControlParameter ControlID="hidReviewerId" Name="UserId" PropertyName="Value" |
| Type="Int32" /> |
| </SelectParameters> |
| <DeleteParameters> |
| <asp:Parameter Name="DisciplineReviewerId" Type="Int32" /> |
| </DeleteParameters> |
| <InsertParameters> |
| <asp:Parameter Name="DisciplineId" Type="Int32" /> |
| <asp:Parameter Name="ReviewerId" Type="Int32" /> |
| </InsertParameters> |
| </asp:SqlDataSource> |
function ShowWindow() {
var found = false;
var allWindows = GetWindowManager().get_windows
for (var i = 0; i < allWindows.length; i++) {
var oWnd = allWindows[i];
var bounds = $telerik.getBounds(oWnd.get_popupElement());
if (oWnd._title == "B" ) {
found = true;
break;
}
}
......<location path="Telerik.Web.UI.WebResource.axd">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
Message: 'window' is null or not an object
Line: 124
Char: 54
Code: 0