Click to See Complete Forum and Search --> : DataGrid Control
pueromane
December 7th, 1999, 07:26 AM
Hi
Does anyone know if I can use a datagrid control without having a database. I want to use it like a List View Control, because the datagrid control seems to be more comfortable.
How can I insert a new Row in the Control.
mfG Pueromane
mdangers
December 7th, 1999, 07:33 AM
Hi !
Try using the MSFlexGrid-Control.
Use
additem "a" & vbTab & "b" & ...,lineindex
( where vbTab seperates coloumndata)
to add rows.
Be sure not to insert data into fixedrows/-cols, which you
can set using the fixedrows/-cols -properties.
Regards,
Matthias.
I had a thought,
You know, I thought it a lot,
I thought I was smart,
Now I know that I'm not
- The Presidents Of The United States Of America
Chris Eastwood
December 7th, 1999, 07:34 AM
Lothar Haensler posted some great code a while back on this discussion forum - I found it by searching for DataGrid at
http://codeguru.developer.com/bbs/wt/showpost.pl?Board=vb&Number=8400&Search=true&Forum=vb&Words=datagrid&Match=Whole&Topic=&Searchpage=0&Limit=25
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
Heru
December 9th, 1999, 07:55 AM
How if :
You just create a butoin call "AddNew button" on your form where the datagrid is and the code for that button is : recordset.AddNew it'll give you a new row on the grid.
Heru
December 9th, 1999, 07:56 AM
How if :
You just create a button call "AddNew button" on your form where the datagrid is and the code for that button is : recordset.AddNew it'll give you a new row on the grid.
pueromane
December 9th, 1999, 08:48 AM
I have a DataGrid controll called DG1 on my form and a button. When I want to run it the Error "Object required" appears.
My functions looks like
private Sub Command1_Click()
Recordset.AddNew
End Sub
Where do I tell the program that I want to use the DG1.
DG1.recordset.addnew
doesn't work.
Heru
December 11th, 1999, 12:30 PM
somewhere in the form where the datagrid is, you should have a button, let's say a "search" button.
when you click on this button, your datagrid is populated with data.
So, you have told the program that the recordset you are using is the source for that particular DataGrid
then you should already have this code:
Set datagrid.datasource= recordset
( Set DGI.Datasource = recordset, in your case )
Or else, your DataGrid will not be populated with Data. Have you been able to successfully populate your DataGrid?
if the answer is Yes, then in your "AddNew" button click event you write:
recorset . AddNew should work!
Let me know! Heru
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.