want to make a single column invisible in that html table

Discussion in 'ASP .Net' started by Valli, Sep 22, 2007.

  1. Valli

    Valli Guest

    Hi,

    I am adding records to htmltable using javascript coding. I want to
    make a single column invisible in that html table.
    Can anyone help me in this?

    My javascript code to add a new row in html table follows below:
    var tbody =
    document.getElementById('tblorederlist').getElementsByTagName('tbody')[0];

    var row = document.createElement('TR');

    var td1 = document.createElement('TD');

    var td2 = document.createElement('TD');

    var td3 = document.createElement('TD');

    td1.innerHTML=orderorpositiontype;

    td2.innerHTML =buysell;

    td3.innerHTML = buyselltype;

    row.appendChild(td1);

    row.appendChild(td2);

    row.appendChild(td3);

    tbody.appendChild(row);


    My target is to make 2column invisible..What is the javascript coding
    require for this?

    --
    Regards
    Valli
     
    Valli, Sep 22, 2007
    #1
    1. Advertising

  2. Valli

    Just Me Guest

    <td style="visibility:hidden;">

    "Valli" <> wrote in message
    news:upOB$0N$...
    > Hi,
    >
    > I am adding records to htmltable using javascript coding. I want to
    > make a single column invisible in that html table.
    > Can anyone help me in this?
    >
    > My javascript code to add a new row in html table follows below:
    > var tbody =
    > document.getElementById('tblorederlist').getElementsByTagName('tbody')[0];
    >
    > var row = document.createElement('TR');
    >
    > var td1 = document.createElement('TD');
    >
    > var td2 = document.createElement('TD');
    >
    > var td3 = document.createElement('TD');
    >
    > td1.innerHTML=orderorpositiontype;
    >
    > td2.innerHTML =buysell;
    >
    > td3.innerHTML = buyselltype;
    >
    > row.appendChild(td1);
    >
    > row.appendChild(td2);
    >
    > row.appendChild(td3);
    >
    > tbody.appendChild(row);
    >
    >
    > My target is to make 2column invisible..What is the javascript coding
    > require for this?
    >
    > --
    > Regards
    > Valli
    >
     
    Just Me, Sep 22, 2007
    #2
    1. Advertising

  3. Valli

    Valli Guest

    Hi,

    Thanks for your answer.

    If I set Visibility property, the cell is made invisible but it occupies
    its own space in the table(a blank space is displayed in that cell). For me,
    the space must also be made invisible. In the design of that table, If i set
    visible = 'false, its made invisible. But in Javascrip coding , What should
    I write to make that cell invisible completely?

    Can you help me in this.

    Regards
    Valli

    "Just Me" <news.microsoft.com> wrote in message
    news:%23Pyrt4O$...
    > <td style="visibility:hidden;">
    >
    > "Valli" <> wrote in message
    > news:upOB$0N$...
    >> Hi,
    >>
    >> I am adding records to htmltable using javascript coding. I want to
    >> make a single column invisible in that html table.
    >> Can anyone help me in this?
    >>
    >> My javascript code to add a new row in html table follows below:
    >> var tbody =
    >> document.getElementById('tblorederlist').getElementsByTagName('tbody')[0];
    >>
    >> var row = document.createElement('TR');
    >>
    >> var td1 = document.createElement('TD');
    >>
    >> var td2 = document.createElement('TD');
    >>
    >> var td3 = document.createElement('TD');
    >>
    >> td1.innerHTML=orderorpositiontype;
    >>
    >> td2.innerHTML =buysell;
    >>
    >> td3.innerHTML = buyselltype;
    >>
    >> row.appendChild(td1);
    >>
    >> row.appendChild(td2);
    >>
    >> row.appendChild(td3);
    >>
    >> tbody.appendChild(row);
    >>
    >>
    >> My target is to make 2column invisible..What is the javascript coding
    >> require for this?
    >>
    >> --
    >> Regards
    >> Valli
    >>

    >
    >
     
    Valli, Sep 22, 2007
    #3
  4. Valli

    Just Me Guest

    Well, I dont think (AFAIK ) that this is possible. If you really want to
    make it invisible, why not just dont display it. You could make the fonts
    really tiny and reduce the width of the TD's I suppose. but your not going
    to be able to remove all the width occupied by the invisible cells.



    "Valli" <> wrote in message
    news:eTvgjUQ$...
    > Hi,
    >
    > Thanks for your answer.
    >
    > If I set Visibility property, the cell is made invisible but it
    > occupies its own space in the table(a blank space is displayed in that
    > cell). For me, the space must also be made invisible. In the design of
    > that table, If i set visible = 'false, its made invisible. But in
    > Javascrip coding , What should I write to make that cell invisible
    > completely?
    >
    > Can you help me in this.
    >
    > Regards
    > Valli
    >
    > "Just Me" <news.microsoft.com> wrote in message
    > news:%23Pyrt4O$...
    >> <td style="visibility:hidden;">
    >>
    >> "Valli" <> wrote in message
    >> news:upOB$0N$...
    >>> Hi,
    >>>
    >>> I am adding records to htmltable using javascript coding. I want to
    >>> make a single column invisible in that html table.
    >>> Can anyone help me in this?
    >>>
    >>> My javascript code to add a new row in html table follows below:
    >>> var tbody =
    >>> document.getElementById('tblorederlist').getElementsByTagName('tbody')[0];
    >>>
    >>> var row = document.createElement('TR');
    >>>
    >>> var td1 = document.createElement('TD');
    >>>
    >>> var td2 = document.createElement('TD');
    >>>
    >>> var td3 = document.createElement('TD');
    >>>
    >>> td1.innerHTML=orderorpositiontype;
    >>>
    >>> td2.innerHTML =buysell;
    >>>
    >>> td3.innerHTML = buyselltype;
    >>>
    >>> row.appendChild(td1);
    >>>
    >>> row.appendChild(td2);
    >>>
    >>> row.appendChild(td3);
    >>>
    >>> tbody.appendChild(row);
    >>>
    >>>
    >>> My target is to make 2column invisible..What is the javascript coding
    >>> require for this?
    >>>
    >>> --
    >>> Regards
    >>> Valli
    >>>

    >>
    >>

    >
    >
     
    Just Me, Sep 22, 2007
    #4
  5. Valli

    Valli Guest

    HI,

    I have set the display property as 'None' for that cell and now its
    working as required.

    tcell.Style.display = 'none';

    Thanks for your help.

    --
    Regards
    Valli

    "Just Me" <news.microsoft.com> wrote in message
    news:OuLGszQ$...
    > Well, I dont think (AFAIK ) that this is possible. If you really want to
    > make it invisible, why not just dont display it. You could make the fonts
    > really tiny and reduce the width of the TD's I suppose. but your not going
    > to be able to remove all the width occupied by the invisible cells.
    >
    >
    >
    > "Valli" <> wrote in message
    > news:eTvgjUQ$...
    >> Hi,
    >>
    >> Thanks for your answer.
    >>
    >> If I set Visibility property, the cell is made invisible but it
    >> occupies its own space in the table(a blank space is displayed in that
    >> cell). For me, the space must also be made invisible. In the design of
    >> that table, If i set visible = 'false, its made invisible. But in
    >> Javascrip coding , What should I write to make that cell invisible
    >> completely?
    >>
    >> Can you help me in this.
    >>
    >> Regards
    >> Valli
    >>
    >> "Just Me" <news.microsoft.com> wrote in message
    >> news:%23Pyrt4O$...
    >>> <td style="visibility:hidden;">
    >>>
    >>> "Valli" <> wrote in message
    >>> news:upOB$0N$...
    >>>> Hi,
    >>>>
    >>>> I am adding records to htmltable using javascript coding. I want to
    >>>> make a single column invisible in that html table.
    >>>> Can anyone help me in this?
    >>>>
    >>>> My javascript code to add a new row in html table follows below:
    >>>> var tbody =
    >>>> document.getElementById('tblorederlist').getElementsByTagName('tbody')[0];
    >>>>
    >>>> var row = document.createElement('TR');
    >>>>
    >>>> var td1 = document.createElement('TD');
    >>>>
    >>>> var td2 = document.createElement('TD');
    >>>>
    >>>> var td3 = document.createElement('TD');
    >>>>
    >>>> td1.innerHTML=orderorpositiontype;
    >>>>
    >>>> td2.innerHTML =buysell;
    >>>>
    >>>> td3.innerHTML = buyselltype;
    >>>>
    >>>> row.appendChild(td1);
    >>>>
    >>>> row.appendChild(td2);
    >>>>
    >>>> row.appendChild(td3);
    >>>>
    >>>> tbody.appendChild(row);
    >>>>
    >>>>
    >>>> My target is to make 2column invisible..What is the javascript coding
    >>>> require for this?
    >>>>
    >>>> --
    >>>> Regards
    >>>> Valli
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Valli, Sep 22, 2007
    #5
  6. Valli

    Just Me Guest

    Well, you learn something new every day.

    Well done !


    "Valli" <> wrote in message
    news:%23S154LR$...
    > HI,
    >
    > I have set the display property as 'None' for that cell and now its
    > working as required.
    >
    > tcell.Style.display = 'none';
    >
    > Thanks for your help.
    >
    > --
    > Regards
    > Valli
    >
    > "Just Me" <news.microsoft.com> wrote in message
    > news:OuLGszQ$...
    >> Well, I dont think (AFAIK ) that this is possible. If you really want to
    >> make it invisible, why not just dont display it. You could make the fonts
    >> really tiny and reduce the width of the TD's I suppose. but your not
    >> going to be able to remove all the width occupied by the invisible cells.
    >>
    >>
    >>
    >> "Valli" <> wrote in message
    >> news:eTvgjUQ$...
    >>> Hi,
    >>>
    >>> Thanks for your answer.
    >>>
    >>> If I set Visibility property, the cell is made invisible but it
    >>> occupies its own space in the table(a blank space is displayed in that
    >>> cell). For me, the space must also be made invisible. In the design of
    >>> that table, If i set visible = 'false, its made invisible. But in
    >>> Javascrip coding , What should I write to make that cell invisible
    >>> completely?
    >>>
    >>> Can you help me in this.
    >>>
    >>> Regards
    >>> Valli
    >>>
    >>> "Just Me" <news.microsoft.com> wrote in message
    >>> news:%23Pyrt4O$...
    >>>> <td style="visibility:hidden;">
    >>>>
    >>>> "Valli" <> wrote in message
    >>>> news:upOB$0N$...
    >>>>> Hi,
    >>>>>
    >>>>> I am adding records to htmltable using javascript coding. I want
    >>>>> to make a single column invisible in that html table.
    >>>>> Can anyone help me in this?
    >>>>>
    >>>>> My javascript code to add a new row in html table follows below:
    >>>>> var tbody =
    >>>>> document.getElementById('tblorederlist').getElementsByTagName('tbody')[0];
    >>>>>
    >>>>> var row = document.createElement('TR');
    >>>>>
    >>>>> var td1 = document.createElement('TD');
    >>>>>
    >>>>> var td2 = document.createElement('TD');
    >>>>>
    >>>>> var td3 = document.createElement('TD');
    >>>>>
    >>>>> td1.innerHTML=orderorpositiontype;
    >>>>>
    >>>>> td2.innerHTML =buysell;
    >>>>>
    >>>>> td3.innerHTML = buyselltype;
    >>>>>
    >>>>> row.appendChild(td1);
    >>>>>
    >>>>> row.appendChild(td2);
    >>>>>
    >>>>> row.appendChild(td3);
    >>>>>
    >>>>> tbody.appendChild(row);
    >>>>>
    >>>>>
    >>>>> My target is to make 2column invisible..What is the javascript coding
    >>>>> require for this?
    >>>>>
    >>>>> --
    >>>>> Regards
    >>>>> Valli
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Just Me, Sep 22, 2007
    #6
  7. "Valli" <> wrote in message
    news:%23S154LR$...

    > I have set the display property as 'None' for that cell and now its
    > working as required.
    >
    > tcell.Style.display = 'none';


    Yes, that would correct.

    Google for CSS style display visibility for more on this...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Sep 22, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Susan Geller
    Replies:
    1
    Views:
    409
    =?Utf-8?B?U3VyZXNo?=
    Mar 2, 2004
  2. Michael Chong

    DataGrid Column Make Invisible

    Michael Chong, Oct 15, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    3,486
    Michael Chong
    Oct 16, 2004
  3. John Blair
    Replies:
    15
    Views:
    5,115
    Ramesh
    Jan 3, 2005
  4. chuckdfoster

    Make HTML Table Invisible

    chuckdfoster, Dec 6, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    14,126
    chuckdfoster
    Dec 6, 2005
  5. Andy B
    Replies:
    5
    Views:
    605
    Andy B
    May 29, 2008
Loading...

Share This Page