5 Replies - 822 Views - Last Post: 24 September 2010 - 03:08 AM Rate Topic: -----

#1 Guest_vali.naeimabadi*


Reputation:

datagridview

Posted 14 September 2010 - 07:34 AM

hi to all friends

i have a question about datagridview:

when i put for excample number (1) in the first cell of the datagridview

i need that number (1) emediately be send to a textbox for example txtnumber

witch event of datagrid can i use
Is This A Good Question/Topic? 0

Replies To: datagridview

#2 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1356
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: datagridview

Posted 14 September 2010 - 07:36 AM

Here's the entry on MSDN Library for DataGridView, I'm sure you can find what you're looking for.

http://msdn.microsof...tagridview.aspx
Was This Post Helpful? 0
  • +
  • -

#3 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1253
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: datagridview

Posted 14 September 2010 - 07:41 AM

You can access information from a DataGridView cell using:

myDGV[RowNumber][ColumnNumber].Value

Was This Post Helpful? 1
  • +
  • -

#4 SHD013  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 33
  • Joined: 30-August 09

Re: datagridview

Posted 21 September 2010 - 02:11 AM

The event is a cell click event...
Was This Post Helpful? -1
  • +
  • -

#5 StorminNorman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 21-September 10

Re: datagridview

Posted 21 September 2010 - 07:48 PM

View PostSHD013, on 21 September 2010 - 01:11 AM, said:

The event is a cell click event...


The true event is (dataGridView1_CurrentCellDirtyStateChanged(object sender, EventArgs e))

Cell_Click would be more for displaying data already in a datagridview. But if you wanna take what the user just typed and display it, you have to use the above mentioned event.

Can read more on it here.
http://msdn.microsof...atechanged.aspx

Hope it helps.

This post has been edited by StorminNorman: 21 September 2010 - 07:48 PM

Was This Post Helpful? 0
  • +
  • -

#6 SHD013  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 33
  • Joined: 30-August 09

Re: datagridview

Posted 24 September 2010 - 03:08 AM

use the event of 'CellClick' or 'CellContentClicked' or 'CellValueChanged' so that the moment a value is entered, you trigger an event and then use the value from "dataGV.Rows[0].Cells[0].Value"

Hope this may be the answer .. and thanks for suggestion @StorminNorman

This post has been edited by SHD013: 24 September 2010 - 03:11 AM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1