My grid doesnt load any data when the page is first loaded but when I do a scroll (using ajax) the data shows up.
Any ideas?
Bump.. here is my html. Anyone?
<%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v7.3, Version=7.3.20073.38, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<html>
<title>AMWeb</title>
<link href="amweb_styles1.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
}
function MM_preloadImages() { //v3.0
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
function MM_findObj(n, d) { //v4.01
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
function MM_swapImage() { //v3.0
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
//-->
<body onLoad="MM_preloadImages('images/buttonsideover.gif','images/logoutover.gif')">
<!-- header and footer table -->
<tr>
<!-- start of header table -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="headerback2">
<td>
<table border="0" cellspacing="0" cellpadding="0" class="headertable">
<td rowspan="2" class="seal"><img src="images/seal2.gif" width="83" height="75"></td>
<td class="logout"><a href="#"><img src="images/logout.gif" name="logout" width="64" height="18" border="0" id="logout" onMouseOver="MM_swapImage('logout','','images/logoutover.gif',1)" onMouseOut="MM_swapImgRestore()"></a></td>
<table border="0" cellspacing="0" cellpadding="0" class="navtable">
<%page_security();%>
</table>
<asp:ObjectDataSource ID="oDataSrc" runat="server" SelectMethod="oDsSelect" TypeName="AMWebDataLayer">
</td>
<td class="headeredge" width="10"><img src="images/headeredge.gif" width="10" height="57"></td>
<!-- end of header table -->
<!-- content table -->
</tr>
<td> </td>
<table border="0" cellspacing="0" cellpadding="0" class="tablemargin1">
<td class="cell2">Tab: <select id="Select4" name="tabs">
<option selected="selected">5 Year Cycle</option>
<option>Det Level Detail</option>
<option>C12 C26 Drilldown</option>
<option>Coded ETT</option>
<option>State FSA by DET Roll Up</option>
<option>SRC to FSA Rollup</option>
<option>State Rollup Sort</option>
<option>AK</option>
</select></td>
<!-- button -->
<div class="buttonside"><img src="images/buttonside.gif" name="go" width="10" height="18" id="go"></div>
<!-- end button -->
<td class="cell2">Custom Filter: <select id="Select1" name="">
<option selected="selected">bde group</option>
<option>Patch</option>
<option>CMD Level</option>
<option>UIC</option>
<option>Unit Type</option>
<option>State</option>
<option>EFF Date</option>
<option>Unit Name</option>
<option>Unit ABBR</option>
<select id="Select2">
<option selected="selected">equals</option>
<option>does not equal</option>
<option>is greater than</option>
<option>is less than</option>
<input id="Text1" type="text" />
<select id="Select3">
</select>
<input id="Text2" type="text" /></td>
<div class="buttonside"><img src="images/buttonside.gif" name="filter" width="10" height="18" id="filter"></div>
<table border="0" cellspacing="0" cellpadding="0" class="buttontable1">
<td><!-- button -->
<div class="buttonside"><img src="images/buttonside.gif" name="export" width="10" height="18" id="export"></div>
<div class="buttonside"><img src="images/buttonside.gif" name="print" width="10" height="18" id="print"></div>
<div class="buttonside"><img src="images/buttonside.gif" name="workingV" width="10" height="18" id="workingV"></div>
<span style="position:relative;top:-7%;left:2%">
<form name="mainForm" runat=server>
<igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server" Browser="Xml" DataSourceID="oDataSrc"
Height="533px" Width="1198px">
<Bands>
<igtbl:UltraGridBand>
<AddNewRow View="NotSet" Visible="NotSet">
</AddNewRow>
<RowTemplateStyle BackColor="Window" BorderColor="Window" BorderStyle="Ridge">
<BorderDetails WidthBottom="3px" WidthLeft="3px" WidthRight="3px" WidthTop="3px" />
</RowTemplateStyle>
</igtbl:UltraGridBand>
</Bands>
<DisplayLayout AllowColSizingDefault="Free" AllowDeleteDefault="Yes" AllowUpdateDefault="Yes"
BorderCollapseDefault="Separate" LoadOnDemand="Xml" Name="UltraWebGrid1" RowHeightDefault="20px"
SelectTypeRowDefault="Extended"
TableLayout="Fixed" Version="4.00" Section508Compliant="True" XmlLoadOnDemandType="Virtual">
<FrameStyle BackColor="Window" BorderColor="InactiveCaption" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Microsoft Sans Serif" Font-Size="8.25pt" Height="533px"
Width="1198px">
</FrameStyle>
<Pager MinimumPagesForDisplay="2">
<PagerStyle BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
<BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
</PagerStyle>
</Pager>
<EditCellStyleDefault BorderStyle="None" BorderWidth="0px">
</EditCellStyleDefault>
<FooterStyleDefault BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
</FooterStyleDefault>
<HeaderStyleDefault BackColor="LightGray" BorderStyle="Solid" HorizontalAlign="Left">
</HeaderStyleDefault>
<RowStyleDefault BackColor="Window" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px"
Font-Names="Microsoft Sans Serif" Font-Size="8.25pt">
<Padding Left="3px" />
<BorderDetails ColorLeft="Window" ColorTop="Window" />
</RowStyleDefault>
<GroupByRowStyleDefault BackColor="Control" BorderColor="Window">
</GroupByRowStyleDefault>
<GroupByBox>
<BoxStyle BackColor="ActiveBorder" BorderColor="Window">
</BoxStyle>
</GroupByBox>
<AddNewBox>
<BoxStyle BackColor="Window" BorderColor="InactiveCaption" BorderStyle="Solid" BorderWidth="1px">
</AddNewBox>
<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" Height="300px" 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">
</FilterOperandDropDownStyle>
</FilterOptionsDefault>
<SelectedRowStyleDefault BackColor="#E0E0E0">
</SelectedRowStyleDefault>
</DisplayLayout>
</igtbl:UltraWebGrid></form>
<!-- end header and footer table -->
</html>
I'm going to follow along on this - I think I'm having the same problem. When the grids load, all I see is the header row and the scroll bar. Once I grab the scroll bar, the grid expands and looks correct.
No problem,
Hopefully the infragistics guys reading this will foward that issue to their development teams and get it resolved in a future release.
Thanks for the response, and you are right. If I set the height to a specific number of pixels the problem goes away. Unfortunately the grid height can vary so it's difficult to tell what the height needs to be (and I want to avoid scroll bars). I may have to come up with a method to count to rows, multiply that times the row height and then add in the headers.
Jarrod,
When expermenting with this after I got it to work I wanted to test the width and height using percentages rather than pixels (leaving them blank makes the grid fully expanded) I wanted to have the grid use percentages because of screen resolution situations. It works fine when using width=100% (ect..) but when I set the height to use a percentage I got the same error you did where only the headers would show up so Im going to have to use a solid pixel number. Perhaps this is your problem as well?
Correction that did work. It fixed it, dont ask me why but when I put the form tag next to the body rather than in my table (the object datasource was still inside the form tag) it fixed it.
The new code.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v7.3, Version=7.3.20073.38, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>AMWeb</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="amweb_styles1.css" rel="stylesheet" type="text/css" /><script language="JavaScript" type="text/JavaScript"><!--function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;}function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}}function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d)&&d.all) x=d.all; for (i=0;!x&&i<d.forms.length;i++) x=d.forms; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}//--></script></head><body onLoad="MM_preloadImages('images/buttonsideover.gif','images/logoutover.gif')"><form name="mainForm" runat=server id="Form1"><!-- header and footer table --><table height="100%" border="0" cellspacing="0" cellpadding="0" class="outertable" style="width: 100%"><tr><td class="top"><!-- start of header table --> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="headerback2"> <tr> <td> <table border="0" cellspacing="0" cellpadding="0" class="headertable"> <tr> <td rowspan="2" class="seal"><img src="images/seal2.gif" width="83" height="75"></td> <td class="title1"><img src="./images/amweb.gif"></td><td class="logout"><a href="#"><img src="images/logout.gif" name="logout" width="64" height="18" border="0" id="logout" onMouseOver="MM_swapImage('logout','','images/logoutover.gif',1)" onMouseOut="MM_swapImgRestore()"></a></td></tr><tr><td colspan="2" class="nav"> <table border="0" cellspacing="0" cellpadding="0" class="navtable"><tr><%page_security();%></tr></table></td></tr></table></td> <td class="headeredge" width="10"><img src="images/headeredge.gif" width="10" height="57"></td> </tr></table><!-- end of header table --><!-- content table --><table border="0" cellpadding="0" cellspacing="0" class="containertable1"><tr><th>Availibilty Matrix - FY08 - 20/Dec/07 (specific filter applied)</th></tr><tr><td> </td></tr><tr><td style="height: 109px"><table border="0" cellspacing="0" cellpadding="0" class="tablemargin1"> <tr> <td class="cell2">Tab: <select id="Select4" name="tabs"> <option selected="selected">5 Year Cycle</option> <option>Det Level Detail</option> <option>C12 C26 Drilldown</option> <option>Coded ETT</option> <option>State FSA by DET Roll Up</option> <option>SRC to FSA Rollup</option> <option>State Rollup Sort</option> <option>AK</option> </select></td> <td> <!-- button --><div class="button" onMouseOver="MM_swapImage('go','','images/buttonsideover.gif',1)" onMouseOut="MM_swapImgRestore()"><a href="#">Go</a></div><div class="buttonside"><img src="images/buttonside.gif" name="go" width="10" height="18" id="go"></div><!-- end button --></td> </tr></table><table border="0" cellspacing="0" cellpadding="0" class="tablemargin1"> <tr> <td class="cell2">Custom Filter: <select id="Select1" name=""> <option selected="selected">bde group</option> <option>Patch</option> <option>CMD Level</option> <option>UIC</option> <option>Unit Type</option> <option>State</option> <option>EFF Date</option> <option>Unit Name</option> <option>Unit ABBR</option> </select> <select id="Select2"> <option selected="selected">equals</option> <option>does not equal</option> <option>is greater than</option> <option>is less than</option> </select> <input id="Text1" type="text" /> <select id="Select3"> <option selected="selected">equals</option> <option>does not equal</option> <option>is greater than</option> <option>is less than</option></select> <input id="Text2" type="text" /></td> <td><!-- button --><div class="button" onMouseOver="MM_swapImage('filter','','images/buttonsideover.gif',1)" onMouseOut="MM_swapImgRestore()"><a href="#">Filter</a></div><div class="buttonside"><img src="images/buttonside.gif" name="filter" width="10" height="18" id="filter"></div><!-- end button --></td> </tr></table><table border="0" cellspacing="0" cellpadding="0" class="buttontable1"> <tr> <td><!-- button --><div class="button" onMouseOver="MM_swapImage('export','','images/buttonsideover.gif',1)" onMouseOut="MM_swapImgRestore()"><asp:LinkButton ID="lbExcel" runat="server" OnClick="lbExcel_Click">Export to Excel</asp:LinkButton></div><div class="buttonside"><img src="images/buttonside.gif" name="export" width="10" height="18" id="export"> </div><!-- end button --></td><td><!-- button --><div class="button" onMouseOver="MM_swapImage('print','','images/buttonsideover.gif',1)" onMouseOut="MM_swapImgRestore()"><a href="#">Print</a></div><div class="buttonside"><img src="images/buttonside.gif" name="print" width="10" height="18" id="print"></div><!-- end button --></td><td><!-- button --><div class="button" onMouseOver="MM_swapImage('workingV','','images/buttonsideover.gif',1)" onMouseOut="MM_swapImgRestore()"><a href="#">Make Working Version</a></div><div class="buttonside"><img src="images/buttonside.gif" name="workingV" width="10" height="18" id="workingV"></div><!-- end button --></td> </tr></table> </td></tr></table><span style="position:relative;top:-7%;left:2%"> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="fill" TypeName="Amweb.Data.AvailabilityMatrixDAL" OldValuesParameterFormatString="original_{0}"> <SelectParameters> <asp:Parameter DefaultValue="OLD DATA" Name="scenarioId" Type="String" /> <asp:Parameter DefaultValue="08" Name="fyStart" Type="UInt32" /> </SelectParameters> </asp:ObjectDataSource> <igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server" DataSourceID="ObjectDataSource1" Height="550px" OnInitializeRow="UltraWebGrid1_InitializeRow" Width="1165px" EnableCrawlerDetection="False" Browser="Xml"> <Bands> <igtbl:UltraGridBand> <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" /></p> </RowEditTemplate> <AddNewRow View="NotSet" Visible="NotSet"> </AddNewRow> <RowTemplateStyle BackColor="Window" BorderColor="Window" BorderStyle="Ridge"> <BorderDetails WidthBottom="3px" WidthLeft="3px" WidthRight="3px" WidthTop="3px" /> </RowTemplateStyle> <Columns> <igtbl:UltraGridColumn BaseColumnName="Databound Col0" IsBound="True" Key="Databound Col0"> <Header Caption="Databound Col0"> </Header> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn BaseColumnName="Databound Col1" DataType="System.Int32" IsBound="True" Key="Databound Col1"> <Header Caption="Databound Col1"> <RowLayoutColumnInfo OriginX="1" /> </Header> <Footer> <RowLayoutColumnInfo OriginX="1" /> </Footer> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn BaseColumnName="Databound Col2" IsBound="True" Key="Databound Col2"> <Header Caption="Databound Col2"> <RowLayoutColumnInfo OriginX="2" /> </Header> <Footer> <RowLayoutColumnInfo OriginX="2" /> </Footer> </igtbl:UltraGridColumn> </Columns> </igtbl:UltraGridBand> </Bands> <DisplayLayout FixedHeaderIndicatorDefault="NotSet" HeaderTitleModeDefault="Always" Name="UltraWebGrid1" RowHeightDefault="20px" SelectTypeRowDefault="Single" Version="3.00" SortingAlgorithmDefault="NotSet" IndentationTypeDefault="Flat" LoadOnDemand="Xml" XmlLoadOnDemandType="Virtual" AllowDeleteDefault="Yes" AllowUpdateDefault="Yes"> <ActivationObject BorderColor="Black" BorderWidth="" BorderStyle="Dotted"> <BorderDetails WidthLeft="0px" WidthRight="0px" /> </ActivationObject> <RowStyleDefault BackColor="#BCDAE8" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px"> <BorderDetails ColorLeft="188, 218, 232" ColorTop="188, 218, 232" /> <Padding Left="3px" /> </RowStyleDefault> <FilterOptionsDefault> <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> <FilterHighlightRowStyle BackColor="#151C55" ForeColor="White"> </FilterHighlightRowStyle> <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> </FilterOptionsDefault> <HeaderStyleDefault BackColor="#5BA1C2" BorderStyle="Solid" BorderColor="Black" ForeColor="White"> <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" /> </HeaderStyleDefault> <FrameStyle BorderColor="#999999" BorderStyle="None" BorderWidth="3px" Width="1165px" Cursor="Default" Height="550px"> </FrameStyle> <ClientSideEvents AfterCellUpdateHandler="UltraWebGrid1_AfterCellUpdateHandler" /> <SelectedRowStyleDefault BackColor="#9BBCCC" ForeColor="White"> </SelectedRowStyleDefault> <RowAlternateStyleDefault BackColor="#E9E9F7"> <BorderDetails ColorLeft="233, 233, 247" ColorTop="233, 233, 247" /> </RowAlternateStyleDefault> </DisplayLayout> </igtbl:UltraWebGrid> </span> </td></tr></table><!-- end header and footer table --></form></body></html>
I have since changed that and its not the issue. Are there known issues that might cause this?
I am binding to a DataTable.