473,396 Members | 2,115 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,396 software developers and data experts.

Adding rows dynamically

Hi,

Im new to javascript. I need a help from you.

Basically i have one table with like this,

column1 column2
[innerText] [checkboxes]
Two wheeler Yamaha , Honda , Suzuki , TVS - ROW1
Four Wheeler BMW , Bens , Toyota - ROW2

column1 was filled as a innerText and column2 was filled with a
checkbox.
I did this at the time of Page_Load event.

Question :
1. when i click the Two wheeler, i want to add the new row to the same
table with the same contents which is in corresponding row clicked.
(i.e) the table look like this

column1 column2
[innerText] [checkboxes]
Two wheeler Yamaha , Honda , Suzuki , TVS - ROW1
Four Wheeler BMW , Bens , Toyota - ROW2
Two wheeler Yamaha , Honda , Suzuki , TVS - ROW3

2.How can i get the checkbox, so that i manipulate whether it's
checked or not.
3.How can i save the view state of the dynamically added row.
4.Is it Possible to count the controls in a cell
Like this : no. of controls in column2,ROW1 is 4
no. of controls in column2,ROW2 is 3

Can any one help me,
Thanks a lot.

Jun 7 '07 #1
1 1332
On Jun 7, 12:04 am, sivagurur...@gmail.com wrote:
Hi,

Im new to javascript. I need a help from you.

Basically i have one table with like this,

column1 column2
[innerText] [checkboxes]
Two wheeler Yamaha , Honda , Suzuki , TVS - ROW1
Four Wheeler BMW , Bens , Toyota - ROW2

column1 was filled as a innerText and column2 was filled with a
checkbox.
I did this at the time of Page_Load event.

Question :
1. when i click the Two wheeler, i want to add the new row to the same
table with the same contents which is in corresponding row clicked.
(i.e) the table look like this

column1 column2
[innerText] [checkboxes]
Two wheeler Yamaha , Honda , Suzuki , TVS - ROW1
Four Wheeler BMW , Bens , Toyota - ROW2
Two wheeler Yamaha , Honda , Suzuki , TVS - ROW3

2.How can i get the checkbox, so that i manipulate whether it's
checked or not.
3.How can i save the view state of the dynamically added row.
4.Is it Possible to count the controls in a cell
Like this : no. of controls in column2,ROW1 is 4
no. of controls in column2,ROW2 is 3

Can any one help me,
Thanks a lot.
post the HTML code or the URL of page ..

Jun 7 '07 #2

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

Similar topics

4
by: DotNetJunky | last post by:
I have built a control that runs an on-line help system. Depending on the category you selected via dropdownlist, it goes out and gets the child subcategories, and if there are any, adds a new...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
2
by: Praveen Balanagendra via .NET 247 | last post by:
here is the source code private void AddRow() { TableCell tc = new TableCell(); tc.Controls.Add(new LiteralControl("NewRow")); DataGridItem di = new...
0
by: Sileesh | last post by:
Hi I have html table and a Button in an Aspx page. I am adding one row with some textboxes to Html table each time i click on the Button thru Javascript. Now problem is when when i try to...
0
by: Luis Esteban Valencia | last post by:
Hello I wrote a program with code behind in C# to add row into table dynamically and the program worked very well in .Net Framework 1.1. When I run this program in .Net Framework 2.0 beta...
1
by: softeng | last post by:
hey...can any body solve my problem.in my application i have a requirement of adding new rows dynamically.each row contains 4 text feilds.and in that 2 text feilds are used to enter date.i want to...
18
by: sandeepdesai | last post by:
Hi.. i am new to javascripts, i am using a addRow scipt to add rows to a table dynamically. one of the cells(say cell2) in a Nth row needs to be hyperlinked to another script. for example: ...
5
by: Liquidtouch | last post by:
I'm not much of a HTML or Javascript programmer but have a little experience just hacking away at it. I am creating a HTML application and would like to be able to add or remove rows of a table....
1
by: Paddy | last post by:
The problem I am facing is as follows: I am populating an HTML table on my webpage with rows of data from a database. The rows may be sometimes 10 and sometimes say,3. I have two buttons on that...
4
by: Lewis Holmes | last post by:
Hi I have the following situation in one of my asp.net pages. The user can add multiple table rows to a form by selecting a button. These rows can contain asp.net controls. When this button is...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.