def update_from_params(params)
      params.symbolize_keys!
      params_to_rules params
      self.data_type = params[:datatype] if params[:datatype]
      self.sort_by = params[:sidx] if params[:sidx]
      self.sort_order = params[:sord] if params[:sord]
      self.current_page = params[:page].to_i if params[:page]
      self.rows_per_page = params[:rows].to_i if params[:rows]
      self.total_rows = params[:total_rows].to_i if params[:total_rows]
      if tree_grid
        self.nodeid = params[:nodeid].to_i if params[:nodeid]
        self.n_level = params[:n_level].to_i if params[:n_level]
        self.n_left = params[:n_left].to_i if params[:n_left]
        self.n_right = params[:n_right].to_i if params[:n_right]
      end
    end
def update_from_params(params)
      params.symbolize_keys!
      params_to_rules params
      self.data_type = params[:datatype] if params[:datatype]
      self.sort_by = params[:sidx] if params[:sidx]
      self.sort_order = params[:sord] if params[:sord]
      self.current_page = params[:page].to_i if params[:page]
      self.rows_per_page = params[:rows].to_i if params[:rows]
      self.total_rows = params[:total_rows].to_i if params[:total_rows]
      if tree_grid
        self.nodeid = params[:nodeid].to_i if params[:nodeid]
        self.n_level = params[:n_level].to_i if params[:n_level]
        self.n_left = params[:n_left].to_i if params[:n_left]
        self.n_right = params[:n_right].to_i if params[:n_right]
      end
    end
:and, :or
 finds records based on request params
 e.g. params from jqGrid
   :_search      do search (true/false)  ["false"]
   :sidx         sort index (column to search on)  [""]
   :sord         sort direction (desc/asc)  ["asc"]
   :nd           ?
   :rows         number of items to get   ["20"]
   :page         page number (starts at 1) ["1"]