J
John Smith
I'm looking into this peace of code:
protected void DropDown_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList list = (DropDownList)sender;
TableCell cell = list.Parent as TableCell;
DataGridItem item = cell.Parent as DataGridItem;
int index = item.ItemIndex;
string content = item.Cells[0].Text;
Response.Write(
String.Format("Row {0} contains {1}", index, content)
);
}
can I do this:
item.Cells[0].Text = "Some text...";
I don't want only to change value in the grid (displayed value), but also in
the underlaying DataSource (which is of XML file type).
protected void DropDown_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList list = (DropDownList)sender;
TableCell cell = list.Parent as TableCell;
DataGridItem item = cell.Parent as DataGridItem;
int index = item.ItemIndex;
string content = item.Cells[0].Text;
Response.Write(
String.Format("Row {0} contains {1}", index, content)
);
}
can I do this:
item.Cells[0].Text = "Some text...";
I don't want only to change value in the grid (displayed value), but also in
the underlaying DataSource (which is of XML file type).