Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Datagrid hypertext display change at runtime


Message #1 by Christopher Ware <cware33@y...> on Thu, 30 Jan 2003 09:04:46 -0800 (PST)
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

  Return to Index