Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > DataGridView
 

DataGridView

I need help from visual c++ DataGridView

I have DataGridView connected under database I want in order to after it had pressing button it wrote down me in field on something and in field two something and then in order to I save can record to database
what to use to database because to tabela such something does Rows[], Cells[] ??
  • Moved byWesley YaoMSFTFriday, October 02, 2009 3:08 AM (From:Visual C++ Language)
  •  
An1000  Wednesday, September 30, 2009 8:58 AM
I need help from visual c++ DataGridView

I have DataGridView connected under database I want in order to after it had pressing button it wrote down me in field on something and in field two something and then in order to I save can record to database
what to use to database because to tabela such something does Rows[], Cells[] ??

An1000  Wednesday, September 30, 2009 9:07 AM
Since you need help using a Windows Form Data control, i suggest you post to the Windows Forms DataBinding and Data Control forum.

The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
Visual C++ MVP
Sheng Jiang 蒋晟  Wednesday, September 30, 2009 6:37 PM

Hi An1000,

If you want to edit the data from database in a DataGridView and then update the edited data to database? You can follow this thread: http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/fe4ed7e1-157c-4d1e-8cd5-84a7dae2bf4d
You can get details about DataGridView from:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.aspx

If you want to know how to get rows or cells from DataGridView, you can follow the code snipet below:

  DataGridViewRow^ row;
  //Get a row, 2 is the row index.
  row = this->dataGridView1->Rows[2];
  DataGridViewCell^ cell;
  //Get a cell of the row, 0 is the column index.
  cell = row->Cells[0];
  //Get a cell of the row, "col1" is the column name.
  cell = row->Cells["col1"];
  //Get a cell of the DataGridView, 2 is the column index, 1 is the row index.
  cell = this->dataGridView1[2,1];



Regards,
Aland Li

 


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
  • Marked As Answer byAn1000 Monday, October 05, 2009 9:59 AM
  • Unmarked As Answer byAn1000 Monday, October 05, 2009 10:10 AM
  •  
Aland Li  Monday, October 05, 2009 6:55 AM
I thank there now it walked me about something like this              
Table_1DataGridView->Rows[Convert::ToInt32(textBox15 ->Text)]->Cells[2]->Value=textBox7->Text;

:)

An1000  Monday, October 05, 2009 10:15 AM
it and it was bleated was now how I have to search such Table_1DataGridView ??
  • Marked As Answer byAn1000 Monday, October 05, 2009 11:06 AM
  • Unmarked As Answer byAn1000 Monday, October 05, 2009 11:22 AM
  •  
An1000  Monday, October 05, 2009 10:23 AM
Hi An1000,

Do you mean that you want to search a row based on the value of a cell in it? If so, you can follow the thread below:
http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/28c72e04-d83d-4625-aeef-66991bdadc21

Regards,
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Wednesday, October 07, 2009 2:34 AM

You can use google to search for other answers

Custom Search

More Threads

• Export DataGridView to Excel
• Datagrid row problem
• How to format a datagridview column
• Wiew(get) result in text.Box from DataGridWiew
• Reading data from an datatable (datagridview) cell
• Strange behaviour on a datagridview
• DataBinding in a New Solution: Where are resources to aid my decisions?
• Multi column databound listbox
• Binding to a custom object
• Databinding from a DataSet to a Forms.TextBox