How to display preloaded data? ASP.net Razor PartialView

How to display preloaded data? ASP.net Razor PartialView

novi4ok123novi4ok123 Posts: 2Questions: 1Answers: 0

Hello!
I have a question! how I can display preloaded PartialView data?
for Example: I already have preloaded data in my table with this code [code]@Html.Partial("~/Views/Shared/_partialView.cshtml", new Tuple<string, long?>(IDSomething.ToString(), 0))[/code]

and now I want to display it with DataTable(), is this possible
P.S I've been searched but didn't find anything in forum, if there was duplicate question can you please also give a link to it?

Answers

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    How partial is the data? If you are using server-side processing and the partial view is just the first page, then the technique shown on this page should be used.

    Allan

  • novi4ok123novi4ok123 Posts: 2Questions: 1Answers: 0

    Hello Allan!
    PartialView just rendering some pictures based on specific data, which I got from my controllers, than I'm sending part of this data into PartialView as partialView model, and in this PartialView i do some calculations based on sended data...

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    Sure, but my point was, is it giving you just 10 rows, or the full data set? If you look at the example I sent, it shows how the HTML is already prepopulated with 10 rows of data, and then will load additional rows as needed.

    Allan

Sign In or Register to comment.