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

Update problems with RadGrid When in InLine Edit mode - after upgrading to ASP.NET AJAX Q3 2010

1 Answer 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
BSL Support
Top achievements
Rank 1
BSL Support asked on 11 Mar 2011, 01:22 AM
Hi,

this is murali. i recently updated my DLL's from Q1 2010 to Q3 2010. I am having Update problems with radgrid when in edit mode

the following is the template column i have in my grid
 

<

 

telerik:GridTemplateColumn HeaderText="Note" UniqueName="Note" DataField="Note">  

 

<ItemTemplate>

<%#Eval("Note")%> 

 

 

 

</ItemTemplate>

<EditItemTemplate 

 

<telerik:RadTextBox ID="rtb_Note" TextMode="MultiLine" Columns="25" Rows="3" MaxLength="500" Text='<%# Bind("Note") %>' runat="server" />

</EditItemTemplate

 

</telerik:GridTemplateColumn>

 
i am trying to access the radtextbox value as follows
 

 

 

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 editorType As String = CType(editor, Object).ToString()
            Dim editorText As String = "unknown"  

 

            Dim editorValue As Object = Nothing 

 

  

            If

 

(TypeOf editor Is GridTemplateColumnEditor) Then
                
If column.UniqueName = "Note" Then
                    
editorText = clsmain.ReplaceSingleQuote(CStr(CType(e.Item.FindControl("rtb_Note" ), RadTextBox).Text))  

 

 

                End

 

 

 

            End

        End

 

 

 

    End

 

 

 

 

 

Next

 

 

 

 

 

 

so when i check the editorText value it is not getting the recenlty typed text.

i tried the same code with Q1 2010 and it works just fine, so what am i doing wrong for Q3 2010.

thank you in advance for all the help.

Murali






 


1 Answer, 1 is accepted

Sort by
0
BSL Support
Top achievements
Rank 1
answered on 11 Mar 2011, 06:23 PM
Never mind i figured out the problem.

its got nothign to do with the Telerik version. i was building a datatable and assigning it to the grid in the NeedDataSource Section of the code, so every time i was trying to edit the update button was triggering the needdatasource event first and then going to UpdateCommand event so i was always saving the same data.

all i had to do was move the datatable building part to outside the NeedDataSource event.
Tags
Grid
Asked by
BSL Support
Top achievements
Rank 1
Answers by
BSL Support
Top achievements
Rank 1
Share this question
or