Hi Nguyen,
Your question is a bit cryptic, so hopefully I understand your challenge.
Assumption 1: the filter by clicking a header in a datagrid is not sufficient, as it doesn't support a secondary sorting attribute when the value of that column is the same.
Assumption 2: there are 2 main sorting orders used: {number ASC, date ASC} and {number DESC, date DESC}
Check question: isn't number unique?
As datagrid doesn't allow to set multiple sorting columns out-of-the-box(except for default), you could develop a small work-around: put 2 datagrids on the page, one with default sort order 1 and one with default sort order 2. And show/hide using conditional visibility by toggling a boolean on a Non-persistent context entity.
Hopefully this makes sense. Good luck!