:: Forum >>
urgent help required with this Wrapping
hi
i am doing a website in visual studio 2005.in my asp.net page i have got a grid view which takes the data from the database dynamically.i have given the following code:
protected void GridView1_DataBound(object sender, EventArgs e)
{
int i = ds.Tables[0].Rows.Count;
int j = ds.Tables[0].Columns.Count;
for (int k = 0; k < i; k++)
{
for (int l = 0; l < j; l++)
{
GridView1.Rows[k].Cells[l].Width = new Unit("50px");
}
}
}
i want the output in such a format that i dont want the data in the cell to go to the next line(i.e) it should not wrap the data in a cell. i want only the first 10 characters to appear in my cell and i want the rest to be truncated.i have tried to set wrap to be false also in the source code:
<RowStyle Font-Size="Medium" Wrap="false" />
but nothing seems to work. how do i wrap and truncate.
Please help me out. my deadline is nearing.Thanking in advance.
anu
Thursday, March 1, 2007
This topic is archived.
Back to support forum
Forum search