|
-
Sep 3rd, 2010, 03:13 PM
#1
Re: datagridview add new row
 Originally Posted by new1
ok marman her's is what i'm working on
now when i want to add new respond or sentence i have to add it to the table first and reload the datagridview so that the new sentence appear in the datagridview and that take some time and very slow because the table have like 31102 rows
so i been thinking about after loading the datagridview from the table for the first time ..i can add the new sentence to the datagridview directly and save it from the datagridview to the table so that i wont have to reload the datagridview each time i add new sentence...
so when i tryie to make button that show me textbox where i can add the new sentence that i want to add it to the datagridview i get error datagridview is bound
i guess you get what i mean now..so tell me how can i do it
You can make your datagridview editable so that you can add new records directly to the grid - and therefore to the bound table. There's no need to have a seperate textbox.
However, if you want to use a seperate textbox, then simply add the record to the underlying datatable in the dataset. Then the refresh performance shouldn't be too bad. Then you can commit the changes in the dataset to the underlying database table whenever you want.
 I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
My war with a browser-redirect trojan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|