Custmozing Searchpane Headers, width and Scrolling

Custmozing Searchpane Headers, width and Scrolling

Larry27Larry27 Posts: 35Questions: 10Answers: 0

Link to test case: https://www.baldwinproject.ca/app/sched40-ws.php
Debugger code (debug.datatables.net): https://debug.datatables.net/ejehef
Error messages shown: One, non-related error - .map file issue
Description of problem: My searchpane is filtering as I want, but I need to customize a few things. I've spent hours search for the right information, and I have found many answers to my questions, but 4 have eluded me so far.
I have these 4 remaining issues;
1. Set column width, so that 2 character fields don't use the same space as other fields. Please see the column 'Type'
2. Each pane only shows 6 records, but when I scroll a pane using the mousewheel, it moves down more than 20 records, so I simply don't see many options.
3. Over the population and household columns I want to show the name of the column, but not the other controls
4. I see in the debugger there are 2 draws when I refresh my page. It's not clear to me what triggers this behaviour. Could you point me to some documentation on this issue?

Any help you can offer, I would appreciate.

Thanks,

Larry

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,483Questions: 1Answers: 10,467 Site admin
    Answer ✓

    Set column width, so that 2 character fields don't use the same space as other fields. Please see the column 'Type'

    In the SearchPanes? There isn't an option for that I'm afraid. You could probably come up with some custom CSS to target that pane specifically:

    div.dtsp-searchPanes div.dtsp-searchPane:nth-child(...)
    

    for example, but a bunch of them would probably need to be tweaked.

    Each pane only shows 6 records, but when I scroll a pane using the mousewheel, it moves down more than 20 records, so I simply don't see many options.

    It scrolls down 20+ rows with each mouse wheel? I'm not seeing that I'm afraid, it appears to be scrolling as I would expect.

    Over the population and household columns I want to show the name of the column, but not the other controls

    See columns.searchPanes.controls.

    I see in the debugger there are 2 draws when I refresh my page. It's not clear to me what triggers this behaviour. Could you point me to some documentation on this issue?

    I just see a single Ajax request to sched40_2018_1699.json when the page is loaded. This is latest Firefox on Linux.

    One other thing I spotted - you appear to be loading the CSS for both DataTables and Bootstrap styling. Load just one. Loading both is what is causing the paging control to look odd. Use the download builder if you aren't sure what files to include.

    Allan

  • Larry27Larry27 Posts: 35Questions: 10Answers: 0

    Thanks Allan,

    I'm sure I can come up with a way in CSS to size my column widths independently. Given all the other rich features of DataTables, this is a minor tweaking issue :)

    Turns out the issue with the scroll boils down to my mouse setting, which I have now tweaked, lol.

    I meant to ask about loading the 2 CSS files, but forgot. I'm glad you picked up on it, thanks.

    I'll tinker with the columns.searchpanes.controls again. I might focus a bit more closely, now that I don't have these other issues also distracting me.

    Thanks so much for your speedy reply, it is greatly appreciated.

    DataTables, is an amazing tool.

    Larry

Sign In or Register to comment.