I have a gridview in which i show details of products complaints we receive from customer.
Whenever we take action on complaints we sometimes replace few parts of products, for this purpose i have a checkboxlist in my Gridview column no. 7 for each row. This CheckBoxList contains replaceable parts and one can select more than one part for each complaint (each row).I want to write a javascript which can loop through each gridview row and as soon as i select the chekcboxlist items in 7th column it shows them on a label in column no 8 for each gridview row.
So basically i need to write a javascript which has a loop for each gridview row and then a loop to read checkboxlist selected items for each row.
Please help i am not able to write that javascript, also please tell me how and where should i call this javascript.
Please help i am not able to write that javascript, also please tell me how and where should i call this javascript.
Thanks in advance.
ramya bharathPosted May 28, 2015, 1:24 AM
1. In the grid view item template of your checkboxlist create a selection change event calling a JavaScript function passing the control
Refer this link for an example.http://forums.asp.net/t/1408257.aspx?How+to+reference+Gridview+row+in+javascript+after+OnChange+event+of+textbox
2. As given in the example get the current rowindex of the grid view using checklistbix.ParentNide.ParentNode
3.append the value of in the cell 7 of that row to display the selected value of that control with the checklistbox.value