473,379 Members | 1,423 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,379 software developers and data experts.

Adding new rows in Datalist


Hi All,
I would like to make a datalist which takes new information by allowing
users(with some button or link) to add new rows to a datalist with some
information and save the information.....is it even possible to do with
a datalist or shud i use only a datagrid...
any ideas or online samples/URLS would be greatly appreicated ...
thanks for ur time
Ben
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
3 6307
"anon" <an*******@devdex.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...

Hi All,
I would like to make a datalist which takes new information by allowing
users(with some button or link) to add new rows to a datalist with some
information and save the information.....is it even possible to do with
a datalist or shud i use only a datagrid...
any ideas or online samples/URLS would be greatly appreicated ...
thanks for ur time


You don't want to add rows to the DataList. You want to add rows to the
DataSource which you have bound to the DataList.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #2

yeah...but on the UI the user shud be able to see a new row as part of
the datalist to be able to add data which wud be added to the datasource
and then DB....
does anyone have any links that would be useful to explore this issue
further?
Thanks,
Ben
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
"anon" <an*******@devdex.com> wrote in message
news:um**************@tk2msftngp13.phx.gbl...

yeah...but on the UI the user shud be able to see a new row as part of
the datalist to be able to add data which wud be added to the datasource
and then DB....
does anyone have any links that would be useful to explore this issue
further?


Sorry, I wasn't thinking.

Put the controls for a new row into the footer of the DataList. You might
want to put a "New" button in there as well. When "New" is clicked, make the
controls in the footer visible and set a "NewRecord" state in a Session
variable. This should include "Save" and "Cancel" buttons. When "Save" is
clicked, save the data to the database, clear the "NewRecord" state, make
the footer controls invisible, and rebind the DataList. When "Cancel" is
clicked, just clear the "NewRecord" state and make the footer controls
invisible.

I've done this with DataGrids, and it works fine. I see no reason why it
couldn't work for a DataList.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #4

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

Similar topics

6
by: Umut K. | last post by:
Hi all, I've a DataList control and it's DataBound by a SqlDataReader... The Reader returns say 3 records and as expected the datalist shows 3 rows. What i want to do is to add another extra...
1
by: Mike Malter | last post by:
I take it that the only way to add rows to a DataList control is through DataBind? If not, how do I manually add rows to a DataList control? I have searched everywhere and can't find an example...
0
by: pei_world | last post by:
I am using the following code to configurate my datagrid and load data from my Pocket Access Database. however, I got some more row extra, and it is the number I setted with my object array in my...
3
by: Robin Thomas | last post by:
I am fairly new to ASP.NET so I think I am missing something fundamental. Anyway, quite often I am pulling data from a database, but then I need to use that data to produce more data. A simple...
1
by: Craig Banks | last post by:
If a row of data in a dataset has a lot of columns the row displaying the data in a datagrid will run way off the screen. What I'd like to do is display a row of data over several datagrid rows so...
3
by: Barbara Alderton | last post by:
I recently wrote an ASP.NET app that used user controls. I produced a printer-friendly output form. One requirement was a pagebreak between one part of the form and another. I had no problem...
2
by: Erik Cruz | last post by:
Hi. I have a repeater control bound to an ArrayList. When displaying the data, I need to show 3 columns per row, each column being one entry of my ArrayList, but the repeater understands that...
0
by: schapopa | last post by:
Hi, I want to make some rows in datalist red, based on the resut of the query. e.g. my datalist has 10 rows, now I want to have row 3,4,7 in red because of value = true for row 3,4 and 7 in...
3
by: Fao, Sean | last post by:
I have a DataGrid that I'm adding CheckBox controls to at runtime (in the code behind) and I'm not sure if I'm doing it correctly. First of all, I noticed that the MyDataGrid.Columns.Add() method...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.