Solved

Add rows to a datagrid using data from clientside

Posted on 2003-11-10
2
1,347 Views
Last Modified: 2007-12-19
ASP.NET
I have a datagrid on a page. And I'm using client side Javascript to add more rows to the table rendered in the HTML. The problem is when i submit the page and go back and count the rows in the page the newly added rows are not being considered in the datagrid. The itemcount does not change

I'm using cloneNode to create the additional rows and i am changing the id of the new rows in the format that is used by the asp (sumthing like asdfl10__adfdafl23_adfsf34... and similarly the name). Is there any way i can directly load the html table into the datagrid/datatable

I don't know much about asp (knowledge -> 0 :().
Currently im giving the same id for all the rows and hence get a , delimited value which i have to seperate on the server and use. It would be nice if i got sumthing using which i could just add rows on the clientside using javascript and have the same rows added to the datagrid.

thanx in advance.
:)
Don

ps. i guess the codebehind is c# though im not sure
0
Comment
Question by:a_twixt_in_the_tale
2 Comments
 
LVL 6

Accepted Solution

by:
thomasdodds earned 150 total points
ID: 9734607
i suggest putting the data into a serverside hidden field

1- using the DataGrid.Items.Add() to add to the grid

or

2- if you want the data to go into the databaseand the datagrid, then add the rows to the dataset and run the adapter.update() then call the datagrid.databind()
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10256709
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: thomasdodds {http:#9734607}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now