Complex header with first row in the tr hidden and 2nd row has a colspan which doesnt show sorting.

Complex header with first row in the tr hidden and 2nd row has a colspan which doesnt show sorting.

P4nk4j Sh4rm4P4nk4j Sh4rm4 Posts: 25Questions: 7Answers: 0

I'm using complex header concept and the first row of the thead is hidden. Now I have applied colspan to the next row in the thead. what I'm facing is I'm unable to apply a sort to the header containing colspan. Is there any possibility to handle sorting for the header having colspan.. below is my code and a screenshot with a black border block showing where exactly I need sorting function for thead marked in the image.

Pankaj Sharma

Thanks in advance.

Replies

  • allanallan Posts: 61,665Questions: 1Answers: 10,096 Site admin

    Currently no - sorry. Each column in the DataTable must have at least one unique cell for it in the header. You can't colspan over two columns without adding another row in the header which will include a unique cell for each column.

    Allan

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @P4nk4j Sh4rm4 ,

    Yep, you can't have ordering by default on a colspanned header - see the example here. You could attach your own listener to that header cell, and then call order() to apply your own ordering.

    Hope that helps,

    Cheers,

    Colin

This discussion has been closed.