This is a migrated thread and some comments may be shown as answers.

Cero As Null

1 Answer 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gino Suarez
Top achievements
Rank 1
Gino Suarez asked on 27 Oct 2009, 07:55 PM
Hi, i'm triying to hide all cells with cero value, i just wanto to see values greater than 0 (Cero),
thanks

Gino

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 27 Oct 2009, 09:25 PM
Hello Gino,

I'm not sure whether you actually want to hide the cells or just remove the zeroes. Give this snippet a try and let me know whether this helps:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
     if (e.Item is GridDataItem)
     {
           GridDataItem item = e.Item as GridDataItem;
           if (int.Parse(item["myColumnName"].Text) == 0)
                item.Text = " ";
     }
}

Source: Conditional Formatting for rows/cells on ItemDataBound

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Gino Suarez
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or