473,473 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

AccessingCells

gh
I have an aspx page that has an html table on it. The table has 4
columns with 6 rows and each cell has a hyperlink defined in it, except
for the last column. When the page is created I have a dataset I loop
through and I check the hyperlink id in html table for an id match in
the dataset. If there is a match I leave the hyperlink enabled, if not
I disable the hyperlink. If all the columns across have enabled
hyperlinks I need to add an image to the last cell in the row. Can this
be done at runtime with the hyperlinks already setup on the aspx page or
should I create the html table dynamically? If I create the table
dynamically, how do I add the 2nd, 3rd, and 4th columns? The columns
need to be populated 6 down, then goto next column and populate 6 down.

Thanks
Nov 19 '05 #1
6 935
Dear GH,

You can run that Table as a server control and access it programmatically. This means you would build the table with the table object verses writing the HTML yourself.

-Calvin Luttrell
ProjectThunder.com, Inc.
nothing is impossible

I have an aspx page that has an html table on it. The table has 4
columns with 6 rows and each cell has a hyperlink defined in it, except
for the last column. When the page is created I have a dataset I loop
through and I check the hyperlink id in html table for an id match in
the dataset. If there is a match I leave the hyperlink enabled, if not
I disable the hyperlink. If all the columns across have enabled
hyperlinks I need to add an image to the last cell in the row. Can this
be done at runtime with the hyperlinks already setup on the aspx page or
should I create the html table dynamically? If I create the table
dynamically, how do I add the 2nd, 3rd, and 4th columns? The columns
need to be populated 6 down, then goto next column and populate 6 down.


Nov 19 '05 #2
Yes, you can setup everything, including the image in the last cell, at
design time.

Write a method that will accept a hyperlink id as a parameter and return
true or false depending on if the id is present in the dataset or not. In
Page_Load event call this function for every hyperlink. Then show/hide the
image according to the logic required. Looks pretty straightforward.

Eliyahu

"gh" <gh@at.ne> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I have an aspx page that has an html table on it. The table has 4
columns with 6 rows and each cell has a hyperlink defined in it, except
for the last column. When the page is created I have a dataset I loop
through and I check the hyperlink id in html table for an id match in
the dataset. If there is a match I leave the hyperlink enabled, if not
I disable the hyperlink. If all the columns across have enabled
hyperlinks I need to add an image to the last cell in the row. Can this
be done at runtime with the hyperlinks already setup on the aspx page or
should I create the html table dynamically? If I create the table
dynamically, how do I add the 2nd, 3rd, and 4th columns? The columns
need to be populated 6 down, then goto next column and populate 6 down.

Thanks

Nov 19 '05 #3
gh
Eliyahu:

I have tried to do this, but when I loop through the html table it
doesn' t recognize the number of rows. The row count is always = to 0.

Thanks

Eliyahu Goldin wrote:
Yes, you can setup everything, including the image in the last cell, at
design time.

Write a method that will accept a hyperlink id as a parameter and return
true or false depending on if the id is present in the dataset or not. In
Page_Load event call this function for every hyperlink. Then show/hide the
image according to the logic required. Looks pretty straightforward.

Eliyahu

"gh" <gh@at.ne> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I have an aspx page that has an html table on it. The table has 4
columns with 6 rows and each cell has a hyperlink defined in it, except
for the last column. When the page is created I have a dataset I loop
through and I check the hyperlink id in html table for an id match in
the dataset. If there is a match I leave the hyperlink enabled, if not
I disable the hyperlink. If all the columns across have enabled
hyperlinks I need to add an image to the last cell in the row. Can this
be done at runtime with the hyperlinks already setup on the aspx page or
should I create the html table dynamically? If I create the table
dynamically, how do I add the 2nd, 3rd, and 4th columns? The columns
need to be populated 6 down, then goto next column and populate 6 down.

Thanks


Nov 19 '05 #4
Show your html.

Eliyahu

"gh" <gh@at.ne> wrote in message
news:uq**************@TK2MSFTNGP12.phx.gbl...
Eliyahu:

I have tried to do this, but when I loop through the html table it
doesn' t recognize the number of rows. The row count is always = to 0.

Thanks

Eliyahu Goldin wrote:
Yes, you can setup everything, including the image in the last cell, at
design time.

Write a method that will accept a hyperlink id as a parameter and return
true or false depending on if the id is present in the dataset or not. In Page_Load event call this function for every hyperlink. Then show/hide the image according to the logic required. Looks pretty straightforward.

Eliyahu

"gh" <gh@at.ne> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I have an aspx page that has an html table on it. The table has 4
columns with 6 rows and each cell has a hyperlink defined in it, except
for the last column. When the page is created I have a dataset I loop
through and I check the hyperlink id in html table for an id match in
the dataset. If there is a match I leave the hyperlink enabled, if not
I disable the hyperlink. If all the columns across have enabled
hyperlinks I need to add an image to the last cell in the row. Can this
be done at runtime with the hyperlinks already setup on the aspx page or
should I create the html table dynamically? If I create the table
dynamically, how do I add the 2nd, 3rd, and 4th columns? The columns
need to be populated 6 down, then goto next column and populate 6 down.

Thanks


Nov 19 '05 #5
A Datalist or Datagrid would also work. I've done a similar application
with sample audio clips. If there is no sample audio URL then the
'Listen' text/image will still show up but it won't link to anything.
The DataList and DataGrid also build the table for you so there is no
HTML to worry about.

Hope this helps.

ps. You can preset the number of Columns with your DataList and it will
be automatically fill out rows.

Nov 19 '05 #6
Sparky ..
i'm also planning to implement a similar stuff in my project.Is it
possible to show a different links or data in a datagrid cell depending
on who is logged on?
For example if i have links in a datagrid and i want to disable some
cells and make others visible.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #7

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

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.