|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagrid problemHi 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! 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! > 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! > > Juya,
> The database is sql server. I am also using visual basic. Thanks and That was not my question> any help would be greatly appreciated. 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! >> > > juya wrote:
Show quoteHide quote > Hi all, Check out this link:> > 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! 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.
There is already an open DataReader associated with this Connection which must be closed first
Q: DataColumn Expressions What is WebBrowser control called now? Manipulating controls created by another thread The below snippet does not work...anyone know how to reference a procedure? Form1.closing in VB2005??? DateTime Q: DataView with Table with large number of rows Getting an Object Properties value... Services Grants |
|||||||||||||||||||||||