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

[Solved] Updating editable grid with jquery

2 Answers 115 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
carlg
Top achievements
Rank 1
carlg asked on 16 May 2012, 01:25 AM
I have an editable grid and I want to update one of the cells using Jquery as in the following example:

$('#TBI tr.t-state-selected')[0].cells[1].innerHTML = $("#LookupName").html();


What else do I need to do besides this?  This does not trigger the hasChanges property of the grid and does not pass the object model as being updated back to my controller.  When viewing the grid on the screen, it gets updated fine.  It just seems like there is something else back end that I need to update also.

Please help.

Thanks

2 Answers, 1 is accepted

Sort by
0
carlg
Top achievements
Rank 1
answered on 16 May 2012, 01:37 AM
After looking at this further it seems as if there is a text box behind the TD of the grid.  I think I may need to also update this text box, but how do I reference it?
0
carlg
Top achievements
Rank 1
answered on 16 May 2012, 03:33 PM
So nobody knows how to do this?  Could I assume it can't be done?  I'm actually getting pretty close.

Here is what I have so far:

var selectedTBIRow = $('#TBI tr.t-state-selected');
$('#LookupDialog').dialog('close'); //Closes my lookup dialog box
 
 //Closing my lookup dialog box populates the hidden #LookupName
var setString = '<span class="t-dirty"></span>' + $("#LookupName").html();
 
$('#TBI tr.t-state-selected')[0].cells[1].innerHTML = setString ;


There is still something missing.  This is not altering the "hasChanges" status of my grid which is not triggering the grid to send this row back as edited to my controller.

I'd love to hear from someone at Telerik.

Tags
Grid
Asked by
carlg
Top achievements
Rank 1
Answers by
carlg
Top achievements
Rank 1
Share this question
or