Prashwee,
I achieve something similiar when a check box value has changed, add a
DataGridViewImageCell 1st and an ImageList with your Status images in it,
and then trap the CellFormatting event like below
<code>
Private Sub DataGridView1_CellFormatting(ByVal sender As Object, ByVal e As
DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
If e.ColumnIndex = 0 Then setDGVImageStatus(sender, e)
If e.ColumnIndex = 3 Then setDGVSignificant(sender, e)
End Sub
</code>
And add the following Sub for actually setting the Image cell's value -
Don't forget validation :-)
I was trapping when value of my ComboBox
''' <summary>
''' Sets the image column of the datagridview dependant on the value
of the ysnResolved column
''' </summary>
''' <param name="sender">The DataGridView who's column needs
altering</param>
''' <param name="e">DataGridViewCellFormattingEventArgs</param>
''' <remarks>Sender as object so that this block can be reused for
both grids</remarks>
Private Sub setDGVImageStatus(ByVal sender As Object, ByVal e As
DataGridViewCellFormattingEventArgs)
Dim colName As String = DirectCast(sender,
DataGridView).Columns(e.ColumnIndex).Name.ToString
'getResolvedDGVColName(sender) just returns the column name of my
DataGridViewCheckBoxCell
If DirectCast(sender,
DataGridView).Rows(e.RowIndex).Cells(getResolvedDG VColName(sender)).Value.Equals(False)
Then
e.Value = iml.Images(1)
Else
e.Value = iml.Images(0)
End If
End Sub
Hope that Helps you out - if not let me know
Brendon
"Prashwee" <pr******************@ifs.lkwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hello All
In my windows application I am using DataGridView as my grid control. I
populated let's say 10 rows of data and modified 3 random rows. I need to
put some sort of Edit Marker in the row header. This can be an image.
Please any one share a code for this implementation.
If i were to save this records, how can I trap those 3 modified rows
without going throgh the whole row set?
Thanks in Advance
Prash