Click here to Skip to main content
15,919,749 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all ,

Can any one teach me how to add item pro grammatically in
datagridview at ASP.NET.
Because my Code is Desktop apps like " Datagridview1.rows.add..etc " not Working.
I want all Items will be added first in datagridview
then if the user finish to add all items in Gridview
the user is easily click the Save Button.
in that case i will do Some Code that loop inside Gridview item.
that save to their corresponding Database.

I use Visual Basic in ASP

Many Thanks,
Ping.
Posted

1 solution

Hi,

you can not add rows in GridView like DataGridView of Windows Application
to you Can Add Row In GridView Using Two Ways
1) get all Records from Tables In to DataTable and Bind this to GridView
2) when u want to add new Row in GridView then First get All Rows in Datatable then Add new Row in DataTable after adding new Row in DataTable bind this Datatable to GridView

Hope all things are clear now
Best Luck
Happy Coding:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900