Click here to Skip to main content
15,909,437 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
In our page view we have two Dropdown and one Grid(in the form of a table).when we changed any value from second dropdown,the data should be change in the grid.Here we want to post back only the potion of Grid(SearchResult) instead of full postback the page.So that we are loosing the selected value from both Dropdownlist

Here is the code we applied

XML
@using (Ajax.BeginForm("Uploadpayroll", "Payrolls", new AjaxOptions() { UpdateTargetId = "SearchResult" }, new { enctype = "multipart/form-data", id = "form0" }))
   {

                                             <select id="ddClient" name="centre_id" onchange="form0.submit();" class="input-large">
                                           <option value="0">-Select-</option>
                                       </select>
                                   </td>



XML
<div class="row-fluid">
           <div class="span12 well">
               <table id="SearchResult" class="table table-striped table-bordered table-condensed mGrid">

-------
Posted
Comments
SP HINGU 11-Feb-14 3:58am    
what are you doing on second drop down selection changed event?
soumyaraj 11-Feb-14 4:09am    
<select id="ddClient" name="centre_id" önchange="form0.submit();" class="input-large">

The grid will bind with the new data according to the selected client from ddClient
SP HINGU 11-Feb-14 4:16am    
onchange event should be like this
onchange="('#form0').submit();"
soumyaraj 11-Feb-14 4:21am    
we changed like this But action is not happening
<select id="ddClient" name="centre_id" önchange="('#form0').submit();" class="input-large">
SP HINGU 11-Feb-14 4:46am    
oh sorry its like this
onchange="$('#form0').submit();"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900