简体   繁体   中英

How to get user entered data from datagridview to windows forms diagram?

I'm trying to get the user entered data in a windows forms datagridview to a windows forms diagram but I have no idea how to do it. I don't even know how to get the user entered data out of the datagridview.

I've been trying to set up a local database in Visual Studio but i'm using C++ and the support for databases in VC++ 2010 seems to be removed. I have also tried to set up a SQLite database, but without success.

Is there a way to get the user entered data from the datagridview to the diagram without using a database or with using some other database than Microsofts option?

Thanks!

I had been looking over the same problem, try this-> http://www.functionx.com/vccli/controls/dgv.htm , let me me know if it helps

Edit:

This is just the code I posted below put in the Original Answer and better formatted:

I have been working on this problem at the same time. what I got to work editing the value:

System::String^ dur; this->dataGridView1->Rows[1]->Cells[1]->Value = dur;

and this will give the value in the data grid:

 System::String^ foo;
 foo = (System::String^)this->dataGridView1->Rows[1]->Cells[1]->Value;

this will give the value also, but you cannot edit it:

System::String^ derp;
this->dataGridView1->CurrentCell = this->dataGridView1[1,1];
derp = (System::String^)this->dataGridView1->CurrentCell->Value;

Have not tried writing or reading from

this->dataGridView1[1,1]->View;

but I think that might work, too .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM