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

  • Home
  • SEARCH
  • 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 9052347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:08:48+00:00 2026-06-16T13:08:48+00:00

Say I have a jquery grid ( plugin). Ofcourse it has the option to

  • 0

Say I have a jquery grid ( plugin).

Ofcourse it has the option to get data from an ajax source or from other source(client source).

Now lets say that when a page loads , I should display initial data( well not much data because I have a pager and from the second page and so on, the request paged got as an ajax result)

HOW should I bind the initial data (design POV)

options I have :

  • In – ASP.net / PHP ( on server code ) register a startup client script which will run after the page loads(this script will fetch data by ajax)

( cons: it will actually do 1 more request to the server (to fetch the data))

  • I could write (with the initial response ) a hidden field which will hold the json data (still) by register client startup script – and in <Script> – read data from the hidden field.

  • other option ?

what is the correct way of doing it ?

p.s. I dont want to put the bind in document.ready because I believe it is better to bind data a lot sooner.

  • 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-16T13:08:49+00:00Added an answer on June 16, 2026 at 1:08 pm

    I prefer the first approach where the view UI is completely separate from the data source even though it results in a second response from the server.

    This allows the view to be cached entirely; though there are caching options for fragments on some platforms (like ASP.NET) so with a bit of configuration embedded data is probably not that much of a big deal.

    If you want to limit callbacks then the same exact code responsible for generating JSON replies (for paging or server side filtering service calls necessary for the grid to function) is used to provide the first page of data embedded within the page itself upon request.

    As an aside DataTables supports this functionality (embedded data with subsequent requests satisfied by AJAX calls).

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

Sidebar

Related Questions

Let's say I have a jquery plugin that has an onSelect attribute. The user
Say I have a Telerik MVC Grid, AJAX bound and I want to put
Say I have the following jQuery plugin: $.fn.myPlugin = function () { //plugin code
So let's say I have jQuery convert a simple text input from this <input
Lets say I have a jquery plugin called widget which can be used on
Say I have a jQuery plugin like $.abc = function() {}. Now I want
Lets say I have the following jQuery plugin (this is just an example to
Say I have a jQuery object of uncertain contents (from something that could be
Let's say I have the following jQuery AJAX call: $.ajax({ type: POST, url: MyUrl,
here I have jQuery ajax calling a .php file that SOMETIMES executes let's say

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.