Datagrid problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • juya

    #1

    Datagrid problem

    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.dataso urce = rs

    I have set the properties for allowupdate,all owinsert, 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!

  • Cor Ligthert [MVP]

    #2
    Re: Datagrid problem

    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" <madras41@yahoo .comschreef in bericht
    news:1166034088 .668495.28500@7 3g2000cwn.googl egroups.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.dataso urce = rs
    >
    I have set the properties for allowupdate,all owinsert, 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!
    >

    Comment

    • KnighT

      #3
      Re: Datagrid problem


      juya wrote:
      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.dataso urce = rs
      >
      I have set the properties for allowupdate,all owinsert, 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:


      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.

      Comment

      • juya

        #4
        Re: Datagrid problem

        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" <madras41@yahoo .comschreef in bericht
        news:1166034088 .668495.28500@7 3g2000cwn.googl egroups.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.dataso urce = rs

        I have set the properties for allowupdate,all owinsert, 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!

        Comment

        • Cor Ligthert [MVP]

          #5
          Re: Datagrid problem

          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


          "juya" <madras41@yahoo .comschreef in bericht
          news:1166094599 .099234.92300@l 12g2000cwl.goog legroups.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" <madras41@yahoo .comschreef in bericht
          >news:116603408 8.668495.28500@ 73g2000cwn.goog legroups.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.dataso urce = rs
          >
          I have set the properties for allowupdate,all owinsert, 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!
          >
          >

          Comment

          Working...