How to use Datatables with Razor ? filter-export critical issue

How to use Datatables with Razor ? filter-export critical issue

supercoolsupercool Posts: 7Questions: 4Answers: 0
edited September 2014 in Free community support

Hi allan and eveyone ,

I been trying from couple of days trying to bind my view part with controller in razor style and i done to a level well everything working cool but i'm stuck now & any clue is appreciated .

My mvc controller returns something like

public ActionResult Listings(string id)
  {
// my code to build list
return View(//My List);
}

In cshtml :

 @foreach (WebApp.Models.PersonModel item in Model)
                {
                <tr>
                    <td>@item .ContactPerson</td>
               </tr>
                  }

I am loading/sorting even exporting also fine with wonderful tabletools but not as expected .

Problem : When i mention a search criteria like name say 'jeff' i get contatcperson names with jeff and i try to export to pdf/excel but i get all records which are loaded into datatable exported not filtered ones? is this a bug with DT or any thing i need to correct from my end ?

PS : i have done filter based export when i am using sAajxSource etc with controller returning JSON but now its not the case you can clearly understand

Thank you

Answers

  • supercoolsupercool Posts: 7Questions: 4Answers: 0

    oSelectorOpts done the trick . Thank you some wonderful tiny options allan

This discussion has been closed.