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

Radgrid email selected rows

1 Answer 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tash
Top achievements
Rank 1
Tash asked on 09 Jul 2012, 03:42 PM
I have a task where I need to email information from a row where a checkbox is selected from a templatecolumn. I dont want to email info for the whole grid just the ones where a checkbox is checked from whichever row is "selected". How can I go about achieving this?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 11 Jul 2012, 02:28 PM
Hello Tash,

You could traverse the grid items and get the item's information if the corresponding CheckBox has been checked:
protected void Button1_Click(object sender, EventArgs e)
  {
     foreach (GridDataItem dataItem in RadGrid1.MasterTableView.Items)
      {
          if ((dataItem["TemplateColumn"].FindControl("CheckBox1") as CheckBox).Checked)
          {
              string shipCountry = dataItem["ShipCountry"].Text;
          }
      }
  }

That way you could save and send the row data content according to your specific needs.

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Tash
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or