Home All Groups Group Topic Archive Search About
Author
13 Dec 2006 6:21 PM
juya
Hi all,

I have been struggling with datagrid for more than a week. I pretty new
to datagrid, have never used it before.

All I am trying to do is Edit the TDBGrid in Visual basic. I am
populating the Datagrid from a adodb recordset. Here is my code

Dim rssqldb As ADODB.Recordset
Set rssqldb = gfGetData(Conn, 10, "exec payroll" & "'12/01/06'")
TDBGRID1.datasource = rs

I have set the properties for allowupdate,allowinsert, etc to be true.
Datamode is in bound mode.

I can see the data in the Datagrid, but cannot edit it. Can anyone pls
Help!

Author
13 Dec 2006 8:17 PM
Cor Ligthert [MVP]
juyja,


The datagrid is not mad for a recordset. What is in fact also not with
complete dotnet.

Can you tell a little bit what you want because the datagrid exist as Web
and windowform media.

In fact it is using a datatable and than a dataadapter.

As well tell what kind of database you are using, maybe we have than a
sample for you.

Cor

Show quoteHide quote
"juya" <madra***@yahoo.com> schreef in bericht
news:1166034088.668495.28500@73g2000cwn.googlegroups.com...
> Hi all,
>
> I have been struggling with datagrid for more than a week. I pretty new
> to datagrid, have never used it before.
>
> All I am trying to do is Edit the TDBGrid in Visual basic. I am
> populating the Datagrid from a adodb recordset. Here is my code
>
> Dim rssqldb As ADODB.Recordset
> Set rssqldb = gfGetData(Conn, 10, "exec payroll" & "'12/01/06'")
> TDBGRID1.datasource = rs
>
> I have set the properties for allowupdate,allowinsert, etc to be true.
> Datamode is in bound mode.
>
> I can see the data in the Datagrid, but cannot edit it. Can anyone pls
> Help!
>
Author
14 Dec 2006 11:09 AM
juya
The database is sql server. I am also using visual basic. Thanks and
any help would be greatly appreciated.




Cor Ligthert [MVP] wrote:
Show quoteHide quote
> juyja,
>
>
> The datagrid is not mad for a recordset. What is in fact also not with
> complete dotnet.
>
> Can you tell a little bit what you want because the datagrid exist as Web
> and windowform media.
>
> In fact it is using a datatable and than a dataadapter.
>
> As well tell what kind of database you are using, maybe we have than a
> sample for you.
>
> Cor
>
> "juya" <madra***@yahoo.com> schreef in bericht
> news:1166034088.668495.28500@73g2000cwn.googlegroups.com...
> > Hi all,
> >
> > I have been struggling with datagrid for more than a week. I pretty new
> > to datagrid, have never used it before.
> >
> > All I am trying to do is Edit the TDBGrid in Visual basic. I am
> > populating the Datagrid from a adodb recordset. Here is my code
> >
> > Dim rssqldb As ADODB.Recordset
> > Set rssqldb = gfGetData(Conn, 10, "exec payroll" & "'12/01/06'")
> > TDBGRID1.datasource = rs
> >
> > I have set the properties for allowupdate,allowinsert, etc to be true.
> > Datamode is in bound mode.
> >
> > I can see the data in the Datagrid, but cannot edit it. Can anyone pls
> > Help!
> >
Author
15 Dec 2006 5:38 AM
Cor Ligthert [MVP]
Juya,

> The database is sql server. I am also using visual basic. Thanks and
> any help would be greatly appreciated.

That was not my question

Repeating, is it for a web or a windowsform application.
In other words is it ASPNET or not.

Cor


Show quoteHide quote
"juya" <madra***@yahoo.com> schreef in bericht
news:1166094599.099234.92300@l12g2000cwl.googlegroups.com...
> The database is sql server. I am also using visual basic. Thanks and
> any help would be greatly appreciated.
>
>
>
>
> Cor Ligthert [MVP] wrote:
>> juyja,
>>
>>
>> The datagrid is not mad for a recordset. What is in fact also not with
>> complete dotnet.
>>
>> Can you tell a little bit what you want because the datagrid exist as Web
>> and windowform media.
>>
>> In fact it is using a datatable and than a dataadapter.
>>
>> As well tell what kind of database you are using, maybe we have than a
>> sample for you.
>>
>> Cor
>>
>> "juya" <madra***@yahoo.com> schreef in bericht
>> news:1166034088.668495.28500@73g2000cwn.googlegroups.com...
>> > Hi all,
>> >
>> > I have been struggling with datagrid for more than a week. I pretty new
>> > to datagrid, have never used it before.
>> >
>> > All I am trying to do is Edit the TDBGrid in Visual basic. I am
>> > populating the Datagrid from a adodb recordset. Here is my code
>> >
>> > Dim rssqldb As ADODB.Recordset
>> > Set rssqldb = gfGetData(Conn, 10, "exec payroll" & "'12/01/06'")
>> > TDBGRID1.datasource = rs
>> >
>> > I have set the properties for allowupdate,allowinsert, etc to be true.
>> > Datamode is in bound mode.
>> >
>> > I can see the data in the Datagrid, but cannot edit it. Can anyone pls
>> > Help!
>> >
>
Author
13 Dec 2006 8:18 PM
KnighT
juya wrote:
Show quoteHide quote
> Hi all,
>
> I have been struggling with datagrid for more than a week. I pretty new
> to datagrid, have never used it before.
>
> All I am trying to do is Edit the TDBGrid in Visual basic. I am
> populating the Datagrid from a adodb recordset. Here is my code
>
> Dim rssqldb As ADODB.Recordset
> Set rssqldb = gfGetData(Conn, 10, "exec payroll" & "'12/01/06'")
> TDBGRID1.datasource = rs
>
> I have set the properties for allowupdate,allowinsert, etc to be true.
> Datamode is in bound mode.
>
> I can see the data in the Datagrid, but cannot edit it. Can anyone pls
> Help!

Check out this link:
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx

Datagrids are not very easy to work with.  Are you using the visual
designer, or strictly source code ?

I think you need to write code to handle the edit.  I think I got this
working once by tweaking the datagrid properties from the form designer.