This question is locked. New answers and comments are not allowed.
I have been having a wierd issue with the TreeView control when placed inside of an Ajax.BeginForm(). I am using the Checked Treeview sample as a starting point and basically i am trying to post the checked nodes back tot he server using ajax. I have the TreeView in a Partial View that gets replaced after the PostBack and my Controller returns a partialView which only contains the TreeVeiw.
On the first PostBack the checked nodes are returned and the Value properties of each checked node is returned correctly. On the second postback the checked nodel collection is returned correctly but the value field of each checked item is null. I can't for the life of me understand what is going on. I have created a test program that completely duplicates the issue.
I cant upload the .zip file but i have attached the 4 key pieces of the example in the source code.
The second AJAX POST to the SaveResults() controller method the vm.TopicsTree_checkedNodes has 5 entires if i select 5 items but each item in the collection has the value field as null.
(Modified)
After reviewing the source code i thought that it might not be clear that in the SaveResults() call I am looking at the ViewModel returned using the debugger to verify the results that I have stated. Right after that i rebuild the ViewModel to send it back to the partial view.
I can upload the .zip with the project file if required
Thanks in advance
Kevin
On the first PostBack the checked nodes are returned and the Value properties of each checked node is returned correctly. On the second postback the checked nodel collection is returned correctly but the value field of each checked item is null. I can't for the life of me understand what is going on. I have created a test program that completely duplicates the issue.
I cant upload the .zip file but i have attached the 4 key pieces of the example in the source code.
The second AJAX POST to the SaveResults() controller method the vm.TopicsTree_checkedNodes has 5 entires if i select 5 items but each item in the collection has the value field as null.
(Modified)
After reviewing the source code i thought that it might not be clear that in the SaveResults() call I am looking at the ViewModel returned using the debugger to verify the results that I have stated. Right after that i rebuild the ViewModel to send it back to the partial view.
I can upload the .zip with the project file if required
Thanks in advance
Kevin