Data table not showing rows correctly

Data table not showing rows correctly

astrodemikastrodemik Posts: 2Questions: 2Answers: 0

My datatable is supposed to show 5 entries at a time and is automatically switching to the next page to display the remaing data. I am using a foreach loop in C# to populate the table (I m working on a ASP.NET web application). There are 10 entries in total. When doing the first cycle of switching pages, all entries are being displayed. The problem arises when doing the second cycle. It displays nothing and the info section displays Showing "11 to 10 of 10 entries", which is just weird.Afterwards, it will continue by only displaying the last 5 entries.

Answers

  • Bindrid2Bindrid2 Posts: 79Questions: 4Answers: 12

    We need to see how you define your datatable.
    Have you looked at the raw html to make sure its formed correctly? (meaning the table has a thead and a tbody section)

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @astrodemik ,

    That's probably because your server-side script is sending back the wrong data - see this here for the format to use when serverSide is enabled.

    If still no joy, we're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.