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

[Solved] MVC3 Grid with Insert popup Ajax rebind Model

1 Answer 108 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.
Bruce
Top achievements
Rank 1
Bruce asked on 18 Jul 2012, 03:27 PM
I have an MVC3 Telerik Grid that uses a popup for the insert and the popup is a Custom Editor Template. Everything works fine but I would like to dynamically refresh the model based on a selection from a Telerik ComboBox. I am able to intercept the event and get the value of the Id of the selection. In the ComboBox_OnClose javascript function I make an Ajax 'Post' to the controller and I am able to see the Model but not the current values and when I return the model back to the screen the view doesn't refresh. I also tried an Ajax call that serializes the MultiselectList that I want refreshed and it returns a value and the view is updated but the model is untouched when I post back to do the insert. The popup is used to create a new user and the user needs a company selected in the company combobox inorder to populate the multiselectbox that is unique based on the user. I have been able to do this in stages but the user wants a one stop UI. Anyhelp would be appreciated including you can't do that. Thanks

1 Answer, 1 is accepted

Sort by
0
Bruce
Top achievements
Rank 1
answered on 19 Jul 2012, 04:46 PM
I found that in the forms collection the values that I saw in the view that were dynamically changed via an ajax call were available. The mistake I made finding them was that c["ListBoxName"] (which is null ) instead of c["ListBoxName[]"] and there they were the selected values. Where formscollection c is passed into the HttpPost actionresult.
Thanks,
Bruce
Tags
Grid
Asked by
Bruce
Top achievements
Rank 1
Answers by
Bruce
Top achievements
Rank 1
Share this question
or