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
1725
Hiding columns seems to leave a header placeholder
posted

I have a simple WebGrid where I'm trying to hide some columns. I've set the column.Hidden attribute to true however when the grid is displayed the column headers and column values are not displayed but there appears to be an empty column displayed in the grid.


I've attached a screen shot with the areas of concern circled. Is this expected behavior? Is there any way to prevent this?

Thanks

Parents
No Data
Reply
  • 28464
    posted

    Hello,

    Thanks for writing. Unfortunately it appears that the screenshot did not make it (at least I am not seeing one). Am I missing something?

    In any case, I tried binding a simple WebGrid to a Northwind datatable and set one of the columns there Hidden = True and could not observe what you see. Please, see the screenshot attached for what I get for this setup (notice that I have three columns and I set the third one Hidden = True)

      <igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server"
            DataSourceID="AccessDataSource1">
            <bands>
                <igtbl:UltraGridBand>
                    <Columns>
                        <igtbl:UltraGridColumn BaseColumnName="CustomerID" IsBound="True"
                            Key="CustomerID">
                            <Header Caption="CustomerID">
                            </Header>
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn BaseColumnName="CompanyName" IsBound="True"
                            Key="CompanyName">
                            <Header Caption="CompanyName">
                                <RowLayoutColumnInfo OriginX="1" />
                            </Header>
                            <Footer>
                                <RowLayoutColumnInfo OriginX="1" />
                            </Footer>
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn BaseColumnName="ContactName" IsBound="True"
                            Key="ContactName" Hidden="true">
                            <Header Caption="ContactName">
                                <RowLayoutColumnInfo OriginX="2" />
                            </Header>
                            <Footer>
                                <RowLayoutColumnInfo OriginX="2" />
                            </Footer>
                        </igtbl:UltraGridColumn>
                    </Columns>
                    <addnewrow view="NotSet" visible="NotSet">
                    </addnewrow>
                </igtbl:UltraGridBand>
            </bands>

Children