parse value in datagridview and apply value to other columns
Posted on 2006-05-03
I am trying to parse a value in a datagridview then apply the parsed values to additional cells.
I have a DGV with column A,B,C
in column A, the user enters Big-Mo
I want to parse "Big-Mo" and apply to
column B and C. Column B would have
"Big" and column C would have "Mo"
In VB6 I could parse it and use the
TextMatrix syntax to assign the values
to the needed columns. But I am not
sure how to go about this in VS2005(VB).
I was trying this first-----
The value will be numeric and alpha numeric and seperated by a hyphen.
Dim varhyphenPosition As Integer
varhyphenPosition = InStr(1, e.FormattedValue.ToString, ",")
DataGridViewNewOrder.Columns.GetNextColumn(Me.DataGridViewNewOrder.Column, DataGridViewElementStates.Selected, DataGridViewElementStates.Displayed)datae.ColumnIndex = 4
= Microsoft.VisualBasic.Mid(e.FormattedValue.ToString, varhyphenPosition + 1)
But no dice. Any thoughts would be grreatly appreciated.