How can i "see" the next record

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

    How can i "see" the next record

    How can i know ("see") the next record using the BindingSource
    without move to the next record ?


  • Cor Ligthert [MVP]

    #2
    Re: How can i "see&qu ot; the next record

    Giannis,

    In hundred ways, one of them. BindingSource.p osition + 1.



    Cor


    "giannis" <zzzinobios@fre email.grschreef in bericht
    news:eTfORKcTHH A.1552@TK2MSFTN GP05.phx.gbl...
    How can i know ("see") the next record using the BindingSource
    without move to the next record ?
    >
    >

    Comment

    • giannis

      #3
      Re: How can i &quot;see&qu ot; the next record

      When i use the BindingSource.p osition + 1 the form display the next record.
      I want to know the value of the next record without the form display the
      next record.


      Comment

      • Cor Ligthert [MVP]

        #4
        Re: How can i &quot;see&qu ot; the next record

        Giannis,

        Are you sure of that, it would be in my idea new VB code. Are you not mixing
        this up with BindingSource.P osition += 1

        I cannot see your code but BindingSource.P osition + 1 gives you in my idea
        the next record.

        Cor

        "giannis" <zzzinobios@fre email.grschreef in bericht
        news:Oz7dhucTHH A.2256@TK2MSFTN GP02.phx.gbl...
        When i use the BindingSource.p osition + 1 the form display the next
        record.
        I want to know the value of the next record without the form display the
        next record.
        >

        Comment

        • giannis

          #5
          Re: How can i &quot;see&qu ot; the next record

          Cor Ligthert [MVP] wrote:
          BindingSource.P osition + 1 gives you in my idea the next record.
          What code must i write to take the value of the next record ?
          Can you indicate me ?


          Comment

          • Cor Ligthert [MVP]

            #6
            Re: How can i &quot;see&qu ot; the next record

            First show me a piece how you do it, I can not give you a sample from 1:1000

            Cor

            "giannis" <zzzinobios@fre email.grschreef in bericht
            news:elh7BndTHH A.4260@TK2MSFTN GP06.phx.gbl...
            Cor Ligthert [MVP] wrote:
            >BindingSource. Position + 1 gives you in my idea the next record.
            >
            What code must i write to take the value of the next record ?
            Can you indicate me ?
            >
            >

            Comment

            • ClayB

              #7
              Re: How can i &quot;see&qu ot; the next record

              If the underlying DataSource for the BindingSource is a DataTable,
              then the object retrieved from the BindingSource by indexing it will
              be a DataRowView. Below is code that shows how to get at a field once
              you have a DataRowView. If you underlying datasource is something
              other than a DataTable, then the object retrieved will be some other
              type.

              Dim drv As DataRowView =
              CType(bindingSo urce1(bindingSo urce1.Position + 1), DataRowView) '
              Dim someIntValue As Integer = CInt(drv("Col1" )) ' Col1 is name
              of column in DataTable

              =============== ===
              Clay Burch
              Syncfusion, Inc.

              Comment

              • giannis

                #8
                Re: How can i &quot;see&qu ot; the next record

                We have a form (form1) with a Text box (box1) that takes values
                from a BindingSource. The currency value for the box1 is :
                "me.box1.te xt"
                How can we find (with the BindingSource.P osition +1) the next value
                for the box1 before we move to the next record ? (BindingSource. movenext)
                Sorry for my english ....


                Comment

                • Cor Ligthert [MVP]

                  #9
                  Re: How can i &quot;see&qu ot; the next record

                  Have a look at the code from Clay.


                  "giannis" <zzzinobios@fre email.grschreef in bericht
                  news:ur$ZRBfTHH A.496@TK2MSFTNG P06.phx.gbl...
                  We have a form (form1) with a Text box (box1) that takes values
                  from a BindingSource. The currency value for the box1 is :
                  "me.box1.te xt"
                  How can we find (with the BindingSource.P osition +1) the next value
                  for the box1 before we move to the next record ? (BindingSource. movenext)
                  Sorry for my english ....
                  >

                  Comment

                  • giannis

                    #10
                    Re: How can i &quot;see&qu ot; the next record

                    Thank you very much all two !!!


                    Comment

                    • giannis

                      #11
                      Re: How can i &quot;see&qu ot; the next record

                      A simpler way is the :

                      BindingSource.I tem(BindingSour ce.Position + 1)


                      Comment

                      Working...