Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16035 |

    Hi, I’m editing a cell and using:  AddHandler xg.Columns(0).CellEditorManager.QueryInputKey, AddressOf test – event to check each character. 
    However, I also want to get the whole value of the edited cell. eg. I may have got “s” as the last charater, but the cell may be “tes”, how can I get this whole edited value. When I use xg.currentcell.value, I just get the former value.

    vb.net please.

    Thanks in advance.

    Imported from legacy forums. Posted by troy@querytool.com (had 1043 views)

    Xceed Support
    Member
    Post count: 5658

    In the QueryInputKey event, you can cast the e.Control parameter as the CellEditor and get the actual value with it.

     

    Private Sub CellEditorManager_QueryInputKey(ByVal sender As Object, ByVal e As QueryEditorInputKeyEventArgs)

      ‘DirectCast(e.Control, WinTextBox).TextBoxArea.Text

    End Sub

    Imported from legacy forums. Posted by CharlesB (had 433 views)

    User (Old forums)
    Member
    Post count: 23064

    The problem is that DirectCast(e.Control, WinTextBox).TextBoxArea.Text will only give me the previous value in the cell.
    So if the cell value is “1” and I add “2”, when the event is raised, the  DirectCast(e.Control, WinTextBox).TextBoxArea.Text will return “1”.
    I thought about concatinating the value of the textbox: “1” when the new key that has been selected: “2”, but what happen if the value is “1234” and I select that value and clear it by replacing it with “1” then I would have “12341” and I would only what “1” returned from DirectCast(e.Control, WinTextBox).TextBoxArea.Text.

    Do you see my problem?

    Imported from legacy forums. Posted by troy@querytool.com (had 1506 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.