How to create Check Box Controls list in Repeater/Datalist/Listview ??
Expand Post »
Hi,
I want to create a web application that have messaging feature,
thus the message inbox will be similar to typical email inbox where you can tick the checkboxes to select which email to be deleted or moved. Just like the below picture :
Re: How to create Check Box Controls list in Repeater/Datalist/Listview ??
Create a templatefield, insert the checkbox and afterwards, check with FindControl() wether the checkbox has been checked. The mastercheckbox needs to be inserted in the headerrow of the control. Also there can be checked with FindControl(). If it's checked, reload the page. Be aware that the controls need to have AutoPostback() setted to true.
If you dont want it with autopostback you need to implement some literals and javascript which is harder to fix.....
// Set the OnRowDeleting property of the GridView
OnRowDeleting="gv_Lookup_RowDeleting"
// This method will be called on the click of the delete button. Defined later in the code sample
Re: How to create Check Box Controls list in Repeater/Datalist/Listview ??
hi,
i have tried the codes, and i got this error which i cant solve it.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Previous Thread in ASP.NET Forum Timeline:checkbox query