2014-03-06 4 views
0

나는 질문이 .. 나는 보고서를 표시하고 셀 선택 모듈을 사용하여 gridpanel를 사용하고 있습니다. 은 내가 ext.net gridpanel의 셀 선택 행에서 두 개의 셀 값을 가져 오는 방법은 무엇입니까?

내가 이미지를 업로드하려고 .. 다른 셀의 선택에 첫 두 열 값을하고 싶지만는 내가 가게에 IDproperty를 사용하는 사이트 :

에서 허용되지 않습니다,하지만 난 i는 선택된 로우 전에 그룹을 축소, 잘못된 값으로 ID 속성 복귀 ..

난이 임의의 방법 - 그 하나의 열만이 아니라 복합 키 .. 2 사용 - 1 그들 두 가지 문제점을 가지고 첫 번째 및 두 번째 열의 값을 얻으려면 ???? 여기

는 .. jQuery를 사용할 필요가있는 경우
<ext:GridPanel ClientIDMode="Static" RTL="false" Layout="FitLayout" ID="grdUsersRates" runat="server" MaxHeight="700" Padding="5" > 
       <HeaderConfig > 
        <Items> 
         <ext:Label ID="Label1" ClientIDMode="Static" Flex="4" runat="server" Text=""></ext:Label> 
         <ext:Label ID="Label2" ClientIDMode="Static" Flex="3" runat="server" Text="نتائج البحث"></ext:Label>        
        </Items> 
       </HeaderConfig> 
       <SelectionModel >       
        <ext:CellSelectionModel ID="cellSelectionModel1" runat="server" >      
         <DirectEvents > 
          <Select OnEvent="getCellTaxReturns"> 
           <ExtraParams> 
            <ext:Parameter Name="CurrentPageIndex" Value="#{grdSearchResult}.getStore().currentPage" Mode="Raw" /> 
            <ext:Parameter Name="PageSize" Value="#{grdSearchResult}.store.pageSize" Mode="Raw" /> 
           </ExtraParams> 
           <EventMask Msg="برجاء الإنتظار حتى يتم تحميل الإقرارات" ShowMask="true"> 

           </EventMask> 
          </Select> 
         </DirectEvents> 
        </ext:CellSelectionModel> 
       </SelectionModel>     
       <Store > 
        <ext:Store OnReadData="refreshGridView" ID="storeUserRates" runat="server" ClientIDMode="Static" GroupField="szScanUserName"> 
         <Model> 
          <ext:Model ID="Model4" runat="server" ClientIDMode="Static" > 
           <Fields> 
            <ext:ModelField Name="nScanUserId" /> 
            <ext:ModelField Name="szScanUserName" /> 
            <ext:ModelField Name="szTaxReturnCategoryCode" /> 
            <ext:ModelField Name="szTaxReturnCategoryDescr" /> 
            <ext:ModelField Name="nScanTaxReturnCount" /> 
            <ext:ModelField Name="nScanPaperCount" /> 
           </Fields> 
          </ext:Model> 
         </Model>        
        </ext:Store> 
       </Store>      
       <ColumnModel ID="ColumnModel2" runat="server" RTL="false" ClientIDMode="Static" > 
        <Columns> 
         <ext:SummaryColumn ID="clScanPaperCount" runat="server" Align="Center" Text="عدد الصفحات" Flex="3" DataIndex="nScanPaperCount" RTL="true" 
          SummaryType="Sum" 
         > 

         </ext:SummaryColumn> 

         <ext:SummaryColumn ID="clScanTaxReturnCount" runat="server" Align="Center" Text="عدد الإقرارات" Flex="3" DataIndex="nScanTaxReturnCount" RTL="true" 
                SummaryType="Sum"> 

         </ext:SummaryColumn> 

         <ext:Column runat="server" Align="Center" Text="نوع الإقرار" Flex="5" DataIndex="szTaxReturnCategoryDescr" RTL="true" ID="clReturnTypeName" > 
         </ext:Column> 

         <ext:Column Hidden="true" runat="server" Align="Center" Text="كود نوع الإقرار" Flex="5" DataIndex="szTaxReturnCategoryCode" RTL="true" ID="clReturnTypeCode" > 
         </ext:Column> 

         <ext:Column runat="server" Align="Center" Text="إسم المستخدم" Flex="5" DataIndex="szScanUserName" RTL="false" ID="clUserName" > 
         </ext:Column> 

         <ext:Column Hidden="true" runat="server" Align="Center" Text="رقم المستخدم" Flex="3" DataIndex="nScanUserId" RTL="true" ID="clUserID" > 
         </ext:Column> 

         <ext:RowNumbererColumn ID="serial" Flex="1" runat="server" Text="مسلسل" > 

         </ext:RowNumbererColumn> 
        </Columns> 
       </ColumnModel> 
       <TopBar> 
        <ext:Toolbar ID="Toolbar1" runat="server" RTL="true" >        
         <Items> 
          <ext:Button ID="btnShowTotalsOnly" runat="server" Text="إظهار الإجمالى فقط/إظهار التفاصيل" Icon="Anchor" 
           Handler="#{UserRatesGroupingSummary}[#{UserRatesGroupingSummary}.expanded ? 'collapseAll' : 'expandAll'](); #{UserRatesGroupingSummary}.expanded = !#{UserRatesGroupingSummary}.expanded;"></ext:Button> 

          <ext:ToolbarSpacer></ext:ToolbarSpacer> 
          <ext:ToolbarSeparator></ext:ToolbarSeparator> 
          <ext:ToolbarSpacer></ext:ToolbarSpacer> 

          <ext:Button ID="btnPrintFullGrid" runat="server" Text="طباعة الجدول" Icon="Printer" Handler="this.up('grid').print();"></ext:Button> 

          <ext:ToolbarSpacer></ext:ToolbarSpacer> 

          <ext:Button ID="btnPrintPageGrid" runat="server" Text="طباعة الصفحة الحالية فقط" Icon="Printer" Handler="this.up('grid').print({currentPageOnly : true });" /> 
          <ext:ToolbarSpacer></ext:ToolbarSpacer> 
          <ext:ToolbarSeparator></ext:ToolbarSeparator> 
          <ext:ToolbarSpacer></ext:ToolbarSpacer> 

          <ext:Button ID="btnExportToExcel" runat="server" Text="إستخراج نسخة Excel" Icon="PageExcel" ClientIDMode="Static" > 
           <Listeners> 
            <Click Fn="saveDataOfUserRates" /> 
           </Listeners> 
           <DirectEvents> 
            <Click OnEvent="mainToExcel" IsUpload="true"> 

            </Click> 
           </DirectEvents> 
          </ext:Button> 

          <ext:ToolbarSpacer></ext:ToolbarSpacer> 

          <ext:Button ID="btnExportToPDF" runat="server" Text="إستخراج نسخة PDF" Icon="PageAttach" ClientIDMode="Static" > 

           <DirectEvents> 
            <Click OnEvent="mainToPdf" IsUpload="true"></Click> 
           </DirectEvents> 
          </ext:Button> 
         </Items> 
        </ext:Toolbar> 
       </TopBar> 
<BottomBar> 
        <ext:PagingToolbar RTL="true" ID="grdPagingToolBar" runat="server" EmptyMsg="لا توجد بيانات متاحة الان" 
           BeforePageText="الصفحة" AfterPageText="من {0}" DisplayMsg="عرض {0} - {1} من{2}"> 
         <Items> 
          <ext:Label ID="lblPageSize" runat="server" Text="حجم الصفحة:"></ext:Label> 
          <ext:ToolbarSpacer ID="grdToolBarSpacer1" runat="server" Width="10"></ext:ToolbarSpacer> 
           <ext:ComboBox ID="cmbxPageSize" runat="server" Width="80"> 
            <Items> 
             <ext:ListItem Text="15" /> 
             <ext:ListItem Text="25" /> 
             <ext:ListItem Text="50" /> 
             <ext:ListItem Text="100" /> 
             <ext:ListItem Text="150" /> 
             <ext:ListItem Text="200" /> 
             <ext:ListItem Text="250" /> 
             <ext:ListItem Text="300" /> 
             <ext:ListItem Text="400" /> 
             <ext:ListItem Text="500" /> 
             <ext:ListItem Text="700" /> 
             <ext:ListItem Text="850" /> 
             <ext:ListItem Text="1000" /> 
             <ext:ListItem Text="120" /> 
             <ext:ListItem Text="1500" /> 
             <ext:ListItem Text="2000" /> 
            </Items> 
            <SelectedItems> 
             <ext:ListItem Value="25" /> 
            </SelectedItems> 
            <Listeners> 
             <Select Handler= 
             "#{grdUsersRates}.store.pageSize = parseInt(this.getValue(), 10); #{grdUsersRates}.store.reload();#{UserRatesGroupingSummary}[#{UserRatesGroupingSummary}.expanded ? 'collapseAll' : 'expandAll'](); #{UserRatesGroupingSummary}.expanded = !#{UserRatesGroupingSummary}.expanded;" /> 
            </Listeners> 
           </ext:ComboBox> 
          </Items> 
         <Plugins> 
          <ext:ProgressBarPager ID="grdProgressBarPager" runat="server" ></ext:ProgressBarPager> 
         </Plugins> 
        </ext:PagingToolbar> 
       </BottomBar> 
       <Features> 
        <ext:GroupingSummary ID="UserRatesGroupingSummary" ClientIDMode="Static" 
         runat="server" GroupHeaderTplString="{name}" 
           HideGroupedHeader="true" StartCollapsed="true" 
           EnableGroupingMenu="true" EnableNoGroups="true" GroupByText="grouping بهذا العمود" 
           ShowGroupsText="إظهار المجموعات Grouping" > 

        </ext:GroupingSummary> 
         <ext:Summary ID="Summary1" runat="server" />  
       </Features> 
      </ext:GridPanel> 

내가 그 값을 어떤 방법이있어하는 이벤트가 필요합니다 ..

덕분에 내 코드 인 레코드가 전달됩니다

답변

2

선택 이벤트는 the ExtJS docs에 따라 결정됩니다.

따라서 해당 레코드의 모든 필드를 가져올 수 있습니다.

<ext:Parameter Name="someField" Value="record.get('modelFieldName')" Mode="Raw" /> 
+0

Daniil에게 감사합니다. .. – haytham