Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Hiding table rows at run time in vb.net

Reply
Thread Tools

Hiding table rows at run time in vb.net

 
 
Garg
Guest
Posts: n/a
 
      02-15-2007
How do I hide a paricular tablerow during run time?

I have two table rows with ids row1 and row2.
I want that if a particualr condition is true, then row 1 should be
displayed on the web page, otherwise row2 should be dispalyed.

I tried following code, but it is not working:

row1.Style.Value = "block"
row2.Style.Value="None"

But, still both the rows are being displayed. How do I achieve the
desired functioanlity of hiding one row while displaying teh other row
at run-time.

Please help me with this....

 
Reply With Quote
 
 
 
 
Thomas Hansen
Guest
Posts: n/a
 
      02-15-2007
On Feb 15, 8:15 am, "Garg" <shivaniga...@gmail.com> wrote:
> How do I hide a paricular tablerow during run time?
>
> I have two table rows with ids row1 and row2.
> I want that if a particualr condition is true, then row 1 should be
> displayed on the web page, otherwise row2 should be dispalyed.
>
> I tried following code, but it is not working:
>
> row1.Style.Value = "block"
> row2.Style.Value="None"


row1.Style.Add("display", "none"); for instance...!
But for this operation you would normally want to build that table
dynamically and then DON'T build the rows that's not supposed to be
shown...
Preferable with some Ajax Framework...!!

..t

--
http://ajaxwidgets.com
Free ASP.NET Ajax Widgets NOW!

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      02-15-2007
row1.Style("display")= "none"

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Garg" <> wrote in message
news: ups.com...
> How do I hide a paricular tablerow during run time?
>
> I have two table rows with ids row1 and row2.
> I want that if a particualr condition is true, then row 1 should be
> displayed on the web page, otherwise row2 should be dispalyed.
>
> I tried following code, but it is not working:
>
> row1.Style.Value = "block"
> row2.Style.Value="None"
>
> But, still both the rows are being displayed. How do I achieve the
> desired functioanlity of hiding one row while displaying teh other row
> at run-time.
>
> Please help me with this....
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding rows in an ASP.NET table chris f ASP .Net 2 06-11-2008 07:13 AM
Hiding table rows .asp luna ASP .Net 0 01-17-2007 09:08 AM
hiding table rows by id? MattB ASP .Net 2 03-09-2005 06:36 PM
Table/table rows/table data tag question? Rio HTML 4 11-05-2004 08:11 AM
Hiding multiple rows in a dynamic table Rick Measham Javascript 1 09-23-2003 09:59 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57