Creating a Dynamic Grid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spooky
    New Member
    • Oct 2006
    • 27

    #1

    Creating a Dynamic Grid

    Hi,

    I need to create a grid with two columns the first being the id and the second name which should be generated automatically.. .
    I should be able to enter values in the first cell..

    Its urgent please reply
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    Originally posted by spooky
    Hi,

    I need to create a grid with two columns the first being the id and the second name which should be generated automatically.. .
    I should be able to enter values in the first cell..

    Its urgent please reply
    Have a look at this

    And also this

    Debasis Jana

    Comment

    • spooky
      New Member
      • Oct 2006
      • 27

      #3
      Hi,

      Thanks for the reply but i did not understand what you ment with those liks

      Comment

      • dmjpro
        Top Contributor
        • Jan 2007
        • 2476

        #4
        Originally posted by spooky
        Hi,

        Thanks for the reply but i did not understand what you ment with those liks
        [code=javascript]
        var ref = document.create Element('table' );
        var row = document.create Element('tr');
        row.setAttribut e('atr_name','a tr_value');
        ref.appendChild (row);
        .
        .
        //do the chain ...............
        .
        .
        document.body.a ppendChild(ref) ; //finally added to body
        [/code]

        Debasis Jana

        Comment

        • gregerly
          Recognized Expert New Member
          • Sep 2006
          • 192

          #5
          Originally posted by dmjpro
          [code=javascript]
          var ref = document.create Element('table' );
          var row = document.create Element('tr');
          row.setAttribut e('atr_name','a tr_value');
          ref.appendChild (row);
          .
          .
          //do the chain ...............
          .
          .
          document.body.a ppendChild(ref) ; //finally added to body
          [/code]

          Debasis Jana
          For this to work properly, I believe you need

          [CODE=javascript]var tbody = document.create Element('tbody' );[/CODE]

          between your table var and tr var...

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Originally posted by gregerly
            For this to work properly, I believe you need

            [CODE=javascript]var tbody = document.create Element('tbody' );[/CODE]

            between your table var and tr var...
            That's correct. See Browser Bugs, Quirks and Inconsistencies.

            Comment

            Working...