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

[Solved] Calling rebind with a complex js object

2 Answers 117 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.
Guilherme
Top achievements
Rank 1
Guilherme asked on 26 Feb 2011, 12:31 AM
Hello,

I'm trying to use the rebind method of the grid passing a complex javascript object but it is not properly bound on the server side.
It works if I use a simple object like this:
$('#grid').data('tGrid').rebind({ selectedId: sampleId});
But if I try it with a complex object (array or nested properties) it doesn't map to the object on the server side:
$('#grid').data('tGrid').rebind({ complexObject: [sample1, sample2], property: {nestedProperty}});


Does anyone have any idea how to make this work?

Thanks,

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 28 Feb 2011, 07:59 AM
Hello Guilherme,

 This is currently not supported. Only simple arguments can be passed to the rebind method. We will consider this as a feature request and will probably implement it with the next official version.

Regards,
Atanas Korchev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Tim
Top achievements
Rank 1
answered on 12 Jan 2012, 08:49 PM
I too would like to see this feature... I've been trying to rebind with an js array into an IEnumerable<myobj> for a few hours and though I was doing something wrong as I could get the collection to bind (controller action argument showed correct number of myobj, but the myobj properties were not getting set...)

Tags
Grid
Asked by
Guilherme
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Tim
Top achievements
Rank 1
Share this question
or