Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Adding a new row to a datagrid without a dataset

Reply
Thread Tools

Adding a new row to a datagrid without a dataset

 
 
=?Utf-8?B?SnVsaWEgQg==?=
Guest
Posts: n/a
 
      10-09-2007
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
 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      10-09-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
=?Utf-8?B?SnVsaWEgQg==?=
Guest
Posts: n/a
 
      10-09-2007
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding New Row in Asp.Net Datagrid ,Without using dataset Prabakar Samiyappan ASP .Net Datagrid Control 0 03-10-2007 02:29 PM
Adding Row to a datagrid Without do a PostBack Devin Wood ASP .Net Datagrid Control 0 03-22-2005 03:52 PM
Referencing Dataset row not Datagrid row Craig ASP .Net 2 11-02-2004 05:27 PM
I am adding a new row to the datagrid dynamically but if i use the Count property of Item it is not showing the count of the new rows being added Praveen Balanagendra via .NET 247 ASP .Net 2 06-06-2004 07:16 AM
How to find grid's row that matches row in dataset IK ASP .Net Datagrid Control 0 09-15-2003 05:40 PM



Advertisments