T
Tony
Dear all,
I'm using a datagrid in a c# asp.net page to display data
from a dataset populated from my SQL Server. So far, so
good!
The grid contains a "Problem Description" field which
contains carriage returns etc which are not displayed on
the page when the datagrid is rendered.
I've had an attempt to modify the string using the replace
method but so far no luck (see below). Any ideas on where
I'm going wrong?
Cheers
Tony
// ----------------
// create the dataset and fill it
DataSet ds = new DataSet();
myCommand.Fill(ds);
for(int i=0;i < ds.Tables[0].Rows.Count-1 ; i++)
{
strReplaced = ds.Tables[0].Rows["Problem
Description"].ToString();
strReplaced = strReplaced.Replace("\n","<br>");
}
MasterGrid.DataSource = ds;
MasterGrid.DataBind();
// ----------------
I'm using a datagrid in a c# asp.net page to display data
from a dataset populated from my SQL Server. So far, so
good!
The grid contains a "Problem Description" field which
contains carriage returns etc which are not displayed on
the page when the datagrid is rendered.
I've had an attempt to modify the string using the replace
method but so far no luck (see below). Any ideas on where
I'm going wrong?
Cheers
Tony
// ----------------
// create the dataset and fill it
DataSet ds = new DataSet();
myCommand.Fill(ds);
for(int i=0;i < ds.Tables[0].Rows.Count-1 ; i++)
{
strReplaced = ds.Tables[0].Rows["Problem
Description"].ToString();
strReplaced = strReplaced.Replace("\n","<br>");
}
MasterGrid.DataSource = ds;
MasterGrid.DataBind();
// ----------------