We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

controltext vs cellvalue

Thread ID:

Created:

Updated:

Platform:

Replies:

11564 Mar 10,2004 08:06 AM Mar 10,2004 08:47 AM Windows Forms 1
loading
Tags: GridControl
Philip Bishop
Asked On March 10, 2004 08:06 AM

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.

Administrator [Syncfusion]
Replied On 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 Console.WriteLine(Me.GridControl1(cc.RowIndex, cc.ColIndex).Text) End Sub

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;