However, I obviously don't want to hard-code the page number… and instead it should be set depending on what page I'm on when I click the column to sort by.
yeah it stayed at the current page but the data.. but it sorts all the data not the data within the selected page. is there any way to sort the data in the selected page?
for instance i have an alphabet table:
im in page 2 and the data in the table are-
p
s
t
r
and i want to sort those data and it would be like: