how to get the row id of the clicked row in a HTML table using c#

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2007
Posts: 35
Reputation: manjusaharan is an unknown quantity at this point 
Solved Threads: 0
manjusaharan manjusaharan is offline Offline
Light Poster

how to get the row id of the clicked row in a HTML table using c#

 
0
  #1
Oct 15th, 2007
hi All,
I m new to c#.I m using a HTML table in web browser control and wants to get the rowid of the clicked row in HTML table.bt dont have any idea how to get.
IS there any method for getting the row id of the clicked cell.
Please help me in solving the problem thanx in advance.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: how to get the row id of the clicked row in a HTML table using c#

 
0
  #2
Oct 15th, 2007
if you used GridView, DataList, .... controls you can bind the data to them and get the value of something if you clicked (or take a specific action) on specific row.
but html table used for alignment and design requirements...
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: how to get the row id of the clicked row in a HTML table using c#

 
0
  #3
Oct 15th, 2007
oooh, that's ASP.NET not HTML, if you need to learn asp.net go to www.asp.net you'll find all resources to be professional web developer
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 35
Reputation: manjusaharan is an unknown quantity at this point 
Solved Threads: 0
manjusaharan manjusaharan is offline Offline
Light Poster

Re: how to get the row id of the clicked row in a HTML table using c#

 
0
  #4
Oct 15th, 2007
No Sir,
I have only Html files and i have to access it in c# sothst i can use that module in my application.
isn't there any method in c# by which i can get the clicked row's Id.
Please help.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: how to get the row id of the clicked row in a HTML table using c#

 
0
  #5
Oct 15th, 2007
how can u got the data inside the tables (access db) by html, if you could by Java Script you can't identity the rows let me give you example
1
2
5
6
7
can u give a way if you pressed on number 6 tell you that u clicked on the 4th row??!!

u've raw data without any specific structure so you can't make use else read it.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 35
Reputation: manjusaharan is an unknown quantity at this point 
Solved Threads: 0
manjusaharan manjusaharan is offline Offline
Light Poster

Re: how to get the row id of the clicked row in a HTML table using c#

 
0
  #6
Oct 15th, 2007
Sorry Sir,
i m not accessing Access tables ,in fact i m using tables created in Html using<table>,<tr>,<td > tags.
I think u misuderstood me.
Am i right????????
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: how to get the row id of the clicked row in a HTML table using c#

 
0
  #7
Oct 15th, 2007
yes, I am; but my answer for what I understood and what you mean.
else you in each row have a value you assign. HTML == static
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1
Reputation: isozworld is an unknown quantity at this point 
Solved Threads: 0
isozworld isozworld is offline Offline
Newbie Poster
 
0
  #8
Oct 27th, 2009
Hi manjusaharan,
I think I understand exactly what you are going to do
I write this code for you and checked. I am sure it is going to help you.

wb is a web browser component
foreach (HtmlElement htmlobj in wb.Document.All)
{
if (htmlobj.TagName =="TABLE")
foreach (HtmlElement htmlTableTD in htmlobj.Document.All)
{
if (htmlTableTD.TagName == "TD")
MessageBox.Show(htmlTableTD.OuterText);
break;
}
break;
}
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC