server side processing combined with other stuff

server side processing combined with other stuff

cmoozcmooz Posts: 21Questions: 0Answers: 0
edited April 2009 in General
Hi,

When i am using the server side table processing the table generates als all seems to work.

But i want to add some more features like

- highlighting
- field editing
- remove rows
- hidden row details

and i also tried some other stuff

nothing works for me combined with the server side processing.

i think there is one stupid mistake i am making while adding features.

has anyone else experienced something like this before and can someone please help me with this?

thanks

Replies

  • allanallan Posts: 63,230Questions: 1Answers: 10,417 Site admin
    Hi cmooz,

    There a couple of key things which you need to remember when using server-side processing:

    1. The DOM for the table's tbody is recreated on every draw - this means that event handlers must be applied on each draw ( fnDrawCallback() )
    2. The processing is all done on the server-side - the client-side basically only deals with events.

    So regarding each of your points:

    - highlighting

    Highlighting a row is done through CSS, although if you want to add effects such as fade, you need to apply the relevant event handlers on each draw!

    - field editing

    Again, remember to add the event handlers on draw. Then when the field has been edited you need to post that information to the server such that it can update it's data source.

    - remove rows

    Like field editing this information must be passed to the server-side so it can delete the row and then send the required information back to the client-side. fnDeleteRow() will not do this! It is up to the developer to decide how to implement this since there are lots of different ways, and the best method depends on the situation.

    - hidden row details

    This is addressed in your other thread: http://datatables.net/forums/comments.php?DiscussionID=166


    So I think the key thing is to remember that the event handlers need to be reapplied. Others have also pointed out that you can use liveQuery or live() in jQuery 1.3 to help address this.

    Allan
This discussion has been closed.