NetTalk Central

Author Topic: NetWebBrowse - Design considerations  (Read 2551 times)

jslarve

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
NetWebBrowse - Design considerations
« on: October 05, 2016, 02:52:53 PM »
I have a database of line items. There can be multiple prices assigned to a line item via a child table.

(if one record has 2 children, then ALL records will have 2 pricing children in this particular situation)

I would like to dynamically be able to display xx number of pricing columns for xx number of child records.

I have one way that I started to solve, that seems to work okay, but it can get messy. I have a column in my browse, where I dynamically generate xx table structures to go in that column. It seems to work okay. e.g., this might be inside a cell, representing one child record:

This is the kind of thing I'm generating.
<TABLE WIDTH="100%">
  <TR>
     <TH width="30%">M</TH>
     <TH width="30%">L</TH>
     <TH width="30%">E</TH>
   </TR>
   <TR>
       <TD>$33.00</TD>
       <TD>$220.00</TD>
       <TD>$100.00</TD>
   </TR>
</TABLE>

So, in theory, I could put a couple of tables in that cell.

But since I'm early into this project, I'm wondering if there's a "more nettalk" way of doing this. I don't wish to have a bunch of pre-designed hidden columns. There are a whole lot of different cost fields per child record, and depending on the kind of database, we'll display different fields.

Thanks and Best wishes
Jeff Slarve

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: NetWebBrowse - Design considerations
« Reply #1 on: October 05, 2016, 06:06:15 PM »
Hi Jeff,

1. So, first thought is .. Is a child browse out of the question?

2. You could have one big column, a local field say, big long string, tick xhtml options in template, and have code that builds for that column it's own table structure (or divs).

3. You could use a memory file for the whole browse, and build it to have both parent and child table records as records in the mem file. You could then have a "buffer" column in the row that is displayed when the level (or whatever you want to call it) of the record is "2", ie child record, which would make it visibly obvious it was a child record.

Hope something there might help.

Stu
Cheers,

Stu Andrews

jslarve

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
Re: NetWebBrowse - Design considerations
« Reply #2 on: October 05, 2016, 07:49:17 PM »
Thanks for the comments, Stu. I'm pretty much in the #2 realm at the moment.

It seems doable, but I had to unlearn some pre-HTML5 stuff with TABLE structures in xHTML. I was getting the "Next Button of Death" because I was trying to specify column width in pixels.  :-)

This page got the bells ringing for that http://www.w3schools.com/tags/tag_table.asp

Thanks again.
Jeff Slarve