how to get data from datagird ???

I code a small application using datagird to store data.....
my app have 2 button.....
First button dynamix create a datagird using datatable ......then I type some data in datagird...
Second button....now I want to get these data from datagird to Datatable or array...how can I do this..???

I don't want use dataset...
sonbinaryAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
dsaboConnect With a Mentor Commented:
That line should be:

DataTable db= new DataTable();
db=(DataTable) DataGird1.DataSource;

hope it helps,
0
 
Snarf0001Commented:
From the sounds of it, I'm assuming you're using windows forms, not web forms.  If so, the datatable will already contain the data entered in the grid.

Can you post your code for

<< First button dynamix create a datagird using datatable >>

If I'm understanding you properly, then datatable you're using will automatically be filled with data as you enter it into the grid.
0
 
sonbinaryAuthor Commented:
I use windows Form
I want to know "how to get data when I type data on datagird"...you know.....I don't use database....I just create a datagird, type something on datagird and I want to save these datas to datatable on onece click button.......
0
 
sonbinaryAuthor Commented:
I can't code this line :  
DataTable db= new DataTable();
db=DataGird1.DataSource; //----->> I want to get data on Datagird but I can't do that.....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.