Add a blank row to DataGrid

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

I am displaying records in my Datagrid and I am able to edit the records.

Is there a way to add a blank row at the bottom of the DataGrid to allow the
addition of new data?

I want to display the grid and allow the client to press a button that would
in essence add a new row at the bottom of the grid, allow them to add the
new data, then I would add the row to the database.

Thanks,

Tom
 
tshad said:
Is there a way to add a blank row at the bottom of the DataGrid to allow the
addition of new data?

I want to display the grid and allow the client to press a button that would
in essence add a new row at the bottom of the grid, allow them to add the
new data, then I would add the row to the database.

Tom, check out this article:

Adding a New Record to the DataGrid
http://aspnet.4guysfromrolla.com/articles/021203-1.aspx

And for more information about DataGrids, check out my Extensive
Examination of DataGrids article series, starting at
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx, as well as the
FAQs and recommended articles at http://www.DataWebControls.com

Happy Programming!

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 
Scott Mitchell said:
Tom, check out this article:

Adding a New Record to the DataGrid
http://aspnet.4guysfromrolla.com/articles/021203-1.aspx

I am printing it out now, as I write. Looks like what I was looking for.
And for more information about DataGrids, check out my Extensive
Examination of DataGrids article series, starting at
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx, as well as the
FAQs and recommended articles at http://www.DataWebControls.com
I did print out (killed many trees to do it) and read your articles. Was
very good. I also have your kick start book. But nothing I could find
talked about add a row (at least I couldn't find it).

I was also going to post a question on how to move a row up and down in a
datagrid. Sorting is no problem, but that entails re-selecting the database
and re-binding. I just want to allow the user to push a button (which will
be an up arrow or down arrow) and move the data up or down (or redisplay
with the row moved).

Is there anything out there on how to do this (hopefully, easily)?

Thanks,

Tom.
 
Back
Top