I'm creating a button every row using DataRow. I can't understand if is possible to render a button on a datarow?
for (int day = 0; day < days.Count; day++)
{
// dataRow[string.Format("Day{0}", day + 1)] = days[day].Price;
// TODO: Store to hidden field.
var button = new Button();
button.ID = string.Format("{0}", day);
button.Attributes.Add("style", "display:block; padding:4px; width:100%; height:100%;");
dataRow[day + 1] = GridViewPricing.Controls.Add(button);
}
Alternetive:
I create a string html tags but it just render as string on the gridview.
GridViewin asp. You need to reach at theCelllevel and then useAddControl.