Datagridview

A

Ahmd

Pls Help me

I have one invoice form and an Item form.
Item form consisting of a Dataviegridview showing all items.
(itemcode,name)
Invoice form has dataviewgrid of invoice
(itemcode,name,qty,price,total)
when i click items cell in the invoice form dataviewgrid i am calling
the item form.
what i want is when i double click the item form datagridview items it
shud pass itemcode and name to parent form invoice form datagridview
cell from which cell i have called this item form.

Pls help me this is very urgent..

thanks in advance
 
C

Chris Diver

Ahmd said:
Pls Help me

I have one invoice form and an Item form.
Item form consisting of a Dataviegridview showing all items.
(itemcode,name)
Invoice form has dataviewgrid of invoice
(itemcode,name,qty,price,total)
when i click items cell in the invoice form dataviewgrid i am calling
the item form.
what i want is when i double click the item form datagridview items it
shud pass itemcode and name to parent form invoice form datagridview
cell from which cell i have called this item form.

Pls help me this is very urgent..

thanks in advance
Hi,

Couldn't really get my head around your problem, but it sounds like you
want to click a cell and pass the value somewhere else.

I would use the mouseup event of the DataGridView. I would use the
MouseEventArgs to see if it was double clicked then and the X and Y
co-ords with a DataGridView.HitTest to find out the value in the cell
that was clicked.

If there is an easier way them I don't know it.

HTH,
Chris
 
A

Ahmd

Hi,

Couldn't really get my head around your problem, but it sounds like you
want to click a cell and pass the value somewhere else.

I would use the mouseup event of the DataGridView. I would use the
MouseEventArgs to see if it was double clicked then and the X and Y
co-ords with a DataGridView.HitTest to find out the value in the cell
that was clicked.

If there is an easier way them I don't know it.

HTH,
Chris- Hide quoted text -

- Show quoted text -

Thank u for ur response mr. chris

C, to be more precise
i have datagridview in one form(mainform) , Columns: -
Itemcode,Itemname and command button
when i click on the command button of the cell, it will show another
form which has a datagridview of Itemcode and name listed . from this
form when i double click any of the item, i want to close this form
and pass itemcode,itemname to the main form datagridview same row
where i have clicked command button

thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top