Hello!
On my current project I need to replace der ASP.NET Gridviews with the Ultrawebgrids. On one page I display initially 1000 rows, so I use AJAX to speed up the page handling.
My problem is that no matter which options (Browser, data type etc.) I set on the Webgrid or the data source, when I use load on demand only the first 50 rows are displayed. When I use the "Background" loading behavior, the grid shows the "Loading" symbol constantly; with "Virtual" the symbol appears briefly when I scroll past the first rows, but there are no new rows added in the view.
I'm using the DataSourceID of the grid to assign the data. Paging is not an option.
Can you please help me?
Yes, XmlHTTPRequest must be fired when you scroll the vertical scrollbar.
Please check this:
(1) Have you set XmlLoadOnDemandType="Virtual"? (Important)
(2) When you scroll vertical scrollbar, does post back happens? Means put break point in page load and check, doe it fires?
(3) Do you get XmlHTTPResponseHandler executed after vertical scroll?
Thanks for your quick response.
I've followed the the "Using Load On demand" as good as I could. The Browser is set to XML, LoadOnDemand to XML and the ViewType to Hierarchical (I tested Flat also).
Contrary to the example I don't use the datasource property but instead the DatasourceID for assigning the data, and my primary key consists of the combination of three rows. So I set the Datakeyfield property to "EquipId,ErrorNumber, ErrorDate".
There were no errors either on client side nor server side. The client status for each XmlHTTPResponse is "XmlHTTP processed successfully" and I could track them by Debugging in Code Behind.
But I noticed one thing: Although the grid Property IsXmlHttpRequest is true for these responses, the server side event "XmlHTTPRequest" isn't fired. Shouldn't it be fired in this case?
Oops, Some problemed happened to function in previous post. Sorry for that.
The correct function is as below:
function Grid_XmlHTTPResponseHandler(gridName, rowId, gridResponse)
{
var ResponseObj = gridResponse ;
if (ResponseObj.ResponseStatus != 0)
alert(ResponseObj.StatusMessage);
}
Also check for any error.
Error would not be displayed or noticable in grid.
You may try following to check for error.
(1) Put breakpoint in Application_Error event in global.asax.
(2) Handle client side XmlHTTPResponseHandler event in following way
Refer following link:
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebGrid_Using_XML_Load_On_Demand.html