I have the latest UltraWebGrid 2007 vol 3 and when I use the UseFixedHeaders it does not work at all. The columns disappear and only the header row shows with the thumb-tack image on each column. When I remove the UseFixedHeaders the columns display fine. Any suggestions? I'm completely lost as to what I need to do to get this to work. See code below. Thanks in advance!
<igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server"> <DisplayLayout ViewType="OutlookGroupBy" TableLayout="Fixed" BorderCollapseDefault="Separate" FrameStyle-Width="1000px" FrameStyle-Wrap="false" AutoGenerateColumns="false" RowHeightDefault="18px" Version="3.00" ColFootersVisibleDefault="Yes" FrameStyle-CustomRules="table-layout:fixed" StationaryMargins="Header" UseFixedHeaders="true"> <HeaderStyleDefault BorderWidth="1px" Font-Size="8pt" Font-Names="Verdana" BorderStyle="Solid" HorizontalAlign="Left" ForeColor="Black" BackColor="#f0f0e8"> <Padding Left="5px" Right="5px"></Padding> <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails> </HeaderStyleDefault> <FooterStyleDefault ForeColor="black" BorderStyle="None"> </FooterStyleDefault> <ClientSideEvents MouseOverHandler="MouseOver" InitializeRowHandler="InitializeRow"/> </DisplayLayout> <Bands> <igtbl:UltraGridBand Key="vchAcctKey" BaseTableName="Holdings" AllowSorting="OnClient" FixedHeaderIndicator="Button"> <Columns> <igtbl:UltraGridColumn Width="310" AllowGroupBy="Yes" IsBound="false" Key="vchRegDisplay" BaseColumnName="vchRegDisplay" HeaderText="Display"> <Header Fixed="true"></Header> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn Width="110" AllowGroupBy="Yes" IsBound="false" Key="vchAccountNumber" BaseColumnName="vchAccountNumber" HeaderText="Account #"> <Header Fixed="true" FixedHeaderIndicator="Button"></Header> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn Width="210" AllowGroupBy="Yes" IsBound="false" Key="vchSecurity_Desc" BaseColumnName="vchSecurity_Desc" HeaderText="Security"> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn Width="110" AllowGroupBy="Yes" IsBound="false" Key="vchSecurity_Symbol" BaseColumnName="vchSecurity_Symbol" HeaderText="Symbol"> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn Width="75" IsBound="false" Key="cCUSIP" BaseColumnName="cCUSIP" HeaderText="CUSIP"> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn Width="110" IsBound="false" Key="dCurrent_Market_Price" BaseColumnName="dCurrent_Market_Price" HeaderText="Market Price"> <HeaderStyle HorizontalAlign="Right" /> <CellStyle HorizontalAlign="Right"></CellStyle> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn Width="110" IsBound="false" Key="dTrade_Date_Quantity" Format="###,###.0000" BaseColumnName="dTrade_Date_Quantity" HeaderText="Quantity"> <HeaderStyle HorizontalAlign="Right" /> <CellStyle HorizontalAlign="Right"></CellStyle> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn Width="110" IsBound="false" Key="dClosing_Value" Format="$###,###.00" BaseColumnName="dClosing_Value" HeaderText="Close"> <HeaderStyle HorizontalAlign="Right" /> <CellStyle HorizontalAlign="Right"></CellStyle> <Footer Total="Sum"></Footer> <FooterStyle HorizontalAlign="Right" Font-Bold="true"/> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn Width="110" IsBound="false" Key="mCashAvailable" BaseColumnName="mCashAvailable" Format="$###,###.00" HeaderText="Cash Available"> <HeaderStyle HorizontalAlign="Right" /> <CellStyle HorizontalAlign="Right"></CellStyle> <Footer Total="Sum"></Footer> <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn Width="110" IsBound="false" Key="vchAcctKey" BaseColumnName="vchAcctKey" HeaderText="Account Key"> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn Width="110" IsBound="false" Key="vchAcctKey" BaseColumnName="vchAcctKey" HeaderText="Account Key"> </igtbl:UltraGridColumn> </Columns> </igtbl:UltraGridBand> </Bands> </igtbl:UltraWebGrid>
I got this approach to work for me as well, but I had to put it in the OnPageLoad event, using the InitializeLayout event did not work. I'm using Infragistics2.WebUI.UltraWebGrid.v6.2:
Protected Overrides Sub OnPageLoad(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
DataPointsField.DisplayLayout.UseFixedHeaders = True
DataPointsField.Columns(0).Header.Fixed = True
DataPointsField.Columns(1).Header.Fixed = True
DataPointsField.Columns(2).Header.Fixed = True
DataPointsField.DisplayLayout.StationaryMargins = Infragistics.WebUI.UltraWebGrid.StationaryMargins.Header
End If
End Sub
I have this issue in 2008.1 as well.
When UseFixedHeaders = True, no data rows are displayed.
I placed the following code in and it worked for me...I know I had this in before, but now it works. Perhaps it was the order? I also had this set in the aspx side, but it appears to work better when set in the code behind.
UltraWebGrid1.DisplayLayout.UseFixedHeaders = True
UltraWebGrid1.Columns(0).Header.Fixed = True
UltraWebGrid1.Columns(1).Header.Fixed = True
UltraWebGrid1.DisplayLayout.StationaryMargins = Infragistics.WebUI.UltraWebGrid.StationaryMargins.Header
I have the same problem. As soon as I add Gridname.DisplayLayout.UseFixedHeaders = True in the code behind, my grid goes crazy. I too, really need to get this to work properly.