Results 1 to 2 of 2

Thread: unbound column doesn't show result

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2013
    Posts
    3

    unbound column doesn't show result

    Hi,

    VB newbe looking for some help.
    i have a datagrid with 8 columns (id, ean, name, description, price, totalprice, a spacer column and vat)

    i like to show a calculated column in a datagrid showing price inc. vat (totalprice)
    So i created a unbound column wich is on index 5 and when i try to populate that column it doesn't show the results.


    Code:
     
            For Each r As DataGridViewRow In Me.dataGridProducts.Rows
     
                TotaalPrijs = r.Cells(4).Value + (r.Cells(4).Value * r.Cells(8).Value / 100)
                r.Cells(5).Value = totaalPrijs
                       
     
    
            Next
    when i use the index of any other bound column it shows me the result in the wrong column (category column)



    Code:
            For Each r As DataGridViewRow In Me.dataGridProducts.Rows
     
                TotaalPrijs = r.Cells(4).Value + (r.Cells(4).Value * r.Cells(8).Value / 100)
                r.Cells(6).Value = totaalPrijs
                      
     
    
            Next
    Any help would be appriciated
    Last edited by michel vervoort; May 8th, 2013 at 06:59 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width