Hi I have a grid which looks something like this:
Serial No Document Name Attachment
1(checkbox) abc (img)
2(checkbox) xyz (img)
3(checkbox) uio (img)
4(checkbox) pop (img)
When you click on the img on Attachement ,it opens a dialog box which has attached mutiple documents .AND there is a checkbox against each document.
Now what I want to do is if the user selects those checkboxes then it should add the attribute documentcode to a variable, similarly if the user checks another document, it appends that attribute to that varaiable and thus form a string. Also, if the user selects checkbox against serial number 1, the checkboxes against that relevant dialog box also gets checked. So in this case I want to append attributes too.
For this purpose, I added an onclick function on the checkbox of the dialog box
if ($(el).is(':checked'))
{
docCodes += DocumentCode + '♦';
}
}
Now when I am selecting checkboxes in dialog box it appends the document code , however when I uncheck it , it should remove that document code which is not happening. How do I do this? Also on parent checkbox, the attributes should get appended too