Click here to Skip to main content
15,891,409 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
i create a new dataset by click on add new item and new dataset and crate table called itemname and i want add the datagridview column 1 to the datatable ut nothing connected to database sow how i can make that to mak crystal report from th datagridview
Posted
Updated 11-Aug-15 6:17am
v2
Comments
Sergey Alexandrovich Kryukov 3-Sep-15 17:55pm    
Not a question. You already asked about "minus value", now you are asking about "add". Do you think those are different things? It goes nowhere. Please understand: I'm trying to help you. You need to learn how to talk to people, how to ask something useful. But I'm loosing my hope... :-(
—SA

1 solution

You need to connect the DataSet to the DataGridView.
To do that you set the DataGridView.DataSource property.
Normally you first create a BindingSource and connect the DataSet to the DataSource property and then connect the BindingSource to the DataGridView.DataSource property.

See DataGridView.DataSource Property[^]

As you don't have a database this article might be of interest.
Walkthrough: Reading XML Data into a Dataset[^]
 
Share this answer
 
Comments
ÃHmed Élkady 11-Aug-15 11:57am    
i don,t ant to save it in database so i make a dataset i want to add from the datagridview to the dataset not from the dataset to datagridview
George Jonsson 11-Aug-15 12:01pm    
The point is that when you connect a DataSet to a DataGridView, any change in the DataGridView will trickle down to the DataSet and changes in the DataSet will be reflected in the DataGridView.
It is a two way street.
Try the examples in MSDN and you will see.
ÃHmed Élkady 11-Aug-15 12:04pm    
i dont want to save it because i want to ma crystal rport from this datagridviw only ecaus i add items in this datagridview from tet boes and combobo and when i close the program its doesn,t save if he press the button save i insert the bill into the dataase ut want to crystal report this datagridview only
George Jonsson 11-Aug-15 12:08pm    
If you read the text you just wrote you might understand I am a bit confused.
If you don't want to save the data you don't have to.
And there where no mention of Crystal Reports in your original post.
If you need to update your question with more information, use the Improve Question widget.
ÃHmed Élkady 11-Aug-15 12:11pm    
ok i will update it but pls help me iam searching for 3 days and i must finis the application

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