Get GridTextBoxColumnEditor

2 posts, 0 answers
  1. Eng.Bassel Samman
    Eng.Bassel Samman avatar
    25 posts
    Member since:
    Oct 2008

    Posted 24 May 2010 Link to this post


    I have a RadGrid with EditMode = InPlace and I have two GridTextBoxColumnEditor and one GridNumericColumnEditor.
    In my page I save changes when user click Save Button

    The problem is:

    In Save button code (Vb Code) I am trying to get the text from GridTextBoxColumnEditor  and GridNumericColumnEditor as following:

     EditorL1_NAME.Text (GridTextBoxColumnEditor)
     EditorSALARY.Text   (GridNumericColumnEditor)

    Now, I can not get the text in GridTextBoxColumnEditors, while I get the text from GridNumericColumnEditor.

    I tried EditorL1_NAME.TextBoxControl.Text   but I got the same result.

    Can you help me?

    Best Regards






  2. Mira
    Mira avatar
    1124 posts

    Posted 27 May 2010 Link to this post

    Hello Bassel,

    I recommend that you use the following code to get the text from the column editors:
    For Each column In e.Item.OwnerTableView.Columns
      If TypeOf column Is IGridEditableColumn Then
       Dim editableCol As IGridEditableColumn = CType(column, IGridEditableColumn)
       If (editableCol.IsEditable) Then
        Dim editor As IGridColumnEditor = editMan.GetColumnEditor(editableCol)
        Dim editorText As String = "unknown"
        Dim editorValue As Object = Nothing
        If (TypeOf editor Is GridTextColumnEditor) Then
         editorText = CType(editor, GridTextColumnEditor).Text
         editorValue = CType(editor, GridTextColumnEditor).Text
        End If   
       End If
      End If

    For additional information, please take a look at the Updating values in-place and with edit forms help topic.

    Kind regards,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top