Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Hide Table Row In Repeater?

Reply
Thread Tools

Hide Table Row In Repeater?

 
 
Utter Newbie
Guest
Posts: n/a
 
      08-25-2005
Anyone know how to hide a table row in a repeater based on data
returned from a data row? I tried doing this:

<tr id="melon" runat="server" visible='<%# SetBoxVisibility(
DataBinder.Eval(Container,"DataItem.TheItem").ToSt ring() ) %>'>

doesn't seem to work. The runat="server" in the row seems to throw an
error when within a repeater. So I'm looking for another solution?
Thanks for any suggestions.
 
Reply With Quote
 
 
 
 
sreejith.ram@gmail.com
Guest
Posts: n/a
 
      08-25-2005
the row doesnt need to be runat="server" to set visibility using a
function.

<tr id="melon" style="<%# SetBoxVisibility(
DataBinder.Eval(Container,"Dat*aItem.TheItem").ToS tring() ) %>">

string SetBoxVisibility( string inStr)
{
if(inStr == ......)
return("style='display:none'"); // this will hide the
row
else
return("style='display:'"); // this will hide the row

}

 
Reply With Quote
 
 
 
 
Utter Newbie
Guest
Posts: n/a
 
      08-25-2005
Think I might have solved it by just placing a placeholder tags to
encompass the row.. Then set visibility on the placeholder in a
similar way.

On Thu, 25 Aug 2005 11:59:37 -0600, Utter Newbie <(E-Mail Removed)>
wrote:

>Anyone know how to hide a table row in a repeater based on data
>returned from a data row? I tried doing this:
>
><tr id="melon" runat="server" visible='<%# SetBoxVisibility(
>DataBinder.Eval(Container,"DataItem.TheItem").ToS tring() ) %>'>
>
>doesn't seem to work. The runat="server" in the row seems to throw an
>error when within a repeater. So I'm looking for another solution?
>Thanks for any suggestions.


 
Reply With Quote
 
sreejith.ram@gmail.com
Guest
Posts: n/a
 
      08-25-2005
sorry abt the wrong comment

return("style='display:'"); // this will DISPLAY the row

 
Reply With Quote
 
Utter Newbie
Guest
Posts: n/a
 
      08-26-2005
Thanks. Never thought ot fhat one.

On 25 Aug 2005 11:55:43 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

>the row doesnt need to be runat="server" to set visibility using a
>function.
>
><tr id="melon" style="<%# SetBoxVisibility(
>DataBinder.Eval(Container,"Dat*aItem.TheItem").To String() ) %>">
>
>string SetBoxVisibility( string inStr)
>{
> if(inStr == ......)
> return("style='display:none'"); // this will hide the
>row
> else
> return("style='display:'"); // this will hide the row
>
>}


 
Reply With Quote
 
bartekm bartekm is offline
Junior Member
Join Date: Aug 2008
Posts: 7
 
      03-03-2011
There is a simple step by step tutorial here:

Hiding table rows in a repeater
 
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
Hide table/row John M HTML 5 07-01-2012 07:18 PM
row bottom border in inner table not matching up with row border in outer table phl HTML 1 06-08-2006 03:43 PM
Can you hide the contents of a row but leave the row there? UJ ASP .Net Datagrid Control 1 05-02-2006 06:48 PM
ok I can do a totals row but how about a percentage row after each data row D ASP .Net Datagrid Control 0 05-23-2005 04:10 PM
How to hide table rows and show them when user click a different row? RA ASP .Net 1 02-19-2004 10:53 PM



Advertisments