Solved

Add rows to a datagrid using data from clientside

Posted on 2003-11-10
2
1,337 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

758 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

23 Experts available now in Live!

Get 1:1 Help Now