Рассмотрим строку gridview, содержащую два столбца ... Каждый столбец имеет два текстовых поля ... Onkeypress в первом текстовом поле мне нужно обновить значение во втором текстовом поле ... .. можно ли с JQuery ....Jquery + Обновление одного текстового поля из другого текстового поля внутри gridview
EDIT: Grid http://img85.imageshack.us/img85/4044/gridp.jpg
Я хочу показать Closing Advance based on Advance Detucted textbox keypress
ClosingAdvance=OpeningADvance-AdvanceDetucted
....
<table class="grid-view" id="ctl00_ContentPlaceHolder1_gridEmployee" style="border: 0px none rgb(244, 242, 242); border-collapse: collapse;" border="0" cellspacing="0" rules="all">
<tbody><tr class="gridHeaderimg">
<th scope="col" style="width: 10%;">
Name
</th><th scope="col" style="width: 10%;">
Salary Basis
</th><th scope="col" style="width: 12%;">
Salary Per Day
</th><th scope="col" style="width: 12%;">
No of Days Present
</th><th scope="col" style="width: 12%;">
Opening Advance
</th><th scope="col" style="width: 12%;">
Advance Detucted
</th><th scope="col" style="width: 12%;">
Closing Advance
</th><th scope="col" style="width: 10%;">
Salary Given
</th>
</tr><tr class="normal">
<td class="GridCs" style="width: 10%;" align="left">
<span id="ctl00_ContentPlaceHolder1_gridEmployee_ctl02_LblEmpName">Natarajan</span>
<input name="ctl00$ContentPlaceHolder1$gridEmployee$ctl02$HiddenId" id="ctl00_ContentPlaceHolder1_gridEmployee_ctl02_HiddenId" value="16" type="hidden">
</td><td class="GridCs" style="width: 10%;" align="left">
<span id="ctl00_ContentPlaceHolder1_gridEmployee_ctl02_LblSalary">Weekly</span>
</td><td class="GridCs" style="width: 12%;" align="left">
<span id="ctl00_ContentPlaceHolder1_gridEmployee_ctl02_LblSalaryPerDay">150.00</span>
</td><td style="width: 12%;" align="center">
<input name="ctl00$ContentPlaceHolder1$gridEmployee$ctl02$TxtDaysPresent" id="ctl00_ContentPlaceHolder1_gridEmployee_ctl02_TxtDaysPresent" class="text_box_height_14_width_50" type="text">
</td><td class="GridCs" style="width: 12%;" align="left">
<span id="ctl00_ContentPlaceHolder1_gridEmployee_ctl02_LblOpeningAdv">500.00</span>
</td><td style="width: 12%;" align="center">
<input name="ctl00$ContentPlaceHolder1$gridEmployee$ctl02$TxtAdvanceDeducted" onchange="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder1$gridEmployee$ctl02$TxtAdvanceDeducted\',\'\')', 0)" onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;" id="ctl00_ContentPlaceHolder1_gridEmployee_ctl02_TxtAdvanceDeducted" class="text_box_height_14_width_50" type="text">
</td><td style="width: 12%;" align="center">
<input name="ctl00$ContentPlaceHolder1$gridEmployee$ctl02$TxtClosingAdvance" id="ctl00_ContentPlaceHolder1_gridEmployee_ctl02_TxtClosingAdvance" class="text_box_height_14_width_50" type="text">
</td><td style="width: 10%;" align="center">
<input name="ctl00$ContentPlaceHolder1$gridEmployee$ctl02$TxtSalary" id="ctl00_ContentPlaceHolder1_gridEmployee_ctl02_TxtSalary" class="text_box_height_14_width_50" type="text">
</td>
</tr><tr class="alternate">
<td class="GridCs" style="width: 10%;" align="left">
<span id="ctl00_ContentPlaceHolder1_gridEmployee_ctl03_LblEmpName">Pandian</span>
<input name="ctl00$ContentPlaceHolder1$gridEmployee$ctl03$HiddenId" id="ctl00_ContentPlaceHolder1_gridEmployee_ctl03_HiddenId" value="17" type="hidden">
</td><td class="GridCs" style="width: 10%;" align="left">
<span id="ctl00_ContentPlaceHolder1_gridEmployee_ctl03_LblSalary">Weekly</span>
</td><td class="GridCs" style="width: 12%;" align="left">
<span id="ctl00_ContentPlaceHolder1_gridEmployee_ctl03_LblSalaryPerDay">122.00</span>
</td><td style="width: 12%;" align="center">
<input name="ctl00$ContentPlaceHolder1$gridEmployee$ctl03$TxtDaysPresent" id="ctl00_ContentPlaceHolder1_gridEmployee_ctl03_TxtDaysPresent" class="text_box_height_14_width_50" type="text">
</td><td class="GridCs" style="width: 12%;" align="left">
<span id="ctl00_ContentPlaceHolder1_gridEmployee_ctl03_LblOpeningAdv">0.00</span>
</td><td style="width: 12%;" align="center">
<input name="ctl00$ContentPlaceHolder1$gridEmployee$ctl03$TxtAdvanceDeducted" onchange="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder1$gridEmployee$ctl03$TxtAdvanceDeducted\',\'\')', 0)" onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;" id="ctl00_ContentPlaceHolder1_gridEmployee_ctl03_TxtAdvanceDeducted" class="text_box_height_14_width_50" type="text">
</td><td style="width: 12%;" align="center">
<input name="ctl00$ContentPlaceHolder1$gridEmployee$ctl03$TxtClosingAdvance" id="ctl00_ContentPlaceHolder1_gridEmployee_ctl03_TxtClosingAdvance" class="text_box_height_14_width_50" type="text">
</td><td style="width: 10%;" align="center">
<input name="ctl00$ContentPlaceHolder1$gridEmployee$ctl03$TxtSalary" id="ctl00_ContentPlaceHolder1_gridEmployee_ctl03_TxtSalary" class="text_box_height_14_width_50" type="text">
</td>
</tr>
</tbody></table>
вы могли бы быть более конкретными и обеспечить некоторую разметку? –
@Tom, пожалуйста, см. Мое редактирование ... –