473,387 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Hiding rows in an ASP.NET table

I have an ASP.NET 2 web page that dynamically populates an ASP table in the
Page_Load event. Rows relate to different people and I want to let the user
display only rows for a particular person when they select them from a
dropdown list on the same page. (Each row has a hidden PersonId column.) The
page initially shows the rows for all people.

Is it possible to hide the rows for the other people when the user selects a
person from the dropdown list? I want avoid having to load the page again
because the database query that gets the data for the table can take some
time. Any client-side scripting would have to be in Javascript.
Jun 27 '08 #1
2 3602
On Jun 11, 8:21*am, "chris f" <chrisfell...@nospam.co.ukwrote:
I have an ASP.NET 2 web page that dynamically populates an ASP table in the
Page_Load event. Rows relate to different people and I want to let the user
display only rows for a particular person when they select them from a
dropdown list on the same page. (Each row has a hidden PersonId column.) The
page initially shows the rows for all people.

Is it possible to hide the rows for the other people when the user selectsa
person from the dropdown list? I want avoid having to load the page again
because the database query that gets the data for the table can take some
time. Any client-side scripting would have to be in Javascript.
Hi Chris,

if table contents hidden ids, you can write a javascript to enumerate
and hide rows. If you have the layout as following... how exactly the
PersonId column looks like?

<asp:Table runat="server">
<asp:TableRow>
<asp:TableCell ...></asp:TableCell>
</asp:TableRow>
</asp:Table>

You can also consider to use Ajax and the UpdatePanel control to
enable partial-page rendering of the resulting table and show "Please
wait" during the process...
Jun 27 '08 #2
On Jun 11, 12:21 pm, "chris f" <chrisfell...@nospam.co.ukwrote:
I have an ASP.NET 2 web page that dynamically populates an ASP table in the
Page_Load event. Rows relate to different people and I want to let the user
display only rows for a particular person when they select them from a
dropdown list on the same page. (Each row has a hidden PersonId column.) The
page initially shows the rows for all people.

Is it possible to hide the rows for the other people when the user selects a
person from the dropdown list? I want avoid having to load the page again
because the database query that gets the data for the table can take some
time. Any client-side scripting would have to be in Javascript.
Hi

this is a simple article that demonstrate the javascript to hide or
show tablerow

http://www.javascriptf1.com/tutorial...ow.html?page=1

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rick Measham | last post by:
I have a set of data that I display in a table. Each row has a category and there may be a dozen or more rows in the same category. I'm looking to add filter buttons to the page to hide/show...
8
by: F. Da Costa | last post by:
Following is a snippet of html in which I hide a whole table and try to hide a single row. Here is my question (plz don't chew my head off if its css related instead): Why does the divTable...
5
by: mt | last post by:
In a nutshell, I'd like to have a list of items, each of which fills out a small table which displays some info about a particular item(the items being a trouble ticket for a tech support ASP-built...
1
by: luvdairish | last post by:
Can someone please look at my code and see why tables are not hiding properly? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>Untitled Document</TITLE> <META...
6
by: luvdairish | last post by:
I tried posting a few times, but it hasn't shown up. Hope this one works. Problem: Having trouble hiding tables when page is loaded. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0...
5
by: Ben | last post by:
I have a form for data entry which is in a table. I have a select box to enter a customer name, which takes it's options from the customer database. I have a button to add a new customer. What I...
6
by: Roy | last post by:
Since a datagrid is just an html table anyways, this seems like it should be easy but it's giving me a hard time. In ItemDataBound sub I'm trying to kick off javascript code using response.write()....
1
by: Fix_Metal | last post by:
Hello all. I'm new to this group :) I have a problem with javascript language. I'm making an .asp page with some integrated Javascript functions. The page consists of some HTML selects and a...
2
by: Garg | last post by:
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,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.