Hi,
When I bind a table to RADGrid, are the row headings the same as the table field names.
So when I bind all the rows in an entire table, and the table has rows a and b, are the row headings in RADGrid a and b.
I want to extract cell values from every row but only if the checkbox is selected (this is called "Checkbox1" in the Aspx):
My code is as follows:
foreach (GridDataItem g in RadGrid1.MasterTableView.Items)
{
if ((g.FindControl("Checkbox1") as CheckBox).Checked)
{
var Title = ((sender as CheckBox).Parent.Parent as GridDataItem).Cells[0].Text;
var Url = ((sender as CheckBox).Parent.Parent as GridItem).Cells[1].Text;
// Add title and Url of feeds
list.Add(new GenedRss(Url, Title));
}
}
Now I select the checkbox in the 4th row. My headings for the grid are like so:
But title variable is blank, and Url represents the title (so the 0 index of the cells collection). Shouldn't the title variable hold the title and the Url variable hold XmlUrl?
Can someone explain why this is not so?
Thanks