Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving Data Form List Box to Datagrid

Status
Not open for further replies.

progfox

Programmer
Jun 15, 2003
43
IN
Sir,
I have got 3 Columns in my list box and data is being selected through SQL statement to these columns. Now will U please suggest me how to retrieve that data and fetch them to the Grid Control.

Thanking U

Chandan

 
What is the rowsource and rowsourcetype of your list box?

Andrew Coates
OzFox 2003 Australia's VFP Conference -- ------
DISCLOSURE
We are the Australasian Distributor for the Hentzenwerke Series of Books. (By the same token, I really do think they're the best printed VFP resource out there -- that's why we sell them)
 
Sir,
Thanx for showing interest in my question. Well I had became hopeless and I was plaaning to change my programme.

Well the informaton U had asked abt the row sources well its SQL Statement and The data was added into the columns of the listbox with reference to the cursor made.

this is what code I had written.And its working.

xreqs=ALLTRIM(thisform.pageframe1.page1.combo1.Value)
thisform.pageframe1.page1.list1.rowsource="SELECT itemcode,itemname,qty from accesreq1 WHERE reqno=xreqs INTO CURSOR temitem ORDER BY itemname"


Now I wannt to add the selected records to the data grid.
So How to do it?


Thanking U

Chandan

 
Have your tried :


Thisform.grid1.Recordsource = "temitem"

Depending when the cursor is created you could use it as the recordsource of your grid.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Dear Sir,

I haven't tried but now I will try and soory I am a bit late . Well actually I was a bit busy So Iwould get back to U soon.


Regards
Chandan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top