473,396 Members | 2,002 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 a new row to a datagrid without a dataset

Hi

I'm on version 1.1.

Not sure if this is possible. I've got a datagrid on a webpage with 3
columns, ID, Name and Email. The datagrid does not need to be connected to a
datasource. I just want it to be populated by user selection from a drop down
list. So each time the user selects a name from the drop down list I want a
row to be added to the datagrid with the from the drop down list inserted
into the columns.

Any ideas how I can do this. I have quite a bit of experience populating
datagrids with datasets that are filled from a backend database, but have no
idea how to populate them manually in code.

Thanks
Julia
Oct 9 '07 #1
2 1557
The datagrid does need to be connected to a datasource. It is the datasource
that doesn't need to be connected to a database.Organize your data to any
in-memory collection, like an array etc, and it will be your datasource.
Databind the grid to it.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Julia B" <Ju****@discussions.microsoft.comwrote in message
news:73**********************************@microsof t.com...
Hi

I'm on version 1.1.

Not sure if this is possible. I've got a datagrid on a webpage with 3
columns, ID, Name and Email. The datagrid does not need to be connected to
a
datasource. I just want it to be populated by user selection from a drop
down
list. So each time the user selects a name from the drop down list I want
a
row to be added to the datagrid with the from the drop down list inserted
into the columns.

Any ideas how I can do this. I have quite a bit of experience populating
datagrids with datasets that are filled from a backend database, but have
no
idea how to populate them manually in code.

Thanks
Julia

Oct 9 '07 #2
Thanks for that.

"Eliyahu Goldin" wrote:
The datagrid does need to be connected to a datasource. It is the datasource
that doesn't need to be connected to a database.Organize your data to any
in-memory collection, like an array etc, and it will be your datasource.
Databind the grid to it.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Julia B" <Ju****@discussions.microsoft.comwrote in message
news:73**********************************@microsof t.com...
Hi

I'm on version 1.1.

Not sure if this is possible. I've got a datagrid on a webpage with 3
columns, ID, Name and Email. The datagrid does not need to be connected to
a
datasource. I just want it to be populated by user selection from a drop
down
list. So each time the user selects a name from the drop down list I want
a
row to be added to the datagrid with the from the drop down list inserted
into the columns.

Any ideas how I can do this. I have quite a bit of experience populating
datagrids with datasets that are filled from a backend database, but have
no
idea how to populate them manually in code.

Thanks
Julia


Oct 9 '07 #3

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

Similar topics

0
by: Dave Elliott | last post by:
After inserting a new data row to a DataTable that is bound to a datagrid, I am unable to change data in a row that is after the newly added row without getting bizarre results. I have added the...
0
by: Frosty | last post by:
Hi I am using the VS xsd designer to create a strongly typed dataset. The dataset is apparently successfully created, with no warnings or errors given. Is it not then to be expected that this...
2
by: Jim | last post by:
In my Win App, I have a datagrid that's bound to a dataset. When the form loads, the datagrid fills. How can I add an empty row to the end of the datagrid during a button click (similar to...
2
by: Clayton Hamilton | last post by:
I have a DataGrid on a webform bound to a Datasource and can successfully use <ItemTemplate> to create edit/update/cancel functionality for user maintenance of data. I use separate logic to delete...
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...
1
by: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple...
5
by: Maria Anthonsen | last post by:
I have filled a datagrid with data from a dataset. The dataset was filled with a dataadapter - and I used the wizard to create insert, update, delete commands. I would like to prevent the user...
12
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the...
0
by: =?Utf-8?B?UHJhYmFrYXIgU2FtaXlhcHBhbg==?= | last post by:
I need to add a new to the asp.net datagrid without using dataset .Since when we use dataset to add row it took more time to load the records.Gimme a Solution .thanks
8
by: Brock | last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The reason for this is that I want the user to be able to change values without updating the database, but still have their report...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.