I''m having some problems trying to tell when data has changed and trying to update cells at the same time. Say u have a grid with 10 rows and 2 columns. I want the user to be able to enter values in 2 consecutive rows ONLY. so like if they enter a value in row 3 then i want to make rows 2,3 and 4 clickable and enabled but i want to make row 1 and then 5 through 10 not clickable or enabled. Im trying to do this through the currentcellchanging event. the problem i''m having is that in this event the cellvalue isnt updated until they leave the event. so for example if the user had 50 in row4 and 50 in row 5 and then they hit delete on the row4 the cellvalue is still 50 but the controltext is 0. the cellvalue doesnt get updated until u leave the event. is there any other event that can accomplish what i want that would have the cellvalue changed so i dont have to set up a renderer variable and a gridstyleinfo? i have to use the renderer to get to the controltext.
ADAdministrator Syncfusion Team March 10, 2004 08:47 AM
You can get the renderer from the current cell when you need it to get the ControlText. (ie, grid.CurrentCell.Renderer.COntrolText).
Anyway, you can use CurrentCellAcceptedChanges if you want to get the change value from the cell style directly. This is an event that fires after the value has been set into the cell style.
Private Sub GridControl1_CurrentCellAcceptedChanges(ByVal sender As Object, ByVal e As CancelEventArgs) Handles GridControl1.CurrentCellAcceptedChanges
Dim cc As GridCurrentCell = Me.GridControl1.CurrentCell