WebHierarchicalDataGrid binds to data twice

Infragistics WebHierarchicalDataGrid offers a nice ability to custom load-on-demand data via its ContainerGridDataBinding event. It is very useful during paging or displaying grid children – you can make a DB call and provide data a just needed for current page or child. But it has a drawback – if you need to programmaticaly sort the […]

WebHierarchicalDataGrid: get_scrollTop() returns incorrect value

Infragistics WebHierarchicalDataGrid has a neat client-side built-in function get_scrollTop() – it is used if at any point you need to retrieve current vertical scroll position of the grid (e.g. to use it in your own calculations to display something at a specific position on the grid – tooltip, help, additional info etc.) Unfortunately the function […]

Solution for WebHierarchicalDataGrid “DataKeyField is invalid” error

If you’re using Infragistics WebHierarchicalDataGrid and getting “DataKeyField is invalid” error after assigning DataKeyFields property for the root level: and trying some data manipulation (like deleting rows, binding data etc.), try using GridView property of the grid instead: The first method used to work, but somewhere around 2011 release of NetAdvantage it broke.

WebHierarchicalDataGrid: Extra Row after Update

If after upgrading to a new version of Infragistics NetAdvantage you suddenly found your WHDG sprouting an extra blank row on top: most likely it’s because grid’s ItemCssClass property is used. In theory (at least according to ever so verbose documentation) it should define what grid’s cells look like. In practice it have no effect […]

WebHierarchicalDataGrid: JavaScript errors after upgrade

Upgrading 3rd party library to a new version is bound to have problems and Infragistics is no exception. In my case I was upgrading NetAdvantage for ASP.NET from version 2009.2 to to 20011.1 and right away WebHierarchicalDataGrid started to crash client-side. If ScriptManager was in debug mode I’d get error: Microsoft JScript runtime error: Sys.ArgumentUndefinedException: […]

WebHierarchicalDataGrid: Locate cell by column name

If you need to get/set value of a specific cell in WHDG Row (which is of GridRecord or ContainerGridRecord type) the only way to do it is by Cell index e.g. But what if you don’t know cell/column index and only column name is known? Then the trick is to find the index first. Consider […]

WebHierarchicalDataGrid: Helpful client functions for row selection

Working with row selection in Infragistics WebHierarchicalDataGrid can be complicated since it maintains independent row selection collection for each row island and basic operations (select/unselect) aren’t that obvious. I put together a few functions to make it a little bit easier. This first function is very basic, it returns total count of selected rows across […]

Improved Auto-size columns for Infragistics WebHierarchicalDataGrid

In the previous post I described a method to automatically resize columns for Infragistics grid control. It works (most of the times) for flat WebDataGrid, but if you try same approach with WebHierarchicalDataGrid – it will fail for child bands. Lets review what we’re trying to accomplish. A grid column should automatically resize to whichever […]