Re: Programmatically changing text in a BoundColumn in a DataGrid?
- From: Masudur <munnacs@xxxxxxxxx>
- Date: Sat, 28 Jul 2007 08:37:30 -0000
On Jul 28, 5:12 am, "Jen" <n...@xxxxxxxxxxx> wrote:
I have a BoundColumn that displays a numeric value. I want to override the
number if it is zero and display a string instead. What's the easiest way
to do that?
Thanks in advance.
Hi...
in itemdataboud check the item you want to check and change the
value...
protected void GridView1_RowDataBound(object sender,
GridViewRowEventArgs e)
{
if (e.Row.Cells[6].Text == "0")
e.Row.Cells[6].Text = "Zero";
}
Thanks
Md. Masudur Rahman (Munna)
Kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com
.
- References:
- Prev by Date: Re: checkboxlist - determine checkbox that caused control to fire
- Next by Date: Re: Line spacing for ListItems
- Previous by thread: Programmatically changing text in a BoundColumn in a DataGrid?
- Next by thread: cookies don't work for pages with UpdatePanel
- Index(es):
Relevant Pages
|