This is a migrated thread and some comments may be shown as answers.

[Solved] AjaxRequest Checkbox in DetailItemTemplate

0 Answers 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
moegal
Top achievements
Rank 1
moegal asked on 30 Apr 2013, 10:37 PM
I have a Checkbox in DetailItemTemplate in a RadGrid.  I am triggering an AjaxRequest with javascript

How can I get each checkbox value in my event? [protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)]

I have a button called "delete checked".  I have several other action I run thru by sending different arguments, not sure how to handle this one. Would I loop thru the rows?

Any direction?

Thanks,

Marty

SOLVED: 
List<string> selectedItems = new List<string>();
                foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
                {
                    RadButton DelCheck = item.DetailTemplateItemDataCell.FindControl("DelCheck") as RadButton;
                    if (DelCheck.Checked)
                    {
                        selectedItems.Add(DelCheck.CommandArgument);
                    }
                }



No answers yet. Maybe you can help?

Tags
Grid
Asked by
moegal
Top achievements
Rank 1
Share this question
or