Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9289877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:17:06+00:00 2026-06-18T20:17:06+00:00

I am using the webgrid so i can display data from my database. On

  • 0

I am using the webgrid so i can display data from my database. On page load the grid is displaying correctly on the page, but when i try to filter the data, i have a textbox and a submit button, when i press on the search button i get an error : “a jquery script reference is required in order to enable ajax support in the webgrid helper”. I cant seem to find were the problem is.

this is my grid in my view,
Hello,
I am using the webgrid so i can display data from my database. On page load the grid is displaying correctly on the page, but when i try to filter the data, i have a textbox and a submit button, when i press on the search button i get an error : “a jquery script reference is required in order to enable ajax support in the webgrid helper”. I cant seem to find were the problem is.

this is my grid in my view,

        <div id="myGrid">
            @Html.Partial("Grids/_gridPayments", Model)
        </div>

this is my partial webgrid view

@model IEnumerable<DAS.DAL.CustomerPayment>

@{  
var grid = new WebGrid(source: Model, rowsPerPage: 15, ajaxUpdateContainerId: "myGrid");

@grid.GetHtml(rowStyle: "gridRow", alternatingRowStyle: "gridAltRow", footerStyle: "gridFooter", columns: grid.Columns(
                   grid.Column("FullName", "Πελάτης"),
                   grid.Column("Amount", "Ποσό", format: (item) => string.Format("{0:C}", item.Amount)),
                   grid.Column("Descr", "Περιγραφή"),
                   grid.Column("DTPaid", "Ημερομηνία πληρωμής", format: (item) => string.Format("{0:dd-MMM-yyyy}", item.DTPaid))
               ));
}

and finally my controller function is

var payments = BLPayments.getAllPayments();

       if (!string.IsNullOrEmpty(txtSearchCustomer))
           payments = payments.Where(a => a.FullName.Contains(txtSearchCustomer)).ToList();
       if (!string.IsNullOrEmpty(txtSearchFromDate) && !string.IsNullOrEmpty(txtSearchToDate))
           payments = payments.Where(a => a.DTPaid >= DateTime.ParseExact(txtSearchFromDate, "MM/dd/yyyy", null) && a.DTPaid <= DateTime.ParseExact(txtSearchToDate, "MM/dd/yyyy", null)).ToList();
       if (!string.IsNullOrEmpty(txtSearchFromDate) && string.IsNullOrEmpty(txtSearchToDate))
           payments = payments.Where(a => a.DTPaid >= DateTime.ParseExact(txtSearchFromDate, "MM/dd/yyyy", null)).ToList();
       if (string.IsNullOrEmpty(txtSearchFromDate) && !string.IsNullOrEmpty(txtSearchToDate))
           payments = payments.Where(a => a.DTPaid <= DateTime.ParseExact(txtSearchToDate, "MM/dd/yyyy", null)).ToList();

       return PartialView("Grids/_gridPayments", payments);

thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T20:17:08+00:00Added an answer on June 18, 2026 at 8:17 pm

    Added this code
    if (Request.IsAjaxRequest())
    return PartialView("Grids/_gridPremadeMeals", premadeMeals);
    else
    return View("ViewPremadeMeals", premadeMeals);

    and worked. I think it was refreshing the whole page, but still cant find why..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using WebGrid to display data from Model. I want that ID column
I am using MVC3 and displaying my data in a webgrid. I would like
I'm using MVC3 webgrid to display, sort and paginate data. The display is fine,
I am using MVC3 webgrid. I am displaying the data in a webgrid and
I am using a webgrid to display some dynamic data. I have recently refactored
Can we create a WEB GRID dynamically using JAVASCRIPT ? I am using MVC
I tries to fill webgrid using one answered question and an article , But
I can easily hookup a webgrid and add ajax to it using the default
I am using a WebGrid to display a List of Items, some items in
In ASP.NET MVC3 I am using a Webgrid to populate the data. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.