This is a migrated thread and some comments may be shown as answers.

Get GridTextBoxColumnEditor

1 Answer 96 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Eng.Bassel Samman
Top achievements
Rank 2
Eng.Bassel Samman asked on 24 May 2010, 11:48 AM

Dears,

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

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 27 May 2010, 09:28 AM
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
 Next

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

Kind regards,
Mira
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.
Tags
General Discussions
Asked by
Eng.Bassel Samman
Top achievements
Rank 2
Answers by
Mira
Telerik team
Share this question
or