Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1210
Iterate cells in IntializeRow event
posted

I am trying to iterate through all cells on a row looking for cells that have a value below and if present to hide that cell. The code below is not working. I am new to webdatagrid so your input would be welcome

for (int i = 0; i <= e.Row.Cells.Count - 1; i++)
{
    if (e.Row.Cells[i].Value.ToString() == "1/1/1800 12:00:00 AM")
    {
        e.Row.Cells[i].Hidden = true;
    }
}

Parents
  • 49378
    posted

    Hi rookertrusted,

    Thank you for posting in the community.

    Based on the provided code I assume that you are using the UltraWebGrid. Please note that individual cells may not be hidden in UltraWebGrid (however you could set an empty value or text for that cells) as the Hidden property is implemented only for the whole row object.

    The UltraWebGrid control is now outdated and as of .NetAdvantage 2011 Volume 2 is no longer included in our product package. I would suggest that you consider switching to the WebDataGrid/WebHieararchicalDataGrid. More information regarding these controls is available at:

    http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=Web_WebDataGrid_WebDataGrid.html

    Additional samples demonstrating the features of these grids can be found at:
    http://samples.infragistics.com/aspnet/

    Feel free to contact me if you have any questions.

Reply Children
No Data