We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to sort my jqgrid like this:
def index tup = SmartTuple.new(" AND ") tup << ["firstname like ?", "%#{params[:firstname]}%"] if params[:firstname].present? tup << ["lastname like ?", "%#{params[:lastname]}%"] if params[:lastname].present? tup << ["email like ?", "%#{params[:email]}%"] if params[:email].present? tup << ["function like ?", "%#{params[:function]}%"] if params[:function].present? users = User.find(:all, :conditions => tup.compile).paginate :page => params[:page], :per_page => params[:rows], :order => params[:sixd]
respond_to do |format| format.html format.json { render :json => users.to_jqgrid_json([:id,:firstname,:lastname,:email,:function], params[:page], params[:rows], users.total_entries) } end
end
The page parameters are correctly applied but it doesn't sort the way it should.
What can be wrong?
My querystring is following one:
{"q"=>"1", "_search"=>"false", "nd"=>"1301936699853", "rows"=>"10", "page"=>"1", "sidx"=>"firstname", "sord"=>"asc"}
Thanks,
Nicolas.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to sort my jqgrid like this:
def index
tup = SmartTuple.new(" AND ")
tup << ["firstname like ?", "%#{params[:firstname]}%"] if params[:firstname].present?
tup << ["lastname like ?", "%#{params[:lastname]}%"] if params[:lastname].present?
tup << ["email like ?", "%#{params[:email]}%"] if params[:email].present?
tup << ["function like ?", "%#{params[:function]}%"] if params[:function].present?
users = User.find(:all, :conditions => tup.compile).paginate :page => params[:page], :per_page => params[:rows], :order => params[:sixd]
end
The page parameters are correctly applied but it doesn't sort the way it should.
What can be wrong?
My querystring is following one:
{"q"=>"1", "_search"=>"false", "nd"=>"1301936699853", "rows"=>"10", "page"=>"1", "sidx"=>"firstname", "sord"=>"asc"}
Thanks,
Nicolas.
The text was updated successfully, but these errors were encountered: