Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
Client Side Javascript can't reference WebGrid
posted
For some reason I can't set a reference to my web grid object.  New to writing Client Side scripts so maybe i'm doing something wrong that's obvious to someone other than me.  Any help would be greatly appreciated!

<%@ Page Language="C#" MasterPageFile="~/MasterPages/DesignMasterPage.master" AutoEventWireup="true" CodeFile="Channels.aspx.cs" Inherits="Channels" Title="Channels - TxRxCustom" %>

<%@ Register TagPrefix="igtbl" Namespace="Infragistics.WebUI.UltraWebGrid" Assembly="Infragistics2.WebUI.UltraWebGrid.v7.3, Version=7.3.20073.38, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %>

<%@ MasterType VirtualPath="~/MasterPages/DesignMasterPage.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script type="text/javascript">

function UwgChannels_AfterRowInsertHandler(gridName, rowId, index)

{

var grid = igtbl_getGridById(uwgChannels);

alert(grid); //expecting 'object' returned but instead getting no response.

}

</script>

<asp:ObjectDataSource ID="odsChannels" runat="server" DeleteMethod="DeleteChannel"

InsertMethod="AddChannel" OnSelecting="odsChannels_Selecting"

SelectMethod="GetChannelsByDesignID" TypeName="TxRxCustomBLL.ChannelsDisplay"

UpdateMethod="UpdateChannel" OnUpdating="odsChannels_Updating">

<DeleteParameters>

<asp:Parameter Name="channelID" Type="Int32" />

</DeleteParameters>

<UpdateParameters>

<asp:Parameter Name="designID" Type="Int32" />

<asp:Parameter Name="name" Type="String" />

<asp:Parameter Name="description" Type="String" />

<asp:Parameter Name="radioID" Type="Int32" />

<asp:Parameter Name="radioFunctionID" Type="Int32" />

<asp:Parameter Name="modulationTypeID" Type="Int32" />

<asp:Parameter Name="externalSystem" Type="Boolean" />

<asp:Parameter Name="transmitFrequency" Type="Decimal" />

<asp:Parameter Name="transmitBandwidth" Type="Single" />

<asp:Parameter Name="transmitPower" Type="Single" />

<asp:Parameter Name="transmitLevel" Type="Single" />

<asp:Parameter Name="transmitAntennaID" Type="Int32" />

<asp:Parameter Name="receiveFrequency" Type="Decimal" />

<asp:Parameter Name="receiveBandwidth" Type="Single" />

<asp:Parameter Name="receiveSensitivity" Type="Single" />

<asp:Parameter Name="receiveAntennaID" Type="Int32" />

<asp:Parameter Name="receiveMuted" Type="Boolean" />

<asp:Parameter Name="channelID" Type="Int32" />

</UpdateParameters>

<SelectParameters>

<asp:Parameter DefaultValue="" Name="designID" Type="Int32" />

</SelectParameters>

<InsertParameters>

<asp:Parameter Name="designID" Type="Int32" />

<asp:Parameter Name="name" Type="String" />

<asp:Parameter Name="description" Type="String" />

<asp:Parameter Name="radioID" Type="Int32" />

<asp:Parameter Name="radioFunctionID" Type="Int32" />

<asp:Parameter Name="modulationTypeID" Type="Int32" />

<asp:Parameter Name="externalSystem" Type="Boolean" />

<asp:Parameter Name="transmitFrequency" Type="Decimal" />

<asp:Parameter Name="transmitBandwidth" Type="Single" />

<asp:Parameter Name="transmitPower" Type="Single" />

<asp:Parameter Name="transmitLevel" Type="Single" />

<asp:Parameter Name="transmitAntennaID" Type="Int32" />

<asp:Parameter Name="receiveFrequency" Type="Decimal" />

<asp:Parameter Name="receiveBandwidth" Type="Single" />

<asp:Parameter Name="receiveSensitivity" Type="Single" />

<asp:Parameter Name="receiveAntennaID" Type="Int32" />

<asp:Parameter Name="receiveMuted" Type="Boolean" />

</InsertParameters>

</asp:ObjectDataSource>

<asp:ObjectDataSource ID="odsRadios" runat="server" OldValuesParameterFormatString="original_{0}"

SelectMethod="GetRadios" TypeName="TxRxCustomDataTableAdapters.RadiosTableAdapter">

</asp:ObjectDataSource>

<asp:ObjectDataSource ID="odsFunctions" runat="server" OldValuesParameterFormatString="original_{0}"

SelectMethod="GetRadioFunctions" TypeName="TxRxCustomDataTableAdapters.RadioFunctionsTableAdapter">

</asp:ObjectDataSource>

<asp:ObjectDataSource ID="odsModulations" runat="server" OldValuesParameterFormatString="original_{0}"

SelectMethod="GetModulationTypes" TypeName="TxRxCustomDataTableAdapters.ModulationTypesTableAdapter">

</asp:ObjectDataSource>

<asp:ObjectDataSource ID="odsAntennas" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetAntennaSelectionsByDesignID"

TypeName="TxRxCustomBLL.Antennas" OnSelecting="odsAntennas_Selecting">

<SelectParameters>

<asp:Parameter Name="DesignID" Type="Int32" />

</SelectParameters>

</asp:ObjectDataSource>

<br/>

<asp:Button ID="btnNewChannel" runat="server" CommandName="NewChannel" OnCommand="btnNewChannel_Command"

Text="New Channel..." ToolTip="Add a transmit and/or receive frequency." /><br/>

 

<asp:RadioButtonList ID="rbQuickEntry" runat="server" RepeatDirection="Horizontal" AutoPostBack="True">

<asp:ListItem Selected="True" Value="QE">Quick Entry</asp:ListItem>

<asp:ListItem Value="FE">Normal Entry</asp:ListItem>

</asp:RadioButtonList>

<br/>

<asp:GridView ID="gvChannels" runat="server" AllowSorting="True" AutoGenerateColumns="False"

DataKeyNames="ChannelID" DataSourceID="odsChannels" ToolTip='Click "Select" to edit'>

<Columns>

<asp:HyperLinkField DataNavigateUrlFields="ChannelID" DataNavigateUrlFormatString="./ChannelDetail.aspx?ChannelID={0}"

Text="Select" />

<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />

<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />

<asp:BoundField DataField="RadioName" HeaderText="Radio" ReadOnly="True" SortExpression="RadioName" />

<asp:BoundField DataField="RadioFunctionName" HeaderText="Function" ReadOnly="True"

SortExpression="RadioFunctionName" />

<asp:BoundField DataField="ModulationTypeName" HeaderText="Modulation" ReadOnly="True"

SortExpression="ModulationTypeName" />

<asp:CheckBoxField DataField="ExternalSystem" HeaderText="External" SortExpression="ExternalSystem" />

<asp:BoundField DataField="TransmitFrequency" HeaderText="TxFreq" SortExpression="TransmitFrequency">

<ItemStyle HorizontalAlign="Right" />

</asp:BoundField>

<asp:BoundField DataField="TransmitBandwidth" DataFormatString="{0:f3}" HeaderText="TxBw"

HtmlEncode="False" SortExpression="TransmitBandwidth">

<ItemStyle HorizontalAlign="Right" />

</asp:BoundField>

<asp:BoundField DataField="TransmitPower" HeaderText="TxPower" SortExpression="TransmitPower">

<ItemStyle HorizontalAlign="Right" />

</asp:BoundField>

<asp:BoundField DataField="TransmitLevel" HeaderText="TxLevel" SortExpression="TransmitLevel">

<ItemStyle HorizontalAlign="Right" />

</asp:BoundField>

<asp:BoundField DataField="TransmitAntennaName" HeaderText="TxAnt" ReadOnly="True"

SortExpression="TransmitAntennaName" />

<asp:BoundField DataField="ReceiveFrequency" HeaderText="RxFreq" SortExpression="ReceiveFrequency">

<ItemStyle HorizontalAlign="Right" />

</asp:BoundField>

<asp:BoundField DataField="ReceiveBandwidth" DataFormatString="{0:f3}" HeaderText="RxBw"

HtmlEncode="False" SortExpression="ReceiveBandwidth">

<ItemStyle HorizontalAlign="Right" />

</asp:BoundField>

<asp:BoundField AccessibleHeaderText="Receiver sensitivity for compensation of TNRD curves."

DataField="ReceiveSensitivity" HeaderText="RxSens" SortExpression="ReceiveSensitivity" />

<asp:BoundField DataField="ReceiveAntennaName" HeaderText="RxAnt" ReadOnly="True"

SortExpression="ReceiveAntennaName" />

<asp:CheckBoxField DataField="ReceiveMuted" HeaderText="Muted" SortExpression="ReceiveMuted" />

</Columns>

<RowStyle CssClass="TableRow" />

<AlternatingRowStyle CssClass="AlternateRow" />

</asp:GridView>

<igtbl:UltraWebGrid ID="uwgChannels" runat="server" DataSourceID="odsChannels"

OnInitializeLayout="uwgChannels_InitializeLayout">

<Bands>

<igtbl:UltraGridBand>

<AddNewRow View="NotSet" Visible="NotSet">

</AddNewRow>

<Columns>

<igtbl:UltraGridColumn BaseColumnName="DesignID" DataType="System.Int32" IsBound="True"

Key="DesignID">

<Header Caption="DesignID">

</Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="ChannelID" DataType="System.Int32" IsBound="True"

Key="ChannelID">

<Header Caption="ChannelID">

<RowLayoutColumnInfo OriginX="1" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="1" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="Name" IsBound="True" Key="Name" Type="DropDownList">

<Header Caption="Name">

<RowLayoutColumnInfo OriginX="2" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="2" />

</Footer>

<ValueList DataSourceID="odsRadios" DisplayMember="RadioName" Key="RadioId">

</ValueList>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="Description" IsBound="True" Key="Description">

<Header Caption="Description">

<RowLayoutColumnInfo OriginX="3" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="3" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="RadioID" DataType="System.Int32" IsBound="True"

Key="RadioID">

<Header Caption="RadioID">

<RowLayoutColumnInfo OriginX="4" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="4" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="RadioFunctionID" DataType="System.Byte" IsBound="True"

Key="RadioFunctionID">

<Header Caption="RadioFunctionID">

<RowLayoutColumnInfo OriginX="5" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="5" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="ModulationTypeID" DataType="System.Byte" IsBound="True"

Key="ModulationTypeID">

<Header Caption="ModulationTypeID">

<RowLayoutColumnInfo OriginX="6" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="6" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="ExternalSystem" DataType="System.Boolean"

IsBound="True" Key="ExternalSystem" Type="CheckBox">

<Header Caption="ExternalSystem">

<RowLayoutColumnInfo OriginX="7" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="7" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="TransmitFrequency" DataType="System.Decimal"

IsBound="True" Key="TransmitFrequency">

<Header Caption="TransmitFrequency">

<RowLayoutColumnInfo OriginX="8" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="8" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="TransmitBandwidth" DataType="System.Single"

IsBound="True" Key="TransmitBandwidth">

<Header Caption="TransmitBandwidth">

<RowLayoutColumnInfo OriginX="9" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="9" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="TransmitPower" DataType="System.Single" IsBound="True"

Key="TransmitPower">

<Header Caption="TransmitPower">

<RowLayoutColumnInfo OriginX="10" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="10" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="TransmitLevel" DataType="System.Single" IsBound="True"

Key="TransmitLevel">

<Header Caption="TransmitLevel">

<RowLayoutColumnInfo OriginX="11" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="11" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="TransmitAntennaID" DataType="System.Int32"

IsBound="True" Key="TransmitAntennaID">

<Header Caption="TransmitAntennaID">

<RowLayoutColumnInfo OriginX="12" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="12" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="ReceiveFrequency" DataType="System.Decimal"

IsBound="True" Key="ReceiveFrequency">

<Header Caption="ReceiveFrequency">

<RowLayoutColumnInfo OriginX="13" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="13" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="ReceiveBandwidth" DataType="System.Single"

IsBound="True" Key="ReceiveBandwidth">

<Header Caption="ReceiveBandwidth">

<RowLayoutColumnInfo OriginX="14" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="14" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="ReceiveAntennaID" DataType="System.Int32"

IsBound="True" Key="ReceiveAntennaID">

<Header Caption="ReceiveAntennaID">

<RowLayoutColumnInfo OriginX="15" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="15" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="ReceiveMuted" DataType="System.Boolean" IsBound="True"

Key="ReceiveMuted" Type="CheckBox">

<Header Caption="ReceiveMuted">

<RowLayoutColumnInfo OriginX="16" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="16" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="RadioName" IsBound="True" Key="RadioName">

<Header Caption="RadioName">

<RowLayoutColumnInfo OriginX="17" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="17" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="RadioFunctionName" IsBound="True" Key="RadioFunctionName">

<Header Caption="RadioFunctionName">

<RowLayoutColumnInfo OriginX="18" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="18" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="ModulationTypeName" IsBound="True" Key="ModulationTypeName">

<Header Caption="ModulationTypeName">

<RowLayoutColumnInfo OriginX="19" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="19" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="TransmitAntennaName" IsBound="True" Key="TransmitAntennaName">

<Header Caption="TransmitAntennaName">

<RowLayoutColumnInfo OriginX="20" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="20" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="ReceiveAntennaName" IsBound="True" Key="ReceiveAntennaName">

<Header Caption="ReceiveAntennaName">

<RowLayoutColumnInfo OriginX="21" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="21" />

</Footer>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="ReceiveSensitivity" DataType="System.Single"

IsBound="True" Key="ReceiveSensitivity">

<Header Caption="ReceiveSensitivity">

<RowLayoutColumnInfo OriginX="22" />

</Header>

<Footer>

<RowLayoutColumnInfo OriginX="22" />

</Footer>

</igtbl:UltraGridColumn>

</Columns>

</igtbl:UltraGridBand>

</Bands>

<DisplayLayout AllowColSizingDefault="Free" AllowColumnMovingDefault="OnServer" AllowDeleteDefault="Yes"

AllowSortingDefault="OnClient" AllowUpdateDefault="Yes" BorderCollapseDefault="Separate"

HeaderClickActionDefault="SortMulti" Name="uwgChannels" RowHeightDefault="20px" SelectTypeRowDefault="Extended"

StationaryMarginsOutlookGroupBy="True" TableLayout="Fixed" Version="4.00" ViewType="OutlookGroupBy" MergeStyles="False">

<RowStyleDefault CssClass="GvRow">

</RowStyleDefault>

<HeaderStyleDefault CssClass="GvHeader">

</HeaderStyleDefault>

<RowAlternateStyleDefault CssClass="AlternateRow">

</RowAlternateStyleDefault>

<ActivationObject BorderColor="" BorderWidth="">

</ActivationObject>

<ClientSideEvents AfterCellUpdateHandler="UwgChannels_AfterRowInsertHandler" />

</DisplayLayout>

</igtbl:UltraWebGrid><br />

<asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Save" Width="92px" />

</asp:Content>

 

Parents Reply Children
No Data