I simply want to change the text of a datagrid column to during
runtime.
Everything works fine, but I simply want to change the text. Presently
when I use the code below, I lose the hyperlink. Any advice would be
helpful.
private void SetData ()
{
int totalRows = dsVehicles.Tables[0].Rows.Count;
DataRowCollection rows = dsVehicles.Tables[0].Rows;
for (int i = 0; i < totalRows; i++ )
{
// Change True/False to Yes/No for Dispatch Status
if ( rows[i][8].ToString() == "False" )
{
DataGrid1.Items[i].Cells[9].Text = "Not Dispatched";
}
else
{
DataGrid1.Items[i].Cells[9].Text = "Dispatched";
}
// Add Direction (false = in) to Shelter Status
if ( rows[i][7].ToString() == "False" )
{
DataGrid1.Items[i].Cells[8].Text = "In-" + DataGrid1.Items[i].Cells
[8].Text;
}
else
{
DataGrid1.Items[i].Cells[8].Text = "Out-" + DataGrid1.Items[i].Cells
[8].Text;
}
}
}
---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now