Is there an usable example of a basic table understandable for beginners?

Is there an usable example of a basic table understandable for beginners?

eefeef Posts: 7Questions: 2Answers: 0

Hi,
I want a Datatable-table in a javascript variable and later on, display the table.

As simple as the wanted functionality is, the cryptic the examples are. When I am reading about row.child() I read what was also possible in the past and possible in the future, is doesn't tell you HOW!

So, can someone explain to me when you draw a table with HML, make it a jQuery-variable and do nice things to the table works (i guess) but when you have a JSON object, there is no straight forward (understandable) way to go?

This is definitely not a rant but all examples with tables id'd 'example' are pretty useless when you don't understand what to say to what; DataTables, jQuery, javascript, HTML. How do you start? Where do you start?

After struggling for a full week now (what a waste of time/money!!!), it seems to me that the examples, references and tutorial seem to forget to address the first step (after downloading of course) to build a simple. straight-forward and usable table. Repeating same the #example table whith trivials isn't much of a help.

Ahh, documentation. For instance, in the reference, row.child() tells you about the function:
..
However, it is also possible to pass in a tr element which has multiple cells (one for each column in the table) to show the child row data in the same column structure as the main table.
..
HOW to do that is not explained anywhere.

Another thing is, why do colgroups not work at all? The forum? When you use 'colgroup' as search word, you get ROWgroup answers. Why?

DataTables are great but what is the point of that when the startup phase / learning curve is so unnecessary frustrating?
Frustrated? Yes, Rant? NO

Kind regards,
Eef

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 21,083Questions: 26Answers: 4,908
    Answer ✓

    I don't know how to answer your questions about the examples and docs except to say that there is an assumption of some level of knowledge. I will say that when I first started with Datatables I was learning Javascript, HTML, etc at the same time. It took a awhile for me to put it all together.

    My suggestion would be to start with one of the sandbox pages that are setup with an initial table.
    https://datatables.net/manual/tech-notes/9

    You mentioned JSON objects. Maybe the Ajax with objects example would be the place to start:
    http://live.datatables.net/ajax-objects/1/edit

    Using this will allow you to build up some examples and post questions with links to the example you are working with. I think this will be more effective than to have someone re-explaining what is in the docs and examples.

    Kevin

  • eefeef Posts: 7Questions: 2Answers: 0

    Kevin, Thanks-a-million!

    True, you can't just learn DataTables. My point was (and is) the examples don't tell you, for instance, what is a jQuery object and a simple javascript variable. How do you make a DataTable table out of a jQuery object, from a javascript string?

    In other words, if there is more than one language in a script, it would IMHO be much better to state what statement is what language. It would take away the maybe greatest reason why it is so harsh to several languages at the same time: confusion. What do you learn precisely when you cannot distinguish the languages, sometimes having the same function(names)?
    Anyway, I'll have a look at your suggestions, they must be better than I have read so far, it must be ;-)

    I really appreciate that you spent time on my near-rant ;-) and let you know, how about that?

    Ciao,
    Eef

  • eefeef Posts: 7Questions: 2Answers: 0

    Kevin,

    Your suggestions where of great help. And after having read your reaction on another rant-like post I feel more positive and started a 'normal' question using the other hemisphere ;-) Indeed, it is more productive to ask a question than stating your opinion.

    Frustration is a strange thing don't you think? It leaks out of your brain until completely exhausted; I also am unable to find the tap when it happens.

    Furthermore, is it an idea, for me, try to write some beginners-traps and how to cope with 'em? Or is this against any policy? Your thoughts would be appreciated, okay?

    Ciao,
    Eef

  • kthorngrenkthorngren Posts: 21,083Questions: 26Answers: 4,908
    Answer ✓

    Indeed, it is more productive to ask a question than stating your opinion.

    As you see Allan takes all input. Providing suggestions is one thing. I don't have a problem with that. Its all in how its approached. It might be that many don't realize this, up until recently, is a one man shop providing all this code and support.

    Furthermore, is it an idea, for me, try to write some beginners-traps and how to cope with 'em? Or is this against any policy? Your thoughts would be appreciated, okay?

    Any tips you post are very welcome.

    Kevin

This discussion has been closed.