I have a gridview that has a checkbox column, with a checkbox in the header that when clicked, selects all of the checkboxes in the rows below. My issue is that I am disabling rows in my .net code. When I click the checkbox in the header, I dont want it to select the checkboxes in the disabled rows. I am using the SelectAllRowsOnPage to do my select all. Is there a way to only select the checkboxes on rows that are not disabled?
below is my .ASPX code:
<dxwgv:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="1" Caption = "SelectAll">
<input type="checkbox" onclick="grid.SelectAllRowsOnPage(this.checked);" style="vertical-align:middle;" title="Select/Unselect all rows on the page"></input>
<Paddings PaddingBottom="1px" PaddingTop="1px" />
Send a custom callback to the server and select only those records which have enabled checkboxes. To send a custom callback to the server, use the ASPxGridView's client-side PerformCallback Method.
Thank you for your response. I am not sure how creating a custom callback is going to work for my situation.
My issue is when I click the checkbox in the header, I do not want it to select the check boxes in the data rows below if the data row is disabled.
Please See Attatched screenshot.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.