[CLOSED] How to get Cell ID or Row Index in Grid Panel with ComponentColumn

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] How to get Cell ID or Row Index in Grid Panel with ComponentColumn


    We need to retrieve the cell id or the row index in GridPanel with Component Column. We tried with "CellSelectionModel" and "RowSelectionModel" but without success.
    As you can see in the sample below, We are focusing on the second column (dataIndex= Acc_Code). When selecting a value from the combobox we want to update the next column (Acc_Name) with the retrieved value from server in the same row.
    Thanks in advance.

    <ext:GridPanel ID="GridPanelJournalVoucher" runat="server" Title="Receipt Journal Voucher"
                    ButtonAlign="Center" Region="Center" Frame="true" Header="false" ForceFit="true">
                        <ext:Store ID="StoreReceiptJournalVoucher" runat="server">
                                <ext:Model ID="ModelJrnRcpVoucher" Name="ModelJrnRcpVoucher" IDProperty="ReceiptJournalVoucher_ID" runat="server">
                                        <ext:ModelField Name="ReceiptJournalVoucher_ID" Type="Int" />
                                        <ext:ModelField Name="Acc_Code" />
                                        <ext:ModelField Name="Acc_Name" />
                                        <ext:ModelField Name="Acc_Desc" />
                                        <ext:ModelField Name="Acc_Credit" />
                                        <ext:ModelField Name="Acc_Debit" />
                                        <ext:ModelField Name="Cheque_No" />
                                        <ext:ModelField Name="Due_Date" Type="Date" />
                                        <ext:ModelField Name="Bank_Name" />
                                        <ext:ModelField Name="Cheque" />
                                        <ext:ModelField Name="Voucher_Type" />
                            <ext:RowNumbererColumn runat="server">
                            <ext:ComponentColumn Text="Code" DataIndex="Acc_Code" ID="Acc_Code" runat="server" >
                                    <ext:ComboBox ID="cbxAccountCode" runat="server" DisplayField="Acc_ID" ValueField="Acc_ID"
                                        StoreID="Store_AccountsCode" TypeAhead="false" LoadingText="Searching..." Width="140"
                                        PageSize="10" HideTrigger="true" ItemSelector="div.search-item" MinChars="1">
                                        <ListConfig LoadingText="Searching...">
                                                <ItemTpl ID="ItemTpl2" runat="server">
                                                        <div class="search-item">
                                                            <div class="code">{Acc_ID} </div>  
                                                            <div class="name">{Acc_Name_En}</div>
                                                <Select Fn="setAccName" />
                            <ext:ComponentColumn Text="Name" DataIndex="Acc_Name" ID="Acc_Name" runat="server"
                                Width="170" >
                                    <ext:TextField ID="txfAccount_Name" DataIndex="Acc_Name" runat="server" />
                            <ext:ComponentColumn Text="Desc" DataIndex="Acc_Desc" ID="Acc_Desc" Width="185" runat="server" >
                                    <ext:TextField ID="txfAccount_Desc" runat="server" />
                            <ext:ComponentColumn Text="Credit" DataIndex="Acc_Credit" ID="Acc_Credit" Width="70"
                                runat="server" >
                                    <ext:NumberField ID="txfAccount_Credit" runat="server" Text="">
                                            <%--<Blur Fn="chckcb" />--%>
                            <ext:ComponentColumn Text="Debit" DataIndex="Acc_Debit" ID="Acc_Debit" Width="70"
                                runat="server" >
                                    <ext:NumberField ID="txfAccount_Debit" runat="server" Text="">
                                            <%--<Blur Fn="chckdb" />--%>
                            <ext:ComponentColumn ID="Cheque_No" DataIndex="Cheque_No" Header="Cheque #" Editable="true"
                                Width="130" runat="server" >
                                    <ext:TextField ID="txfChequeNo" runat="server" Name="Cheque_No" FieldLabel="" Width="150">
                            <ext:ComponentColumn ID="Due_Date" DataIndex="Due_Date" Editable="true" Width="90"
                                Text="Date" runat="server" >
                                    <ext:DateField ID="DateField1" runat="server">
                            <ext:ComponentColumn ID="Bank_Name" DataIndex="Bank_Name" Text="Bank Name" Width="130"
                                runat="server" >
                                    <ext:TextField ID="txfBank_Name2" runat="server" Name="Bank_Name" FieldLabel="" />
                        <ext:GridView ID="GridView1" runat="server">
                        <ext:CellSelectionModel runat="server" ID="cellseltionmode">
                                <Select Fn="Cell_Click" />                        
                        <%--<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
    Last edited by Daniil; Aug 16, 2012 at 5:19 PM. Reason: [CLOSED]

Similar Threads

  1. Grid Panel - Cell Value selection & Copy option
    By jigpatel06 in forum 1.x Help
    Replies: 3
    Last Post: May 23, 2012, 3:15 PM
  2. Replies: 0
    Last Post: May 12, 2012, 11:24 AM
  3. Replies: 1
    Last Post: Oct 19, 2011, 7:14 AM
  4. [CLOSED] How to refresh cell in grid panel..
    By Satyanarayana murthy in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 17, 2010, 7:21 AM
  5. cell value of grid Panel
    By vinu.gupta03 in forum 1.x Help
    Replies: 1
    Last Post: Mar 04, 2009, 1:13 AM

Tags for this Thread

Posting Permissions