title: jqgrid attaching data to a Cell
body: <p>I've been using the jgrid for a couple of weeks and I love it.</p>
  
  <p>We are using SignalR to provide updates to the grid, when a update comes in we highlight a cell on the grid and that highlight will fade after a user configured time.</p>
  
  <p>currently to do this - we use data- attributes and every 3 seconds process all the elements with the attribute and decide on what class to apply.</p>
  
  <p>the problem with this approach is that every time a client side event happens (sorting, paging, grouping, filter) these data- attributes are lost.</p>
  
  <p>to combat that we have been using arrays to manage this but its got very messy and is just a nightmare already to maintain!</p>
  
  <p>So what Id like to know is - is there a better way to attach data to a cell.. possibly at the array level? for example, id like to be able to just set a property on the cell in the data object and then just process that rather than maintaining lots of lists!</p>
  
  <p>ok so long story short! is it possible to attach additional information a cell? so it can then be processed when the page is loaded..</p>
  
  <p><strong>Additional information</strong></p>
  
  <p>Setting the actual cell value isnt a problem, its attaching additional information to the cell which we need to do - currently we add a last updated data- attribute to the cell and this lets us decide on how to display that cell in the grid (it can changed based on multiple threshold that are defined by the user)</p>
  
  <p>I have used the jquery.data() but sadly that was destroyed when the element was removed from the dom.</p>
  
  <p>I could just use a single array but im hoping for a better solution!</p>
  
  <p><strong>Answer</strong></p>
  
  <p>Decided to use $(grid).jqGrid('getLocalRow', id)["field"] = value; this was persisted for the life of the grid and allowed me to query they property ongridloadcompleted!</p>
  
  <p>cheers.
  ste.</p>