I have the following code binding to an array of objects. It's incredibly slow binding around 3000 objects. But, if I take out the empty template column, it works fine and is fast. HELP!
<igtbl:UltraWebGrid ID="grdLocations" runat="server" OnDblClick="grdLocations_DblClick" Width="620px" oninitializedatasource="grdLocations_InitializeDataSource"> <Bands> <igtbl:UltraGridBand> <Columns> <igtbl:UltraGridColumn BaseColumnName="ID" Key="ID" Hidden="true" Width="5%"> <Header Caption="ID"> </Header> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn BaseColumnName="Name" Width="20%"> <Header Caption="Location Name"> <RowLayoutColumnInfo OriginX="1" /> </Header> <Footer> <RowLayoutColumnInfo OriginX="1" /> </Footer> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn BaseColumnName="Company" Key="Company" Width="20%"> <Header Caption="Company"> <RowLayoutColumnInfo OriginX="2" /> </Header> <Footer> <RowLayoutColumnInfo OriginX="2" /> </Footer> </igtbl:UltraGridColumn> <igtbl:TemplatedColumn BaseColumnName="Phone" Width="30%"> <Header Caption="Address"> <RowLayoutColumnInfo OriginX="3" /> </Header> <CellTemplate></CellTemplate> </igtbl:TemplatedColumn> <igtbl:UltraGridColumn BaseColumnName="Phone" Key="Phone" Width="15%"> <Header Caption="Phone"> <RowLayoutColumnInfo OriginX="4" /> </Header> <Footer> <RowLayoutColumnInfo OriginX="4" /> </Footer> </igtbl:UltraGridColumn> </Columns> <RowEditTemplate> <br> <p align="center"> <input id="igtbl_reOkBtn" onclick="igtbl_gRowEditButtonClick(event);" style="width: 50px;" type="button" value="OK"> <input id="igtbl_reCancelBtn" onclick="igtbl_gRowEditButtonClick(event);" style="width: 50px;" type="button" value="Cancel"> </input> </input> </p> </br> </RowEditTemplate> <RowTemplateStyle BackColor="White" BorderColor="White" BorderStyle="Ridge"> <BorderDetails WidthBottom="3px" WidthLeft="3px" WidthRight="3px" WidthTop="3px" /> </RowTemplateStyle> <AddNewRow Visible="NotSet" View="NotSet"> </AddNewRow> </igtbl:UltraGridBand> </Bands> <displaylayout AllowColSizingDefault="Free" AllowSortingDefault="Yes" AutoGenerateColumns="False" BorderCollapseDefault="Separate" CellClickActionDefault="RowSelect" HeaderClickActionDefault="SortSingle" Name="UltraWebGrid1" RowHeightDefault="21px" StationaryMarginsOutlookGroupBy="True" TableLayout="Fixed" Version="3.00" RowSelectorsDefault="No" SelectTypeRowDefault="Single"> <FrameStyle BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="8pt" Width="700px" Height="240px"> </FrameStyle> <Pager AllowPaging="True" PageSize="20" StyleMode="PrevNext"> </Pager> <EditCellStyleDefault BorderStyle="None" BorderWidth="0px"> </EditCellStyleDefault> <FooterStyleDefault BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px"> <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" /> </FooterStyleDefault> <HeaderStyleDefault BackColor="#11459E" BorderStyle="Solid" CustomRules="background-image:url(/ig_common/images/Office2003BlueBG.png);background-repeat:repeat-x;" Font-Bold="True" Font-Names="Arial" Font-Size="X-Small" ForeColor="#E1E8F5"> <BorderDetails ColorLeft="173, 197, 235" ColorTop="173, 197, 235" WidthLeft="1px" WidthTop="1px" /> </HeaderStyleDefault> <RowStyleDefault BackColor="Window" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="8pt"> <Padding Left="3px" /> <BorderDetails ColorLeft="Window" ColorTop="Window" /> </RowStyleDefault> <SelectedRowStyleDefault BackColor="#F09D21" CustomRules="background-image:url(/ig_common/images/Office2003SelRow.png);background-repeat:repeat-x;" ForeColor="White"> </SelectedRowStyleDefault> <ActivationObject BorderColor="" BorderWidth=""> </ActivationObject> <FilterOptionsDefault> <FilterDropDownStyle BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px" CustomRules="overflow:auto;" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="11px" Width="200px"> <Padding Left="2px" /> </FilterDropDownStyle> <FilterHighlightRowStyle BackColor="#151C55" ForeColor="White"> </FilterHighlightRowStyle> <FilterOperandDropDownStyle BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px" CustomRules="overflow:auto;" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="11px"> <Padding Left="2px" /> </FilterOperandDropDownStyle> </FilterOptionsDefault> </DisplayLayout> </igtbl:UltraWebGrid>
darthg8r said:<input id="igtbl_reOkBtn" onclick="igtbl_gRowEditButtonClick(event);" style="width: 50px;" type="button" value="OK"> <input id="igtbl_reCancelBtn" onclick="igtbl_gRowEditButtonClick(event);" style="width: 50px;" type="button" value="Cancel"> </input> </input>
I doubt this has anything to do with your original question, but this looks to me like you're putting a button inside a button.
It might be helpful to post the code you use to populate the grid.
Hi all,
I have encountered the same problem.
When I removed <CellTemplate></CellTemplate>, the speed is fast ( < 10s ).
However, with a empty <CellTemplate></CellTemplate>, it takes more than 5 mins, and i can see the CPU is running at peak.