title: JQGrid: Can't get Row ID in DataInit function
body: <p>Ok I came back to this, I just removed the formatter: "select", which was requiring a matched state key to display in the grid.  </p>
  
  <hr>
  
  <p>Ok I give up, my solution is: </p>
  
  <p>search: false, editable: false</p>
  
  <p>until the new version of JQGrid.  </p>
  
  <hr>
  
  <p>Ok, so looking at Oleg's code, it seems the solution there is to initially populate the state select with every possible value for all countries.   Given that there are quite a few "states" (worldwide) that I deal with, it's a bit kludgy to pull down 3-4000 states just to find a match to the actual cell value. Still working on this.</p>
  
  <hr>
  
  <p>I have dependent country and state dropdowns (both toolbar search, inline edit, and form edit).  I am having a problem getting the row id in the datainit function, so that I can retrieve the country value from the datainit function of the state searchoptions/editoptions.</p>
  
  <p>Surely there's a way to retrieve this?  I tried setting a timeout as well, no luck:</p>
  
  <pre><code>    { name: "State", index: "MYSTATE", width: 50, align: "left", editable: true, formatter: "select", stype: "select", edittype: "select", sortable: true, editrules: { required: true, custom: true, custom_func: validateState },
              searchoptions:
              {
                  value: GetStates('NG', true), // just hardcoded here for now
                  dataInit: function (elem)
                  {
                      var rowId = $(elem.target).closest('tr.jqgrow').attr('id');
                      var country = grid.jqGrid('getCell', rowId, 'Country');
  </code></pre>
  
  <p>...</p>
  
  <p>Thanks.</p>