Results 1 to 5 of 5

Thread: Any .Net Guru??

  1. #1

    Thread Starter
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961

    Any .Net Guru??

    I am using FlexGrid control of ComponentOne on my form in vb.net having 3 cols.

    I want to change the value of 3 col when 2nd col's value changes. I have written the following code:

    VB Code:
    1. Private Sub grdSHP_CellChanged(ByVal sender As Object, ByVal e As C1.Win.C1FlexGrid.RowColEventArgs) Handles grdSHP.CellChanged
    2.         With grdSHP
    3.             If e.Row = 0 Or e.Col = 0 Then
    4.                 Exit Sub
    5.             End If
    6.             If Val(.get_TextMatrix(15, 2)) = 0 Then
    7.                 .set_TextMatrix(e.Row, 2, "0") '***Here I get the error***
    8.             Else
    9.                 .set_TextMatrix(e.Row, 2, Val(.get_TextMatrix(15, 2)) * Val(.get_TextMatrix(e.Row, 1)) / 100)
    10.             End If
    11.         End With
    12.     End Sub

    This is not working.

    Pls guide me if there's any other way.

    Regards,

    Prakash

  2. #2
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    You need to ask this in the .Net forums.

    I see that you already did, but, asking it here also, will not make it get responded to with an answer any faster.

  3. #3
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Double Posted

  4. #4
    Addicted Member
    Join Date
    Aug 2003
    Posts
    153
    I'd recommend posting this on Component ones Newsgroups

    The other thing you could do is use the after edit event. Check if it was column 2 that was edited, and if so update column 3. Also the reason your getting an error is because your using 0 as a string, "0".

  5. #5

    Thread Starter
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961
    i tried replacing "0" with 0, but it isn't working.

    well i will try the after edit event.

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