Editor empty joined table: populating joined row select list/check boxes before getting rows of data

Editor empty joined table: populating joined row select list/check boxes before getting rows of data

burncharburnchar Posts: 118Questions: 12Answers: 0
edited October 2012 in Editor
EDIT: My mistake. See my reply below.

---

Editor with joined tables does not seem to support inserting new rows on empty tables.

For example, I have a table with check boxes to select equipment. When starting from a newly created table, the editor form where the check boxes normally go is empty -- not even empty checkboxes. This is probably because the JSON which informs Editor of the available values is not sent until rows of data are sent -- at least, that's how it looks in the joined table example. I'm not sure I'd call this a bug, but it's not what I'd call expected behavior (all other fields work fine).

Workarounds: I suspect some initializing JSON could be sent to the editor with empty row data, or if the table isn't actually empty (just the Datatable), some rows can be sent when the data table is initialized.

(This is unrelated to my recent post about empty select boxes)

Replies

  • allanallan Posts: 63,602Questions: 1Answers: 10,486 Site admin
    How are you setting the values / options for the checkboxes and how are you getting those value from the server? Your assumption sounds absolutely correct to me - but I think I need a bit more information to be able to fully understand and be able to recreate the problem.

    Allan
  • burncharburnchar Posts: 118Questions: 12Answers: 0
    [quote]allan said: How are you setting the values / options for the checkboxes[/quote]

    Upon further analysis, I made the simplifying assumption that there was no need to get the joined table contents ("access" object in the joined example) without also getting the items from that object used by each row (the value/label stuff in aaData).

    Because of my design, unless rows of data were sent, the available values for joined fields were not.
    I was pretty tired last night -- 15 hour day -- so wasn't thinking clearly. My apologies for assuming this was a problem with DataTables and not my own code.
  • allanallan Posts: 63,602Questions: 1Answers: 10,486 Site admin
    No worries - good to hear you got to the bottom of it :-)

    Allan
This discussion has been closed.