 $(document).on 'page:load ready', -> initWiceGrid()
+
+globalVarForAllGrids = 'wiceGrids'
 
 initWiceGrid = ->
 

          templates   : filterDeclaration.declaration.templates
          ids         : filterDeclaration.declaration.ids

    window[gridName] = gridProcessor

    setupDatepicker()
    setupSubmitReset wiceGridContainer, gridProcessor


getGridProcessorForElement = (element) ->
  gridName = $(element).data('grid-name')
  if gridName && window[globalVarForAllGrids]
    window[globalVarForAllGrids][gridName]
  else
    null

