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
Hide Columns and Rows at WebDataGrid

I am using the WebDataGrid, not the UltraWebDataGrid and I cant hide some columns of my grid.I want

to hide then at the grid prerender if this is possible.Mu columns are dynamically bounded and have no

specified keys.can anybody help me to hide some columns and rows?

  • 2426
    Suggested Answer

    Hello Chris,

    As far as I have seen there is no built-in way to hide columns and rows. You may be able to mock the functionality of hiding columns by adding or removing GridFields from the GridFieldsCollection. You could potentially hide rows by applying a filter.

    Hope that helps.

  • 295
    Suggested Answer
    posted in reply to [Infragistics] Aaron Marisi

    I find it disappointing:

    1) That you would suggest that there is no way to hide columns when it is documented in the help.

    2) That this clearly was available since 2011.2 and I've upgraded to 2012 and this still isn't working.

    I get this error when using the Hidden property available for a BoundDataField:

    [HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
       System.Web.UI.ControlCollection.Add(Control child) +11415588
       Infragistics.Web.UI.Framework.AppStyling.CssBuilder.OnPreRenderComplete(Object sender, EventArgs e) +742
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4543

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

    The reason for the need to hide columns is to have the data readily available whether it be in the browser or on the server. Most of my applications with the UltraWebGrid relied on this functionality. It looks like Bunty's solution should work, but this is something the grid should be doing on it's own. It's the sole purpose of buying 3rd party controls is to prevent us from having to create hacks for a usable UI.

Reply Children
No Data