Dear J,
i found the solution as below do you have better idea because in the case below i should find the base color of objects at first and save it in new column (No.5)and after change the row psition do one more transaction to rolle it back to first color
Public Class Highlight
'the process of row which leave
'------------------------------------------
Private Sub SolidListDataGridView_CellLeave(sender As Object, e As DataGridViewCellEventArgs) Handles SolidListDataGridView.CellLeave
Dim z As Integer = SolidListDataGridView.CurrentRow.Index
Dim lld2 As String = SolidListDataGridView.Item(4, z).Value
Dim col As Double = SolidListDataGridView.Item(5, z).Value
Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
Dim acadApp As Object = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication
Dim acCurDb As Database = doc.Database
Dim Cur As AcadObject
Cur = acadApp.activedocument.handleToObject(lld2)
'this transaction reset the color of object to first situation
Using Trans2 As Transaction = acCurDb.TransactionManager.StartTransaction()
Cur.color = col
Trans2.Commit()
End Using
End Sub
'the action on current row
'------------------------------------------
Private Sub SolidListDataGridView_MouseDown(sender As Object, e As DataGridViewCellEventArgs) Handles SolidListDataGridView.CellClick
Dim i As Integer = SolidListDataGridView.CurrentRow.Index
Dim lld1 As String = SolidListDataGridView.Item(4, i).Value
Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
Dim acadApp As Object = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication
Dim acCurDb As Database = doc.Database
Dim Cur As AcadObject
Cur = acadApp.activedocument.handleToObject(lld1)
'this transaction change the color of object
Using Trans1 As Transaction = acCurDb.TransactionManager.StartTransaction()
Cur.color = 150
Trans1.Commit()
End Using
End Sub
end class