[CLOSED] Get gridpanel column value from Javscript

  1. #1

    [CLOSED] Get gridpanel column value from Javscript


    I would like to get the column value from grid panel in javascript.

    But the record value is undefined. Please check the following code and error msg.

    Thank you.

    var checkEditableInvoiceID = function (value, metadata, record, rowIndex, colIndex, store) {
                                                        <ext:Store ID="sTransaction" runat="server" OnSubmitData="SubmitData" PageSize="30" OnReadData="sTransaction_RefreshData" AutoLoad="false">
                                                                <ext:Model ID="Model1" runat="server" Name="CategoryMaster">
                                                                        <ext:ModelField Name="RECORD_STATUS" Type="String" />                                                                    
                                                                        <ext:ModelField Name="INVOICEID" Type="String" />                                                                    
                                                    <ColumnModel ID="ColumnModel1" runat="server">
                                                            <ext:Column ID="RECORD_STATUS" runat="server" Text="RECORD STATUS" DataIndex="RECORD_STATUS" Visible="false">
                                                            <ext:Column ID="INVOICEID" runat="server" Text="Invoice No." DataIndex="INVOICEID" Width="100">                                                                  
                                                                    <ext:ComboBox ID="ddlInvoiceList" runat="server" EmptyText="Invoice No." DisplayField="INVOICEID" ValueField="INVOICEID" TypeAhead="false" HideBaseTrigger="true" TriggerAction="Query" MinChars="0" LabelWidth="120" Width="290">                                                                    
                                                                        <ListConfig LoadingText="Searching...">
                                                                            <ItemTpl ID="ItemTpl1" runat="server">
                                                                                    <div class="search-item">
                                                                            <ext:Store ID="sInvoiceList" runat="server" AutoLoad="false">
                                                                                    <ext:AjaxProxy Url="../HttpHandler/GetInvoiceIDListFromTransaction.ashx">
                                                                                        <ActionMethods Read="POST" />
                                                                                            <ext:JsonReader Root="InoviceIDList" TotalProperty="total" />
                                                                                    <ext:Model ID="Model3" runat="server" IDProperty="INVOICEID">
                                                                                            <ext:ModelField Name="INVOICEID" Type="String"></ext:ModelField>
                                                                            <ext:ListItem Index="0"></ext:ListItem>
                                                                            <ext:FieldTrigger Icon="Search" Qtip="Click here to search Invoice." />
                                                                            <TriggerClick OnEvent="SearchTransactionDetails">                                                                           
                                                                                    <ext:Parameter Name="INVOICEID" Value="#{ddlInvoiceList}.getValue()" Encode="false" Mode="Raw"></ext:Parameter>
                                                                            <SpecialKey Before="return e.getKey() == e.ENTER;" OnEvent="SearchTransactionDetails">
                                                                                <EventMask ShowMask="true" MinDelay="500" Msg="LOADING DATA..." />
                                                        <ext:CellEditing ID="RowEdit" runat="server" ClicksToEdit="1">
                                                                <BeforeEdit Fn="checkEditableInvoiceID">
    Error: Unable to get value of the property 'RECORD_STATUS': object is null or undefined
    Last edited by Daniil; Aug 14, 2013 at 6:46 AM. Reason: [CLOSED]
  2. #2
    Solve it out already as follow:
                                                                <BeforeEdit Handler="if (e.record.get('RECORD_STATUS') != 'INSERT') { if(e.column.id == 'INVOICEID') {return false;}};"/>                                                            

Similar Threads

  1. Replies: 0
    Last Post: Sep 27, 2012, 6:10 PM
  2. Replies: 3
    Last Post: Nov 10, 2011, 3:10 PM
  3. Replies: 1
    Last Post: Nov 04, 2011, 8:51 AM
  4. [CLOSED] Icon column in GridPanel based on column from store
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 12, 2010, 5:46 PM
  5. Replies: 3
    Last Post: Apr 08, 2010, 7:16 AM

Posting Permissions