|
-
December 7th, 1999, 08:26 AM
#1
DataGrid Control
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
-
December 7th, 1999, 08:33 AM
#2
Re: DataGrid Control
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
-
December 7th, 1999, 08:34 AM
#3
Re: DataGrid Control
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...age=0&Limit=25
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
-
December 9th, 1999, 08:55 AM
#4
Re: DataGrid Control
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.
-
December 9th, 1999, 08:56 AM
#5
Re: DataGrid Control
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.
-
December 9th, 1999, 09:48 AM
#6
Re: DataGrid Control
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.
-
December 11th, 1999, 01:30 PM
#7
Re: DataGrid Control
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|