DatagridView unbound Column

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?am9obmI=?=

    #1

    DatagridView unbound Column

    Hi All
    I have a 2005vb.net Form with 2 datagrids with a perent child relationship.
    On the child datagrid I have 2 unbound columns which are derived from other
    columns in the grid. And it works fine. The question: how do I sub total an
    unbound calculated column in the child datagrid and get to recalculate for
    each perent record?

    TIA
    johnb


  • Steve Gerrard

    #2
    Re: DatagridView unbound Column

    johnb wrote:
    Hi All
    I have a 2005vb.net Form with 2 datagrids with a perent child
    relationship. On the child datagrid I have 2 unbound columns which
    are derived from other columns in the grid. And it works fine. The
    question: how do I sub total an unbound calculated column in the
    child datagrid and get to recalculate for each perent record?
    >
    Add a column to the parent datatable, with an expression something like
    "Sum(Child(Rela tionName).Child ColumnName)"


    Comment

    • =?Utf-8?B?am9obmI=?=

      #3
      Re: DatagridView unbound Column

      Hi Steve
      Thanks for the reply. I was hoping to place the subtotal textbox on the form
      rather than in the parent grid. Any suggestions?
      johnb

      "Steve Gerrard" wrote:
      johnb wrote:
      Hi All
      I have a 2005vb.net Form with 2 datagrids with a perent child
      relationship. On the child datagrid I have 2 unbound columns which
      are derived from other columns in the grid. And it works fine. The
      question: how do I sub total an unbound calculated column in the
      child datagrid and get to recalculate for each perent record?
      >
      Add a column to the parent datatable, with an expression something like
      "Sum(Child(Rela tionName).Child ColumnName)"
      >
      >
      >

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: DatagridView unbound Column

        JohnB,

        A textbox assumes that you have only one parentrow.

        Steve gave you a fine solution as the latter is not the fact.

        Otherwise have a look at the compute

        http://msdn.microsoft.com/en-us/libr...e.compute.aspx

        Cor


        "johnb" <johnb@discussi ons.microsoft.c omschreef in bericht
        news:111DBDE6-4BFD-4973-A398-ECE87FC8C41E@mi crosoft.com...
        Hi Steve
        Thanks for the reply. I was hoping to place the subtotal textbox on the
        form
        rather than in the parent grid. Any suggestions?
        johnb
        >
        "Steve Gerrard" wrote:
        >
        >johnb wrote:
        Hi All
        I have a 2005vb.net Form with 2 datagrids with a perent child
        relationship. On the child datagrid I have 2 unbound columns which
        are derived from other columns in the grid. And it works fine. The
        question: how do I sub total an unbound calculated column in the
        child datagrid and get to recalculate for each perent record?
        >
        >>
        >Add a column to the parent datatable, with an expression something like
        > "Sum(Child(Rela tionName).Child ColumnName)"
        >>
        >>
        >>

        Comment

        • =?Utf-8?B?am9obmI=?=

          #5
          Re: DatagridView unbound Column

          Cheers Cor.

          I'm working on it. Although my brain is having difficulty. I'll come back.

          johnb


          "Cor Ligthert [MVP]" wrote:
          JohnB,
          >
          A textbox assumes that you have only one parentrow.
          >
          Steve gave you a fine solution as the latter is not the fact.
          >
          Otherwise have a look at the compute
          >
          http://msdn.microsoft.com/en-us/libr...e.compute.aspx
          >
          Cor
          >
          >
          "johnb" <johnb@discussi ons.microsoft.c omschreef in bericht
          news:111DBDE6-4BFD-4973-A398-ECE87FC8C41E@mi crosoft.com...
          Hi Steve
          Thanks for the reply. I was hoping to place the subtotal textbox on the
          form
          rather than in the parent grid. Any suggestions?
          johnb

          "Steve Gerrard" wrote:
          johnb wrote:
          Hi All
          I have a 2005vb.net Form with 2 datagrids with a perent child
          relationship. On the child datagrid I have 2 unbound columns which
          are derived from other columns in the grid. And it works fine. The
          question: how do I sub total an unbound calculated column in the
          child datagrid and get to recalculate for each perent record?

          >
          Add a column to the parent datatable, with an expression something like
          "Sum(Child(Rela tionName).Child ColumnName)"
          >
          >
          >
          >
          >
          >

          Comment

          Working...