Princy,
Hi there. How do you hide the rows by setting conditions to a non-data key value columns? For example if I set condition to data key value "
CustomerID", it works but If I set data key value to "
CompanyName", I can't hide the row.
I would like to hide the row based on the value of "CompanyName" instead of "CustomerId".
This works:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "Master")
{
GridDataItem item = (GridDataItem)e.Item;
if (item.GetDataKeyValue("CustomerID").ToString().Substring(0, 1) == "A")
{
item.Display =
false; //hide the row
}
}
}
This does not work..
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "Master")
{
GridDataItem item = (GridDataItem)e.Item;
if (item.GetDataKeyValue("CompanyName").ToString().Substring(0, 1) == "A")
{
item.Display =
false; //hide the row
}
}
}
Thanks
GC_0620