You can have logic in datagrid_ItemDatabound event:
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
if (e.Item.Cells[size_index].Text.Equals(""))
{
// no size data
}
}
HTH
Elton Wang
(E-Mail Removed)
"H." wrote:
> Hi,
>
> I just have a simple question regarding dataGrid in ADO.NET. I developed the
> web application by ASP.net and C#. I want to implment a dataGrid for the
> product list. The product list display the product name, size, type, price
> .... But for the specfic product category, its size column may not has any
> data. So i want to write the code in back-end by C# to determin whether every
> item in the size column in dataGrid has data. How I can write it in C# ?
>
> is there methods I can use to determin every item in size column contains
> data ?
>
> Thank you,
> H.