Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Re: Refresh DataTable after updating JSON in local variable

Expand Messages
  • Frank Dietrich
    Satyam, ... Thanks, Yes, I know, just read it in another post from You yesterday. ... Probably nothing. But it s another new thing. I ve been trying to refresh
    Message 1 of 11 , Jul 29 11:19 AM

      >As a general rule, it is unwise to modify or even read any variables
      >that start with an underscore. Those variables are meant to be private
      >which means you shouldn't be looking at them....

      Thanks, Yes, I know, just read it in another post from You yesterday.

      > What's wrong with using methods insertColumn and removeColumn?

      Probably nothing. But it's another new thing. I've been trying to
      refresh the contents of the table for about 8-10 hours of intensive
      work and research in the docs and here in the forum. You see, that
      this thread with a lot simpler question then mine is around for a few days.

      for someone more or less from outside, the whole datatable is complex
      and confusing because You often don't know which switch to use in order
      to get a certain result. I am more and more understanding these things
      deeply investigating it in firebug and reading most of the subjects here.

      Still, sometimes simple things are not at hand and literally take hours to find out
      the API-documentation oftenly is not much of a help as it does not contain
      text and examples. So oftenly I might look at the correct function, but am
      not realizing that it's the one I need in this situation.

      Oftenly accidentally or by falling over another post, I find out that "args"
      contains the objectReference I am desperatly searching for or what "args"
      actually *can* be.

      Yesterday I needed the Row and col Indices in my custom formatter. Now I
      know where I can get them from, but yesterday it took me quite a while.
      Finding getRecordIndex() was easy after I was searching for a simple property
      for quite some time. I was desperatly looking for some "CurentIndex".

      This is scanning through an array, why do I need to call a function getRecordIndex()
      that needs a row-object and internally does a rescan over the whole recordset, finally
      returning me the index of the record I am already standing on. ?

      OK, finally having the row index, it should be easy to get the columnindex as well...
      but where is getColumnIndex() ?? ... ok, not on the table, not on the recordset, it's
      on the column...

      these are things that take a person familiar with this stuff about 5 to 10 seconds,
      a person like me, dealing with JavaScript for about 1-2 months, 5 to 10 hours.

      During this time I have "_ColumnSet" right infront of my eyes and it holds all information
      I need. I am searching, but I can't find "setColumnSet()" or something like it. So I *need*
      to start working with the underscore-value at least until I know better. I am having
      currently something like 270 hours in the project, 70 of them get payed. It's great
      fun and I am learning in major steps but sometimes I simply need to get on.

      A few days ago I had a problem with a custom formatter under IE6 where

      var oDT = elCell.parentNode;

      caused an error. You answered "why not work with elCell directly", which was absolutely
      correct. Yesterday I fell over it again. Working with the DT is needed when the cell
      does not contain Data and the background needs to be colored. otherwise only a tiny
      part of the cell will be colored when one other cell causes an overflow and extends the
      row-height. The div is not high enough (if not treated separatly)

      funnily DOM.addClass( elCell.parentNode, cAddClass); even works in IE.

      Coming back to
      > What's wrong with using methods insertColumn and removeColumn?

      rows, columns, data and the appearance of each cell change in this special case. I have been
      struggling with a proper refresh for several hours, where the columns have been an issue only 15 minutes
      or so. I threw in the new ColumnSet and it almost did good. I did not come to the idea of removing and readding column by column but doubt it would give me much of a performance gain. Also not knowing what's going on internally, bears another problem source. And again it means reading and finding out how to do this best...

    Your message has been successfully submitted and would be delivered to recipients shortly.