Vepraskas

DataGrid Selected Row, Obtain Values?

Discussion created by Vepraskas on Aug 20, 2012
Latest reply on Aug 20, 2012 by Vepraskas
I am using a datagrid to get search results.  I want to be able to pull off the cell values when a user selects a row.

<table dojotype="dojox.grid.DataGrid" jsid="grid" id="grid" onSelected="onSelectedGridParm" selectionMode="single" >
         <thead>
            <tr>
              <th field="FieldOne" formatter="makeZoomButton" width="25px">
                <img alt="+" src="images/zoom.png"/>
              </th>
              <th field="FieldTwo" width="100%">FieldTwo</th>
              <th field="FieldThree" width="100%">FieldThree</th>
              <th field="FieldFour" width="100%">FieldFour</th>
              <th field="FieldFive" width="100%">FieldFive</th>
              <th field="FieldSix" width="100%">FieldSix</th>
              <th field="FieldSeven" width="100%">FieldSeven</th>
            </tr>
          </thead>
        </table>


So when a user selects one of the rows in the grid I would like to end up with each cell in that row broken out into its own variable.

 function onSelectedGridParm(nRow) {
            var FieldTwoValue= dijit.byId("grid").store.getValues(nRow, "FieldTwo");
            var FieldThreeValue= dijit.byId("grid").store.getValues(nRow, "FieldThree");
            var FieldFourValue= dijit.byId("grid").store.getValues(nRow, "FieldFour");
            var FieldFiveValue= dijit.byId("grid").store.getValues(nRow, "FieldFive");                      


        }


I have been running around in circles, any help would be appreciated Thanks!

Paul

Outcomes