This is a migrated thread and some comments may be shown as answers.

[Solved] Bug with Adding Column through Header Context Menu

1 Answer 121 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Simin
Top achievements
Rank 1
Simin asked on 06 Oct 2009, 09:50 PM
In RadGrid, if EnableHeaderContextMenu is set to true and a GridColumn's Display attribute set to false, and HeaderStyle's Width attribute is set, the generated HTML colgroup style will not contain "display:none" style.  For example,

<telerik:RadGrid>
<MasterTableView EnableHeaderContextMenu="true" TableLayout="Fixed">
<Columns>
<telerik:GridBoundColumn Display="false">
<HeaderStyle Width="100"/>
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>

If you examine the generated html, you will see 
<colgroup>
<col style="width:100px"/>
</colgroup>

Adding a column with HeaderStyle's Width attribute set will result in the same incorrect html. 

However, if you hide one column through the header context menu, the generated html is correct:
<colgroup>
<col style="width:100px; display:none;"/>
</colgroup>

Is there workaround for this bug before it is fixed?

Thanks

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 09 Oct 2009, 02:34 PM
Hello Simin,

I tried to reproduce the issue you depicted on my local version of this online demo of RadGrid (hiding the CustomerID column) but my attempts were not successful. The initially hidden column was not rendered at all as part the col group elements at all and was displayed at a later stage (see the enclosed screenshot).

Can you please test this case on your machine? Also compare the differences in both configurations and share them with me as they can help us pinpoint the source of the issue to eliminate it.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Simin
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or